From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] remove the debugging restrictions in devicemaps_init()
Date: Sat, 12 May 2012 14:49:16 +0100 [thread overview]
Message-ID: <20120512134916.GB10453@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <alpine.LFD.2.02.1205081214220.21030@xanadu.home>
On Tue, May 08, 2012 at 12:17:40PM -0400, Nicolas Pitre wrote:
> On Tue, 8 May 2012, Russell King - ARM Linux wrote:
>
> > On Tue, May 08, 2012 at 12:19:30AM -0400, Nicolas Pitre wrote:
> > > However, the switching itself doesn't involve a full cache flush.
> >
> > That's where you're wrong. Look at the switch_mm() helpers in proc-*.S.
> > StrongARM for example calls v4wb_flush_kern_cache_all() here, which needs
> > the cache flushing mappings to be in place in the _current_ page table.
>
> Right. I had to be wrong somewhere.
>
> What about abstracting the cache area mapping code in a function of its
> own, and calling it inside install_temp_mm() as well?
One of the issues is that we check that the mappings don't conflict -
in other words, a section mapping doesn't conflict with a page table
mapping. We need a clean page table to start with before we start
populating it with the IO entries, so that we know there's no mappings
in IO space to conflict with the newly setup entries.
What we could do is allocate a new page table, use that page table to
setup the new mappings, memcpy them to the swapper page table as a
final step before we kick the caches and TLB.
The down side to that approach is we have people abusing the map_io
method for other purposes (people - including you - just don't listen
when I tell them that they shouldn't do this kind of stuff) such as
setting up mappings which they then immediately access. (In case
you've forgotten, Assabet, the probing of the SCR register at map_io
time to discover the platforms configuration. That set the precident
and now other platforms also do this kind of thing.)
So, I don't think there's any easy solution to this - certainly not
one which is going to be fragile or restricted to a small set of
configurations.
Overall, I'm not sure it's worth trying to solve this.
next prev parent reply other threads:[~2012-05-12 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-16 5:44 [PATCH 0/2] improve debugability of early boot of the kernel Nicolas Pitre
2012-03-16 5:44 ` [PATCH 1/2] DEBUG_LL: limit early mapping to the minimum Nicolas Pitre
2012-03-16 5:44 ` [PATCH 2/2] remove the debugging restrictions in devicemaps_init() Nicolas Pitre
2012-05-06 16:30 ` Russell King - ARM Linux
2012-05-08 4:19 ` Nicolas Pitre
2012-05-08 7:14 ` Russell King - ARM Linux
2012-05-08 16:17 ` Nicolas Pitre
2012-05-12 13:49 ` Russell King - ARM Linux [this message]
2012-05-12 16:16 ` Nicolas Pitre
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=20120512134916.GB10453@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).