linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Li Yang <leoli@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Timur Tabi <timur.tabi@gmail.com>,
	Li Yang-R58472 <r58472@freescale.com>
Subject: Re: Page fault on vmalloc'ed memory
Date: Fri, 7 May 2010 15:38:51 +1000	[thread overview]
Message-ID: <20100507053851.GA25173@drongo> (raw)
In-Reply-To: <m2x2a27d3731005052128w3e9fe517ie3a068b352adb7f3@mail.gmail.com>

On Thu, May 06, 2010 at 12:28:44PM +0800, Li Yang wrote:

> The root cause of this oops might not be related with the vmalloc'ed
> area processing in Instruction Storage Interrupt.  But x86 does have
> the code for processing it while we don't.  Is it because we have
> nothing to do with the vmalloc'ed ISI on PowerPC architecture?

On PowerPC we always read the kernel page tables rooted at
swapper_pg_dir to get translations for kernel addresses (those above
KERNELBASE).  We can do that because it is kernel code (software) that
reads the Linux page tables.  On x86, it is hardware that reads the
Linux page tables, and it always reads the page tables for the current
process.  This means that the kernel part of each process's page
tables needs to contain copies of all the kernel PTEs on x86.  To
avoid having to set a PTE in every process's page tables when doing a
vmalloc or ioremap, x86 just creates them in swapper_pg_dir and then
creates them on demand in each process's page tables as needed.
That's why they have code to handle vmalloc faults in their page fault
handler.

Paul.

  reply	other threads:[~2010-05-07  5:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05  5:19 Page fault on vmalloc'ed memory Li Yang-R58472
2010-05-05 11:51 ` Timur Tabi
2010-05-06  4:28   ` Li Yang
2010-05-07  5:38     ` Paul Mackerras [this message]
2010-05-07  6:49       ` Li Yang

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=20100507053851.GA25173@drongo \
    --to=paulus@samba.org \
    --cc=leoli@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=r58472@freescale.com \
    --cc=timur.tabi@gmail.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).