Message ID | 1462464917-10872-1-git-send-email-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, May 05, 2016 at 05:15:17PM +0100, Chris Wilson wrote: > arch/x86/kernel/early-quirks.c: In function ‘intel_graphics_stolen’: > arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects > argument of type ‘long long unsigned int’, but argument 2 has type ‘phys_addr_t’ [-Wformat=] > "0x%llx-0x%llx\n", base, base + size - 1); > ^ > arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects > argument of type ‘long long unsigned int’, but argument 3 has type ‘phys_addr_t’ [-Wformat=] This also makes the actual printk output crap. On my non-PAE machine I saw somehting resembling this: Reserving Intel graphics memory at 0x37ffffff3ffffffff-0x200000000 Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Fixes: ee0629cfd3c16 (drm/i915: Function per early graphics quirk) > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > Cc: Mika Kuoppala <mika.kuoppala@intel.com> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > Cc: Thomas Gleixner <tglx@linutronix.de> > Cc: Ingo Molnar <mingo@redhat.com> > Cc: "H. Peter Anvin" <hpa@zytor.com> > --- > arch/x86/kernel/early-quirks.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c > index d2f75b4..068ab3f 100644 > --- a/arch/x86/kernel/early-quirks.c > +++ b/arch/x86/kernel/early-quirks.c > @@ -535,8 +535,8 @@ intel_graphics_stolen(int num, int slot, int func, > if (!size || !base) > return; > > - printk(KERN_INFO "Reserving Intel graphics stolen memory at " > - "0x%llx-0x%llx\n", base, base + size - 1); > + printk(KERN_INFO "Reserving Intel graphics memory at 0x%llx-0x%llx\n", > + (long long)base, (long long)(base + size - 1)); > > /* Mark this space as reserved */ > e820_add_region(base, size, E820_RESERVED); > -- > 2.8.1
On pe, 2016-05-06 at 13:57 +0300, Ville Syrjälä wrote: > On Thu, May 05, 2016 at 05:15:17PM +0100, Chris Wilson wrote: > > > > arch/x86/kernel/early-quirks.c: In function ‘intel_graphics_stolen’: > > arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects > > argument of type ‘long long unsigned int’, but argument 2 has type ‘phys_addr_t’ [-Wformat=] > > "0x%llx-0x%llx\n", base, base + size - 1); > > ^ > > arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects > > argument of type ‘long long unsigned int’, but argument 3 has type ‘phys_addr_t’ [-Wformat=] > This also makes the actual printk output crap. On my non-PAE machine > I saw somehting resembling this: > Reserving Intel graphics memory at 0x37ffffff3ffffffff-0x200000000 > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > > > Fixes: ee0629cfd3c16 (drm/i915: Function per early graphics quirk) > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > > Cc: Mika Kuoppala <mika.kuoppala@intel.com> > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > > Cc: Thomas Gleixner <tglx@linutronix.de> > > Cc: Ingo Molnar <mingo@redhat.com> > > Cc: "H. Peter Anvin" <hpa@zytor.com> > > --- > > arch/x86/kernel/early-quirks.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c > > index d2f75b4..068ab3f 100644 > > --- a/arch/x86/kernel/early-quirks.c > > +++ b/arch/x86/kernel/early-quirks.c > > @@ -535,8 +535,8 @@ intel_graphics_stolen(int num, int slot, int func, > > if (!size || !base) > > return; > > > > - printk(KERN_INFO "Reserving Intel graphics stolen memory at " > > - "0x%llx-0x%llx\n", base, base + size - 1); > > + printk(KERN_INFO "Reserving Intel graphics memory at 0x%llx-0x%llx\n", > > + (long long)base, (long long)(base + size - 1)); Any reason not to make this %pa and %zx while at it? printk(KERN_INFO "Reserving Intel graphics memory at %pa (size 0x%zx)\n", &base, size); Regards, Joonas > > > > /* Mark this space as reserved */ > > e820_add_region(base, size, E820_RESERVED); > > -- > > 2.8.1
On Mon, May 09, 2016 at 04:04:31PM +0300, Joonas Lahtinen wrote: > On pe, 2016-05-06 at 13:57 +0300, Ville Syrjälä wrote: > > On Thu, May 05, 2016 at 05:15:17PM +0100, Chris Wilson wrote: > > > > > > arch/x86/kernel/early-quirks.c: In function ‘intel_graphics_stolen’: > > > arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects > > > argument of type ‘long long unsigned int’, but argument 2 has type ‘phys_addr_t’ [-Wformat=] > > > "0x%llx-0x%llx\n", base, base + size - 1); > > > ^ > > > arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects > > > argument of type ‘long long unsigned int’, but argument 3 has type ‘phys_addr_t’ [-Wformat=] > > This also makes the actual printk output crap. On my non-PAE machine > > I saw somehting resembling this: > > Reserving Intel graphics memory at 0x37ffffff3ffffffff-0x200000000 > > > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > > > > > > > Fixes: ee0629cfd3c16 (drm/i915: Function per early graphics quirk) > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > > > Cc: Daniel Vetter <daniel.vetter@ffwll.ch> > > > Cc: Mika Kuoppala <mika.kuoppala@intel.com> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> > > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> > > > Cc: Thomas Gleixner <tglx@linutronix.de> > > > Cc: Ingo Molnar <mingo@redhat.com> > > > Cc: "H. Peter Anvin" <hpa@zytor.com> > > > --- > > > arch/x86/kernel/early-quirks.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c > > > index d2f75b4..068ab3f 100644 > > > --- a/arch/x86/kernel/early-quirks.c > > > +++ b/arch/x86/kernel/early-quirks.c > > > @@ -535,8 +535,8 @@ intel_graphics_stolen(int num, int slot, int func, > > > if (!size || !base) > > > return; > > > > > > - printk(KERN_INFO "Reserving Intel graphics stolen memory at " > > > - "0x%llx-0x%llx\n", base, base + size - 1); > > > + printk(KERN_INFO "Reserving Intel graphics memory at 0x%llx-0x%llx\n", > > > + (long long)base, (long long)(base + size - 1)); > > Any reason not to make this %pa and %zx while at it? > > printk(KERN_INFO "Reserving Intel graphics memory at %pa (size 0x%zx)\n", &base, size); The start-end style matches better with the e820 dump and whatnot. IIRC that was the reason I made it look like it does. > > Regards, Joonas > > > > > > > /* Mark this space as reserved */ > > > e820_add_region(base, size, E820_RESERVED); > > > -- > > > 2.8.1 > -- > Joonas Lahtinen > Open Source Technology Center > Intel Corporation
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index d2f75b4..068ab3f 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c @@ -535,8 +535,8 @@ intel_graphics_stolen(int num, int slot, int func, if (!size || !base) return; - printk(KERN_INFO "Reserving Intel graphics stolen memory at " - "0x%llx-0x%llx\n", base, base + size - 1); + printk(KERN_INFO "Reserving Intel graphics memory at 0x%llx-0x%llx\n", + (long long)base, (long long)(base + size - 1)); /* Mark this space as reserved */ e820_add_region(base, size, E820_RESERVED);
arch/x86/kernel/early-quirks.c: In function ‘intel_graphics_stolen’: arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘phys_addr_t’ [-Wformat=] "0x%llx-0x%llx\n", base, base + size - 1); ^ arch/x86/kernel/early-quirks.c:539:9: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘phys_addr_t’ [-Wformat=] Fixes: ee0629cfd3c16 (drm/i915: Function per early graphics quirk) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> --- arch/x86/kernel/early-quirks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)