[RFC] [PATCH 2/16] x86_64: Assembly safe page.h and pgtable.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Andi Kleen <ak at suse.de> writes:

>> 
>> I think we need these UL suffixes. Otherwise in some cases overflow
>> can take place and compiler emits warning.
>> 
>> For ex. in following definition I got rid of UL.
>> 
>> #define PGDIR_SIZE      (1 << PGDIR_SHIFT) 
>
> Yes for the shifts it is needed, but not for the unshifted constants.
> I think. At least when they're hex the compiler should chose the right
> type on its own.

Only if the high bit is set.  But it should chose a big enough type.
However there is no reason to play games and possibly out smart ourselves.
That is the point of the _AC() macro.  It adds the suffix only for
C code, and drops it for assembly.

Eric


[Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Linux Media]     [Linux Resources]

Powered by Linux