linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org, hollisb@us.ibm.com
Subject: Re: [RFC][PATCH] initial port of fixmap over from x86 for ppc32
Date: Mon, 07 Apr 2008 10:43:01 +1000	[thread overview]
Message-ID: <1207528981.10388.463.camel@pasglop> (raw)
In-Reply-To: <18425.24938.332852.315571@cargo.ozlabs.ibm.com>


> You have FIX_PCIE_MCFG in there too (keyed off CONFIG_PCI_MMCONFIG
> which we don't have and don't want to have).  If you need to map in
> PCIe config space, what's wrong with just using ioremap?  Why do you
> need to have a fixed virtual address for it?

Well, that was the whole point for doing the fixmap stuff actually, to
be able to have a non-HIGHMEM version of a quick kmap_atomic for ...
PCIe config space :-)

On some PCIe host brigdes like the ones used on 4xx or FSL chips, the
config space is physically mapped as a large linear space, too large to
ioremap permanently, and we can't ioremap from within the low level
config ops.

So the idea is to use a fixmap as a "window" to the config space,
possibly per-cpu. Ultimately, we should even be able to directly insert
TLB entries in kmap_atomic/fixmap to make it even faster.

> More generally, I think we need to take an overall look at what things
> we are using fixed virtual addresses for, and why they need to be
> fixed.  If there are indeed several such things then we can introduce
> the fixmap stuff.

The virtual address doesn't _need_ to be fixed in our case. It's more
like x86 builds kmap on top of fixmap and we were thinking about doing
the same, having it fixed makes it slightly easier to whack things but I
agree it's not necessarily the best option.

We could instead have something allocated a chunk of virtual space at
boot and provide a quick map/unmap.

But by using fixmap, we can use common code with kmap_atomic quickly and
easily.

Ben.

  reply	other threads:[~2008-04-07  0:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03  6:52 [RFC][PATCH] initial port of fixmap over from x86 for ppc32 Kumar Gala
2008-04-03 18:47 ` Hollis Blanchard
2008-04-03 21:45   ` Benjamin Herrenschmidt
2008-04-06 23:48 ` Paul Mackerras
2008-04-07  0:43   ` Benjamin Herrenschmidt [this message]
2008-04-07 13:09   ` Kumar Gala
2008-04-07 16:20     ` Scott Wood
2008-04-07 21:36       ` Kumar Gala
2008-04-07 23:51       ` Benjamin Herrenschmidt
2008-04-08 14:28         ` Kumar Gala
2008-04-08 16:24           ` Scott Wood

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=1207528981.10388.463.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=hollisb@us.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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).