From: Philippe De Muyter <phdm@macqel.be>
To: linux-kernel@vger.kernel.org, linux-m68k@vger.kernel.org
Subject: [PATCH m68k resent] allow ioremapping top of memory
Date: Sun, 6 Dec 2009 20:28:41 +0100 [thread overview]
Message-ID: <20091206192841.GA23088@frolo.macqel> (raw)
Hi Geert and all,
The test in __ioremap to reject memory ranges crossing the 0 boundary
rejects also memory ranges ending at the end of the memory. Fix that.
Signed-off-by: Philippe De Muyter <phdm@macqel.be>
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -116,7 +115,7 @@ void __iomem *__ioremap(unsigned long ph
/*
* Don't allow mappings that wrap..
*/
- if (!size || size > physaddr + size)
+ if (!size || physaddr > (unsigned long)(-size))
return NULL;
#ifdef CONFIG_AMIGA
next reply other threads:[~2009-12-06 19:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-06 19:28 Philippe De Muyter [this message]
2009-12-22 19:08 ` [PATCH m68k resent] allow ioremapping top of memory Geert Uytterhoeven
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=20091206192841.GA23088@frolo.macqel \
--to=phdm@macqel.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@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