linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] [POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers
Date: Fri, 12 Oct 2007 06:56:24 -0500	[thread overview]
Message-ID: <1192190184.3061.27.camel@localhost.localdomain> (raw)
In-Reply-To: <20071012033032.GH21056@localhost.localdomain>

On Fri, 2007-10-12 at 13:30 +1000, David Gibson wrote:
> On Thu, Oct 11, 2007 at 01:42:30PM -0500, Kumar Gala wrote:
> > Move to using PAGE_OFFSET instead of TASK_SIZE or KERNELBASE value on
> > 6xx/40x/44x/fsl-booke to determine if the faulting address is a kernel or
> > user space address.  This mimics how the macro is_kernel_addr()
> > works.
> 
> Actually it's ambiguous whether TASK_SIZE or PAGE_OFFSET is correct in
> most of these cases (KERNELBASE is certainly wrong, though).
> 
> TASK_SIZE is the top of the userspace mapped area, PAGE_OFFSET is the
> bottom of the linear mapping.  So, strictly speaking there are 3 paths
> for the miss handlers: < TASK_SIZE => user mapping, >= PAGE_OFFSET =>
> kernel mapping, between the two => immediate fault.
> 
> We get away with a two way comparison on 32-bit because, a) they have
> the same value and b) none of the pagetables, user or kernel, should
> have any entries in the in between region so we'll end up in
> do_page_fault in the end, anyway.

Kumar's other patch removes the gap.  He changed the default
CONFIG_TASK_SIZE to 0xc0000000.

josh

  reply	other threads:[~2007-10-12 11:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11 18:42 [PATCH] [POWERPC] Use PAGE_OFFSET to tell if an address is user/kernel in SW TLB handlers Kumar Gala
2007-10-12  3:30 ` David Gibson
2007-10-12 11:56   ` Josh Boyer [this message]
2007-10-15  0:54     ` David Gibson
2007-10-15  1:01       ` Josh Boyer
2007-10-15  1:45         ` David Gibson
2007-10-15  2:05           ` Michael Ellerman

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=1192190184.3061.27.camel@localhost.localdomain \
    --to=jwboyer@linux.vnet.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=linuxppc-dev@ozlabs.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).