ARM: add support to dump the kernel page tables

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Oct 24 17:31:38 EDT 2013


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.



More information about the linux-arm-kernel mailing list