powerpc/xmon: Support dumping software pagetables
authorBalbir Singh <bsingharora@gmail.com>
Mon, 30 Oct 2017 11:01:12 +0000 (22:01 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 8 Nov 2017 11:04:10 +0000 (22:04 +1100)
commit80eff6c484799722736471d15ff9cc86b64cae7a
treeaff3a289bfa6621b42359d0b4e97154805ea09a7
parentbf751e30b41cdf2568cccaf5de4156a3d78683df
powerpc/xmon: Support dumping software pagetables

It would be nice to be able to dump page tables in a particular
context.

eg: dumping vmalloc space:

  0:mon> dv 0xd00037fffff00000
  pgd  @ 0xc0000000017c0000
  pgdp @ 0xc0000000017c00d8 = 0x00000000f10b1000
  pudp @ 0xc0000000f10b13f8 = 0x00000000f10d0000
  pmdp @ 0xc0000000f10d1ff8 = 0x00000000f1102000
  ptep @ 0xc0000000f1102780 = 0xc0000000f1ba018e
  Maps physical address = 0x00000000f1ba0000
  Flags = Accessed Dirty Read Write

This patch does not replicate the complex code of dump_pagetable and
has no support for bolted linear mapping, thats why I've it's called
dump virtual page table support. The format of the PTE can be expanded
even further to add more useful information about the flags in the PTE
if required.

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
[mpe: Bike shed the output format, show the pgdir, fix build failures]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/xmon/xmon.c