linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Roland Dreier <rdreier@cisco.com>
Cc: linuxppc-dev@ozlabs.org, Joachim Fenkes <fenkes@de.ibm.com>
Subject: Re: [PATCH] Allow drivers to map individual 4k pages to userspace
Date: Wed, 4 Apr 2007 14:41:15 +1000	[thread overview]
Message-ID: <17939.11371.206449.628682@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <adar6r0dg0q.fsf@cisco.com>

Roland Dreier writes:

> I assume this is an eHCA-specific problem.

Guilty as charged. :)

> Another approach is simply not to enable the other 4K pages that are
> exposed when mapping a 64K page into userspace - ie only use 1/16th of
> the available contexts.  Although perhaps eHCA has such a limited # of
> contexts that this is not practical.

I believe the hypervisor controls the allocation of contexts to
partitions, so this wouldn't be practical.

> The problem with this approach is that remap_4k_pfn is
> powerpc-specific, right?

It is powerpc-specific, but so is the eHCA driver...

>  For example, I don't believe that an ia64
> kernel running with 16K pages could implement this.  Which means that
> any driver that calls remap_4k_pfn is now powerpc-specific (or has an
> #ifdef to work around this).

I am a complete ia64-ignoramus, so I couldn't say whether ia64 could
do it or not.

> In fact my impression was that the powerpc MMU is not part of the
> architecture, in the sense that a new implementation could come along
> that supported 64K pages without the ability to do this 4K aliasing
> trick.  Which would make multiplatform kernels very painful, since
> remap_4k_pfn might work for some platforms the kernel could boot on.
> Or is this not a problem?

The PowerPC architecture distinguishes between server and embedded
processors.  The MMU is part of the architecture for server
processors, and is specified reasonably tightly.  For embedded there
is also a specification of the MMU but it is very loose.  In any case,
all PowerPC processors can do 4k pages, so I don't see any problem.

Paul.

      parent reply	other threads:[~2007-04-04  4:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-03 11:24 [PATCH] Allow drivers to map individual 4k pages to userspace Paul Mackerras
2007-04-04  2:34 ` Roland Dreier
2007-04-04  3:23   ` Benjamin Herrenschmidt
2007-04-04  4:07     ` Roland Dreier
2007-04-04  4:43       ` Benjamin Herrenschmidt
2007-04-04  5:14       ` Paul Mackerras
2007-04-04  4:41   ` Paul Mackerras [this message]

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=17939.11371.206449.628682@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=fenkes@de.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rdreier@cisco.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;
as well as URLs for NNTP newsgroup(s).