From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: CSR: Adding CSR SiRFprimaII board support
Date: Sat, 2 Jul 2011 21:34:19 +0200 [thread overview]
Message-ID: <201107022134.19690.arnd@arndb.de> (raw)
In-Reply-To: <20110702122527.GH21898@n2100.arm.linux.org.uk>
On Saturday 02 July 2011 14:25:27 Russell King - ARM Linux wrote:
> On Fri, Jul 01, 2011 at 06:19:43PM +0200, Arnd Bergmann wrote:
> > On Friday 01 July 2011, Barry Song wrote:
> > > It looks like we can new a common function named as of_io_earlymap()
> > > or something in drivers/of/address.c. of_iomap() does ioremap,
> > > of_io_earlymap() does early static mapping?
> > > Then all SoCs can call this function to do early static mapping. if
> > > so, some lines can be deleted in sirfsoc_of_clk_init(). How do you
> > > think about newing the function in drivers/of/address.c?
> >
> > I think that's a good idea, but the ARM specific implementation cannot
> > be in common code. Other architectures have stuff similar to iotable_init
> > in asm/fixmap.h. If we decide on a function prototype for this, the
> > implementation can be arch/*/.
>
> One of the issues with fixmap is that its based around single pages
> and indexing an area. It's idiotic to use such a thing if you have
> to map the ISA memory regions for VGA.
>
> Plus, of course, forcing everything down the route of ioremap() and
> fixmap forces everyone to use 2-level page tables and 4K page table
> entries, avoiding the possibility of having just a single 1st level
> page table entry covering their IO space. Not only does it increase
> TLB pressure but it also makes page table walking more expensive.
I didn't mean converting ARM to use fixmap, but having a common prototype
for the function to do an early mapping of devices, regardless if it's
based on fixmap or iotable.
We already discussed the issue of large TLBs for iotable before. If
we ever want to conver that to the fixmap API, we would first have
to extend it with a more straightforward way to do large mappings,
and I'm not going to start that discussion.
I actually didn't know that we had fixmap support on ARM until I looked
now. In fact there are now at least three interfaces that would let you
establish early mappings:
* iotable (ARM only)
* fixmap (some architectures, unused on ARM except for kmap_atomic)
* early_ioremap (x86 only, built on top of fixmap)
Maybe we could implement early_ioremap on ARM on top of iotable,
with support for large pages, and build of_io_earlymap() as suggested
by Barry on top of that?
Arnd
next prev parent reply other threads:[~2011-07-02 19:34 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 3:32 [PATCH v2] ARM: CSR: Adding CSR SiRFprimaII board support Barry Song
2011-06-29 21:29 ` Arnd Bergmann
2011-06-30 3:39 ` Barry Song
2011-06-30 7:19 ` Barry Song
2011-06-30 10:36 ` Arnd Bergmann
2011-06-30 15:03 ` Rob Herring
2011-07-01 0:04 ` Barry Song
2011-07-01 16:26 ` Arnd Bergmann
2011-07-04 14:59 ` Grant Likely
2011-07-01 6:20 ` Barry Song
2011-07-01 16:19 ` Arnd Bergmann
2011-07-02 12:25 ` Russell King - ARM Linux
2011-07-02 19:34 ` Arnd Bergmann [this message]
2011-07-04 2:55 ` Barry Song
2011-07-04 14:53 ` Arnd Bergmann
2011-07-05 1:32 ` Barry Song
2011-07-05 11:10 ` Arnd Bergmann
2011-07-05 8:34 ` Barry Song
2011-07-06 2:10 ` Barry Song
2011-07-06 5:30 ` Grant Likely
2011-07-06 5:58 ` Barry Song
2011-07-06 6:01 ` Barry Song
2011-07-06 6:28 ` Grant Likely
2011-07-06 7:03 ` Barry Song
2011-07-06 7:40 ` Arnd Bergmann
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=201107022134.19690.arnd@arndb.de \
--to=arnd@arndb.de \
--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).