On Mon, Nov 13, 2006 at 06:17:00PM +0100, Andi Kleen wrote: > On Monday 13 November 2006 17:28, Vivek Goyal wrote: > > > > This patch makes pgtable.h and page.h safe to include > > in assembly files like head.S. Allowing us to use > > symbolic constants instead of hard coded numbers when > > refering to the page tables. > > Hmm, I think the ULs are probably not needed anyways. What > happens when you just drop them even for C? You shouldn't get any > new warnings i hope. >
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) Here constant defaulted to intger and PGDIR_SHIFT is 39. Hence compiler emits following warning wherever PGDIR_SIZE is used. arch/x86_64/kernel/machine_kexec.c: In function init_level3_page: arch/x86_64/kernel/machine_kexec.c:47: warning: left shift count >= width of type arch/x86_64/kernel/machine_kexec.c: In function init_level4_page: arch/x86_64/kernel/machine_kexec.c:80: warning: left shift count >= width of type arch/x86_64/kernel/machine_kexec.c:96: warning: left shift count >= width of type arch/x86_64/kernel/machine_kexec.c:101: warning: left shift count >= width of type Thanks Vivek _______________________________________________ fastboot mailing list [email protected] https://lists.osdl.org/mailman/listinfo/fastboot
