Commit dd5ac03e authored by Michael Ellerman's avatar Michael Ellerman

powerpc/mm: Fix page table dump build on non-Book3S

In the recent commit 1515ab93 ("powerpc/mm: Dump hash table") we
added code to dump the hage page table. Currently this can be selected
to build on any platform. However it breaks the build if we're building
for a non-Book3S platform, because none of the hash page table related
defines and so on exist. So restrict it to building only on Book3S.

Similarly in commit 8eb07b18 ("powerpc/mm: Dump linux pagetables")
we added code to dump the Linux page tables, which uses some constants
which are only defined on Book3S - so guard those with an #ifdef.

Fixes: 1515ab93 ("powerpc/mm: Dump hash table")
Fixes: 8eb07b18 ("powerpc/mm: Dump linux pagetables")
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 6dff5b67
...@@ -366,4 +366,8 @@ config PPC_PTDUMP ...@@ -366,4 +366,8 @@ config PPC_PTDUMP
If you are unsure, say N. If you are unsure, say N.
config PPC_HTDUMP
def_bool y
depends on PPC_PTDUMP && PPC_BOOK3S
endmenu endmenu
...@@ -42,5 +42,5 @@ obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o ...@@ -42,5 +42,5 @@ obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
obj-$(CONFIG_HIGHMEM) += highmem.o obj-$(CONFIG_HIGHMEM) += highmem.o
obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o
obj-$(CONFIG_PPC_PTDUMP) += dump_linuxpagetables.o \ obj-$(CONFIG_PPC_PTDUMP) += dump_linuxpagetables.o
dump_hashpagetable.o obj-$(CONFIG_PPC_HTDUMP) += dump_hashpagetable.o
...@@ -159,6 +159,7 @@ static const struct flag_info flag_array[] = { ...@@ -159,6 +159,7 @@ static const struct flag_info flag_array[] = {
.set = "no cache", .set = "no cache",
.clear = " ", .clear = " ",
}, { }, {
#ifdef CONFIG_PPC_BOOK3S_64
.mask = H_PAGE_BUSY, .mask = H_PAGE_BUSY,
.val = H_PAGE_BUSY, .val = H_PAGE_BUSY,
.set = "busy", .set = "busy",
...@@ -183,6 +184,7 @@ static const struct flag_info flag_array[] = { ...@@ -183,6 +184,7 @@ static const struct flag_info flag_array[] = {
.val = H_PAGE_F_SECOND, .val = H_PAGE_F_SECOND,
.set = "f_second", .set = "f_second",
}, { }, {
#endif
.mask = _PAGE_SPECIAL, .mask = _PAGE_SPECIAL,
.val = _PAGE_SPECIAL, .val = _PAGE_SPECIAL,
.set = "special", .set = "special",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment