OpenCloudOS-Kernel/arch/arm64/mm
Mark Rutland 48dd73c55d arm64: mm: dump: log span level
The page table dump code logs spans of entries at the same level
(pgd/pud/pmd/pte) which have the same attributes. While we log the
(decoded) attributes, we don't log the level, which leaves the output
ambiguous and/or confusing in some cases.

For example:

0xffff800800000000-0xffff800980000000           6G       RW NX SHD AF        BLK UXN MEM/NORMAL

If using 4K pages, this may describe a span of 6 1G block entries at the
PGD/PUD level, or 3072 2M block entries at the PMD level.

This patch adds the page table level to each output line, removing this
ambiguity. For the example above, this will produce:

0xffffffc800000000-0xffffffc980000000           6G PUD       RW NX SHD AF        BLK UXN MEM/NORMAL

When 3 level tables are in use, and we use the asm-generic/nopud.h
definitions, the dump code treats each entry in the PGD as a 1 element
table at the PUD level, and logs spans as being PUDs, which can be
confusing. To counteract this, the "PUD" mnemonic is replaced with "PGD"
when CONFIG_PGTABLE_LEVELS <= 3. Likewise for "PMD" when
CONFIG_PGTABLE_LEVELS <= 2.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Huang Shijie <shijie.huang@arm.com>
Cc: Laura Abbott <labbott@fedoraproject.org>
Cc: Steve Capper <steve.capper@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-06-03 10:16:22 +01:00
..
Makefile arm64, numa: Add NUMA support for arm64 platforms. 2016-04-15 18:06:09 +01:00
cache.S arm64: Fold proc-macros.S into assembler.h 2016-04-28 12:05:45 +01:00
context.c arm64: Add cpu_panic_kernel helper 2016-04-15 18:06:06 +01:00
copypage.c arm64: Defer dcache flush in __cpu_copy_user_page 2015-12-17 11:07:13 +00:00
dma-mapping.c IOMMU Updates for Linux v4.7 2016-05-19 17:07:04 -07:00
dump.c arm64: mm: dump: log span level 2016-06-03 10:16:22 +01:00
extable.c arm64: switch to relative exception tables 2016-02-24 14:57:26 +00:00
fault.c arm64: mm: remove the redundant code 2016-04-19 09:52:51 +01:00
flush.c arm64: mm: allow preemption in copy_to_user_page 2016-03-24 16:32:54 +00:00
hugetlbpage.c Revert "arm64: hugetlb: partial revert of 66b3923a1a0f" 2016-05-31 11:00:09 +01:00
init.c arm64: mm: Show bss segment in kernel memory layout 2016-04-19 17:03:31 +01:00
ioremap.c arm64: add ioremap physical address information 2015-01-23 15:29:06 +00:00
kasan_init.c arm64: kasan: Fix zero shadow mapping overriding kernel image shadow 2016-03-11 11:03:35 +00:00
mm.h arm64: Move unflatten_device_tree() call earlier. 2016-04-15 18:06:08 +01:00
mmap.c arm64: mm: remove unnecessary EXPORT_SYMBOL_GPL 2016-05-05 09:49:38 +01:00
mmu.c arm64: Move unflatten_device_tree() call earlier. 2016-04-15 18:06:08 +01:00
numa.c arm64, numa: Add NUMA support for arm64 platforms. 2016-04-15 18:06:09 +01:00
pageattr.c arm64: Add support for ARCH_SUPPORTS_DEBUG_PAGEALLOC 2016-02-16 15:40:30 +00:00
pgd.c arm64: mm: move pgd_cache initialisation to pgtable_cache_init 2016-01-05 15:43:10 +00:00
proc.S arm64: Change cpu_resume() to enable mmu early then access sleep_sp by va 2016-04-28 12:05:46 +01:00