linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM: add support to dump the kernel page tables
Date: Thu, 24 Oct 2013 22:31:38 +0100	[thread overview]
Message-ID: <20131024213138.GP16735@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20131024162542.GA32124@linaro.org>

On Thu, Oct 24, 2013 at 05:25:43PM +0100, Steve Capper wrote:
> Hi,
> for LPAE:
> I want pmd_large to return true for all non-zero pmds that have bit #1
> clear.
>  
> Clearing bit #0 of a pmd produces a faulting entry, and this is how
> PROT_NONE protection is enforced by huge pages.
> 
> pmd_sect will return false for non-zero pmds that have both bit #0 and
> bit #1 clear, thus will return false for some huge pages.

Well, consider that we want to move this code out of arch/arm and into
generic code - when that happens architectures should just have to
provide some data (the data to interpret the bitfields and memory
sections) to this code.

Therefore, we need pmd_large() to have the same semantics across all
architectures, and we can't use ARMs pmd_sect() - ARMs sections have
no meaning on other architectures, and the established macro which
should return true for large pages is pmd_large().

If there's the possibility for pmd_none(pmd) && pmd_large(pmd) to
return true, but the entry contains something which is not a section
descriptor, and ARM will be incompatible with other stuff and it will
stand in the way of moving this to generic code.

Really, I don't think ARM can be different with its definition of
pmd_large() even though generic code does not yet make use of this
macro.

  reply	other threads:[~2013-10-24 21:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-24  7:16 ARM: add support to dump the kernel page tables Russell King - ARM Linux
2013-10-24 10:51 ` Steve Capper
2013-10-24 12:23   ` Russell King - ARM Linux
2013-10-24 12:55     ` Steve Capper
2013-10-24 15:49       ` Russell King - ARM Linux
2013-10-24 16:25         ` Steve Capper
2013-10-24 21:31           ` Russell King - ARM Linux [this message]
2013-10-31 17:28 ` Laura Abbott
2013-10-31 17:40   ` Russell King - ARM Linux
2013-11-26 13:50 ` Uwe Kleine-König

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=20131024213138.GP16735@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).