From: "H. Peter Anvin" <hpa@zytor.com>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Ondrej Zajicek <santiago@crfreenet.org>,
David Miller <davem@davemloft.net>
Subject: Re: [PATCH] fbdev: suppress warning when assigning vga-save/restore base
Date: Sun, 04 Aug 2013 10:33:46 -0700 [thread overview]
Message-ID: <51FE907A.2090201@zytor.com> (raw)
In-Reply-To: <1375637141-2878-1-git-send-email-dh.herrmann@gmail.com>
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 suppress warnings due to size differences.
>
> As IO addresses are always low addresses, we can safely drop the higher
> part of the address. This is what these drivers did before, anyway.
>
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> Reported-by: H. Peter Anvin <hpa@zytor.com>
I'm still bothered here. Casting between resource_size_t and void *
implies a confusion between physical and virtual addresses. That may be
unavoidable for some reason, but I'd like to know what exactly is confused.
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?
-hpa
next prev parent reply other threads:[~2013-08-04 17:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-04 17:25 [PATCH] fbdev: suppress warning when assigning vga-save/restore base David Herrmann
2013-08-04 17:33 ` H. Peter Anvin [this message]
2013-08-05 1:51 ` David Miller
2013-08-05 20:29 ` Ondrej Zajicek
2013-08-05 21:02 ` H. Peter Anvin
2013-08-05 21:14 ` H. Peter Anvin
2013-08-05 22:29 ` David Miller
2014-02-10 11:23 ` Tomi Valkeinen
2014-02-10 11:32 ` David Herrmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51FE907A.2090201@zytor.com \
--to=hpa@zytor.com \
--cc=davem@davemloft.net \
--cc=dh.herrmann@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=santiago@crfreenet.org \
--cc=tomi.valkeinen@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox