[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061113211636.GC13832@in.ibm.com>
Date: Mon, 13 Nov 2006 16:16:36 -0500
From: Vivek Goyal <vgoyal@...ibm.com>
To: Andi Kleen <ak@...e.de>
Cc: linux kernel mailing list <linux-kernel@...r.kernel.org>,
Reloc Kernel List <fastboot@...ts.osdl.org>,
ebiederm@...ssion.com, akpm@...l.org, hpa@...or.com,
magnus.damm@...il.com, lwang@...hat.com, dzickus@...hat.com
Subject: Re: [RFC] [PATCH 2/16] x86_64: Assembly safe page.h and pgtable.h
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists