From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: 2.6.13-rc7 compile failures (was: Re: Fix up mmap of /dev/kmem)
Date: Wed, 24 Aug 2005 14:12:46 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.63.0508241410530.4356@anakin> (raw)
In-Reply-To: <200508132201.j7DM1TAN031499@hera.kernel.org>
On Sat, 13 Aug 2005, Linux Kernel Mailing List wrote:
> Fix up mmap of /dev/kmem
>
> This leaves the issue of whether we should deprecate the whole thing (or
> if we should check the whole mmap range, for that matter) open. Just do
> the minimal fix for now.
>
> drivers/char/mem.c | 12 ++++++++----
> 1 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/char/mem.c b/drivers/char/mem.c
> --- a/drivers/char/mem.c
> +++ b/drivers/char/mem.c
> @@ -261,7 +261,11 @@ static int mmap_mem(struct file * file,
>
> static int mmap_kmem(struct file * file, struct vm_area_struct * vma)
> {
> - unsigned long long val;
> + unsigned long pfn;
> +
> + /* Turn a kernel-virtual address into a physical page frame */
> + pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT;
> +
> /*
> * RED-PEN: on some architectures there is more mapped memory
> * than available in mem_map which pfn_valid checks
Some (not all!) of my m68k test builds are now failing with:
| linux-m68k-2.6.13-rc7/drivers/char/mem.c: In function `mmap_kmem':
| linux-m68k-2.6.13-rc7/drivers/char/mem.c:267: warning: cast to pointer from integer of different size
| linux-m68k-2.6.13-rc7/drivers/char/mem.c:267: invalid operands to binary <<
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2005-08-24 12:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200508132201.j7DM1TAN031499@hera.kernel.org>
2005-08-15 13:04 ` Fix up mmap of /dev/kmem Olaf Hering
2005-08-24 12:12 ` Geert Uytterhoeven [this message]
2005-08-24 15:36 ` 2.6.13-rc7 compile failures (was: Re: Fix up mmap of /dev/kmem) Andreas Schwab
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=Pine.LNX.4.63.0508241410530.4356@anakin \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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
all inboxes | Powered by JetHome®