[openib-general] Problem with using krping

Pete Wyckoff pw at osc.edu
Thu Nov 23 09:30:27 PST 2006


tom at opengridcomputing.com wrote on Thu, 23 Nov 2006 01:15 -0600:
> I'm a little stumped on the ALIGN macro change. The log entry implies that
> the change was to fix the ALIGN macro so that it did NOT truncate to int,
> but it seems to do exactly that. Do you have any insight into this. The file
> I'm looking at is include/linux/kernel.h.
[..]
> On 11/23/06 12:54 AM, "Tom Tucker" <tom at opengridcomputing.com> wrote:
> > On 11/22/06 10:46 PM, "Krishna Kumar2" <krkumar2 at in.ibm.com> wrote:
> >> The problem (for me) happens since c2_reg_phys_mr() calculates page_shift
> >> was as 15 and size is 0xffffffff resulting in pbl_depth getting set to

The use of 1UL in the ALIGN macro has the side effect of
fixing the type of ((1 << page_shift) - 1UL), so 32 bits on x86.
But you're using u64 on all arches.  Applying ~ to that doesn't
flip the high bits.  You can use (1ULL << page_shift) to trump
the 1UL in the macro.

		-- Pete




More information about the general mailing list