From: Dave Young <hidave.darkstar@gmail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Chuck Ebbert <cebbert@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] ioremap: fix iounmap numpages
Date: Fri, 29 Jun 2007 17:09:07 +0000 [thread overview]
Message-ID: <20070629170907.GA1735@darkstar.te-china.tietoenator.com> (raw)
Hi,
The second parameter of change_page_attr in iounmap is wrong, it should be (p->size - 1) >> PAGE_SHIFT
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
---
diff -upr linux/arch/i386/mm/ioremap.c linux.new/arch/i386/mm/ioremap.c
--- linux/arch/i386/mm/ioremap.c 2007-06-29 16:48:40.000000000 +0000
+++ linux.new/arch/i386/mm/ioremap.c 2007-06-29 16:50:09.000000000 +0000
@@ -196,7 +196,7 @@ void iounmap(volatile void __iomem *addr
/* Reset the direct mapping. Can block */
if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
change_page_attr(virt_to_page(__va(p->phys_addr)),
- p->size >> PAGE_SHIFT,
+ (p->size - 1) >> PAGE_SHIFT,
PAGE_KERNEL);
global_flush_tlb();
}
Regards
dave
next reply other threads:[~2007-06-29 9:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 17:09 Dave Young [this message]
2007-06-29 12:36 ` Jeremy Fitzhardinge
2007-07-02 0:33 ` Dave Young
2007-07-02 4:01 ` Dmitry Monakhov
2007-07-02 19:08 ` Jeremy Fitzhardinge
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=20070629170907.GA1735@darkstar.te-china.tietoenator.com \
--to=hidave.darkstar@gmail.com \
--cc=cebbert@redhat.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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®