Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2014-02-10 Thread David Herrmann
Hi Tomi On Mon, Feb 10, 2014 at 12:23 PM, Tomi Valkeinen wrote: > Hi David, > > On 04/08/13 20:25, David Herrmann wrote: >> If drivers use "struct resource" objects to retrieve the vga-base, they >> must correctly cast the integer to pointer. With x86+PAE we have 32bit >> pointers but 64bit resou

Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2014-02-10 Thread Tomi Valkeinen
Hi David, On 04/08/13 20:25, David Herrmann wrote: > If drivers use "struct resource" objects to retrieve the vga-base, they > must correctly cast the integer to pointer. With x86+PAE we have 32bit > pointers but 64bit resource_size_t. Hence, cast it to "unsigned long" > before casting to "void*"

Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2013-08-05 Thread David Miller
From: Ondrej Zajicek Date: Mon, 5 Aug 2013 22:29:55 +0200 > On Sun, Aug 04, 2013 at 06:51:46PM -0700, David Miller wrote: >> From: "H. Peter Anvin" >> Date: Sun, 04 Aug 2013 10:33:46 -0700 >> >> > Anyone who can dig backwards and summarize? In other words: >> > >> > Where in the current code

Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2013-08-05 Thread H. Peter Anvin
On 08/05/2013 02:02 PM, H. Peter Anvin wrote: > On 08/05/2013 01:29 PM, Ondrej Zajicek wrote: >> >> How this could even work? AFAIK these cards have to be explicitly programmed >> to enable MMIO (which was not done in the patches). These patches claim that >> it is for multi-domain PCI. I would gue

Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2013-08-05 Thread H. Peter Anvin
On 08/05/2013 01:29 PM, Ondrej Zajicek wrote: > > How this could even work? AFAIK these cards have to be explicitly programmed > to enable MMIO (which was not done in the patches). These patches claim that > it is for multi-domain PCI. I would guess that vgabase is NULL in common > configurations

Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2013-08-05 Thread Ondrej Zajicek
On Sun, Aug 04, 2013 at 06:51:46PM -0700, David Miller wrote: > From: "H. Peter Anvin" > Date: Sun, 04 Aug 2013 10:33:46 -0700 > > > Anyone who can dig backwards and summarize? In other words: > > > > Where in the current code do we stuff a physical address in a pointer, > > or a virtual addres

Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2013-08-04 Thread David Miller
From: "H. Peter Anvin" Date: Sun, 04 Aug 2013 10:33:46 -0700 > Anyone who can dig backwards and summarize? In other words: > > Where in the current code do we stuff a physical address in a pointer, > or a virtual address into a non-pointer? The VGA register accessors try to accomodate iomem an

Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base

2013-08-04 Thread H. Peter Anvin
On 08/04/2013 10:25 AM, David Herrmann wrote: > If drivers use "struct resource" objects to retrieve the vga-base, they > must correctly cast the integer to pointer. With x86+PAE we have 32bit > pointers but 64bit resource_size_t. Hence, cast it to "unsigned long" > before casting to "void*" to sup

[PATCH] fbdev: suppress warning when assigning vga-save/restore base

2013-08-04 Thread David Herrmann
If drivers use "struct resource" objects to retrieve the vga-base, they must correctly cast the integer to pointer. With x86+PAE we have 32bit pointers but 64bit resource_size_t. Hence, cast it to "unsigned long" before casting to "void*" to suppress warnings due to size differences. As IO address