From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/1] Use pmd_table() MACRO for unmap_area_sections()
Date: Sun, 7 Sep 2008 20:36:20 +0100 [thread overview]
Message-ID: <20080907193619.GC10359@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20080906.035635.186133813.Hiroshi.DOYU@nokia.com>
On Sat, Sep 06, 2008 at 03:56:35AM +0300, Hiroshi DOYU wrote:
> Would it be possible to have "pmd_table()" definition "in pgtable.h"?
Well, the first question is... where has this come from, and why.
Looking at the omap tree, it's because of arch/arm/plat-omap/mmu.c,
which seems to be somewhat weird and complex, duplicating some of
what's going on elsewhere in the kernel.
(And with the changes I've just queued up for the next mainline merge
window, this file will probably break because of it's use of the kernel
page table macros.)
A more portable way to do that would be to split out the innards of
__arm_ioremap_pfn() into a separate function, and use that instead
of exmap_set_armmmu(). Then, replace exmap_clear_armmmu() with
unmap_area_sections() to tear down the ARM side of the mapping.
As far as 'mmu->twl_mm' goes, the only reason I can see for that
existing is as a way to use the kernel's page table accessors to
manipulate something that isn't used for as the CPU's page table,
which in turn leads to quite a number of nasty hacks in the code.
Really that wants to use its own accessors and macros, and twl_mm
eliminated. A mm_struct isn't small. And by doing so, you'll
avoid the bug and memory leak in omap_mmu_register(). kfree'ing
(!) a mm_struct onto a different slab cache from whence it came!
Which probably will mean that there ends up only being one place
where the construct which pmd_table() is replacing exists.
next prev parent reply other threads:[~2008-09-07 19:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-03 5:36 [PATCH 1/1] Use pmd_table() MACRO for unmap_area_sections() Hiroshi DOYU
2008-09-05 17:21 ` Tony Lindgren
2008-09-05 22:45 ` Russell King - ARM Linux
2008-09-06 0:56 ` Hiroshi DOYU
2008-09-07 19:36 ` Russell King - ARM Linux [this message]
2008-09-08 2:04 ` Woodruff, Richard
2008-09-08 6:47 ` Hiroshi DOYU
2008-09-08 13:21 ` Woodruff, Richard
2008-09-08 3:38 ` Hiroshi DOYU
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=20080907193619.GC10359@flint.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=Hiroshi.DOYU@nokia.com \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.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