From: Dave Ashley (linux mailing list) <linux@xdr.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmap + wrapping around to 0
Date: Thu, 8 Nov 2001 08:56:43 -0800 [thread overview]
Message-ID: <200111081656.fA8Guht24668@xdr.com> (raw)
I have a fix for this problem. In the file
include/linux/mm.h
in the inline function do_mmap(), change
if ((offset + PAGE_ALIGN(len)) < offset)
to
if ((offset + PAGE_ALIGN(len)-1) < offset)
-Dave
On Wed, 7 Nov 2001, Dave Ashley wrote:
> I'm using linux on an embedded system based on the 2.4.2 kernel. There
> is a flash rom at physical address FFE00000 of 2 megabytes size. I have
> a flash utility that uses mmap() on /dev/mem, but I can't call it with
> offset 0xffe00000, size 0x00200000, I must call it with size
> 0x001ff000 (1 page size less than the real size). I figure this is because
> the end address has wrapped around to 0 and this messes up the system.
>
> This should work, the memory is there. But I can't access that last page.
>
> BTW the cpu is a ppc 8260 (603e core).
>
> -Dave
next reply other threads:[~2001-11-08 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-08 16:56 Dave Ashley [this message]
2001-11-08 18:00 ` Alan Cox
2001-11-08 18:03 ` Dave Ashley (linux mailing list)
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=200111081656.fA8Guht24668@xdr.com \
--to=linux@xdr.com \
--cc=linux-kernel@vger.kernel.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®