Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Move page table dump files in a dedicated subdirectory

This patch moves the files related to page table dump in a
dedicated subdirectory.

The purpose is to clean a bit arch/powerpc/mm by regrouping
multiple files handling a dedicated function.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Shorten the file names while we're at it]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Christophe Leroy and committed by
Michael Ellerman
e66c3209 cabe8138

+36 -39
-4
arch/powerpc/Kconfig.debug
··· 361 361 362 362 If you are unsure, say N. 363 363 364 - config PPC_HTDUMP 365 - def_bool y 366 - depends on PPC_PTDUMP && PPC_BOOK3S_64 367 - 368 364 config PPC_FAST_ENDIAN_SWITCH 369 365 bool "Deprecated fast endian-switch syscall" 370 366 depends on DEBUG_KERNEL && PPC_BOOK3S_64
+1 -9
arch/powerpc/mm/Makefile
··· 45 45 obj-$(CONFIG_HIGHMEM) += highmem.o 46 46 obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o 47 47 obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o 48 - obj-$(CONFIG_PPC_PTDUMP) += dump_linuxpagetables.o 49 - ifdef CONFIG_PPC_PTDUMP 50 - obj-$(CONFIG_4xx) += dump_linuxpagetables-generic.o 51 - obj-$(CONFIG_PPC_8xx) += dump_linuxpagetables-8xx.o 52 - obj-$(CONFIG_PPC_BOOK3E_MMU) += dump_linuxpagetables-generic.o 53 - obj-$(CONFIG_PPC_BOOK3S_32) += dump_linuxpagetables-generic.o dump_bats.o dump_sr.o 54 - obj-$(CONFIG_PPC_BOOK3S_64) += dump_linuxpagetables-book3s64.o 55 - endif 56 - obj-$(CONFIG_PPC_HTDUMP) += dump_hashpagetable.o 48 + obj-$(CONFIG_PPC_PTDUMP) += ptdump/ 57 49 obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
arch/powerpc/mm/dump_bats.c arch/powerpc/mm/ptdump/bats.c
arch/powerpc/mm/dump_hashpagetable.c arch/powerpc/mm/ptdump/hashpagetable.c
+11 -13
arch/powerpc/mm/dump_linuxpagetables-8xx.c arch/powerpc/mm/ptdump/shared.c
··· 7 7 #include <linux/kernel.h> 8 8 #include <asm/pgtable.h> 9 9 10 - #include "dump_linuxpagetables.h" 10 + #include "ptdump.h" 11 11 12 12 static const struct flag_info flag_array[] = { 13 13 { 14 - .mask = _PAGE_SH, 15 - .val = 0, 14 + .mask = _PAGE_USER, 15 + .val = _PAGE_USER, 16 16 .set = "user", 17 17 .clear = " ", 18 18 }, { 19 - .mask = _PAGE_RO | _PAGE_NA, 20 - .val = 0, 19 + .mask = _PAGE_RW, 20 + .val = _PAGE_RW, 21 21 .set = "rw", 22 - }, { 23 - .mask = _PAGE_RO | _PAGE_NA, 24 - .val = _PAGE_RO, 25 - .set = "r ", 26 - }, { 27 - .mask = _PAGE_RO | _PAGE_NA, 28 - .val = _PAGE_NA, 29 - .set = " ", 22 + .clear = "r ", 30 23 }, { 31 24 .mask = _PAGE_EXEC, 32 25 .val = _PAGE_EXEC, ··· 45 52 .val = _PAGE_ACCESSED, 46 53 .set = "accessed", 47 54 .clear = " ", 55 + }, { 56 + .mask = _PAGE_WRITETHRU, 57 + .val = _PAGE_WRITETHRU, 58 + .set = "write through", 59 + .clear = " ", 48 60 }, { 49 61 .mask = _PAGE_NO_CACHE, 50 62 .val = _PAGE_NO_CACHE,
+1 -1
arch/powerpc/mm/dump_linuxpagetables-book3s64.c arch/powerpc/mm/ptdump/book3s64.c
··· 7 7 #include <linux/kernel.h> 8 8 #include <asm/pgtable.h> 9 9 10 - #include "dump_linuxpagetables.h" 10 + #include "ptdump.h" 11 11 12 12 static const struct flag_info flag_array[] = { 13 13 {
+13 -11
arch/powerpc/mm/dump_linuxpagetables-generic.c arch/powerpc/mm/ptdump/8xx.c
··· 7 7 #include <linux/kernel.h> 8 8 #include <asm/pgtable.h> 9 9 10 - #include "dump_linuxpagetables.h" 10 + #include "ptdump.h" 11 11 12 12 static const struct flag_info flag_array[] = { 13 13 { 14 - .mask = _PAGE_USER, 15 - .val = _PAGE_USER, 14 + .mask = _PAGE_SH, 15 + .val = 0, 16 16 .set = "user", 17 17 .clear = " ", 18 18 }, { 19 - .mask = _PAGE_RW, 20 - .val = _PAGE_RW, 19 + .mask = _PAGE_RO | _PAGE_NA, 20 + .val = 0, 21 21 .set = "rw", 22 - .clear = "r ", 22 + }, { 23 + .mask = _PAGE_RO | _PAGE_NA, 24 + .val = _PAGE_RO, 25 + .set = "r ", 26 + }, { 27 + .mask = _PAGE_RO | _PAGE_NA, 28 + .val = _PAGE_NA, 29 + .set = " ", 23 30 }, { 24 31 .mask = _PAGE_EXEC, 25 32 .val = _PAGE_EXEC, ··· 52 45 .val = _PAGE_ACCESSED, 53 46 .set = "accessed", 54 47 .clear = " ", 55 - }, { 56 - .mask = _PAGE_WRITETHRU, 57 - .val = _PAGE_WRITETHRU, 58 - .set = "write through", 59 - .clear = " ", 60 48 }, { 61 49 .mask = _PAGE_NO_CACHE, 62 50 .val = _PAGE_NO_CACHE,
+1 -1
arch/powerpc/mm/dump_linuxpagetables.c arch/powerpc/mm/ptdump/ptdump.c
··· 28 28 #include <asm/page.h> 29 29 #include <asm/pgalloc.h> 30 30 31 - #include "dump_linuxpagetables.h" 31 + #include "ptdump.h" 32 32 33 33 #ifdef CONFIG_PPC32 34 34 #define KERN_VIRT_START 0
arch/powerpc/mm/dump_linuxpagetables.h arch/powerpc/mm/ptdump/ptdump.h
arch/powerpc/mm/dump_sr.c arch/powerpc/mm/ptdump/segment_regs.c
+9
arch/powerpc/mm/ptdump/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + obj-y += ptdump.o 4 + 5 + obj-$(CONFIG_4xx) += shared.o 6 + obj-$(CONFIG_PPC_8xx) += 8xx.o 7 + obj-$(CONFIG_PPC_BOOK3E_MMU) += shared.o 8 + obj-$(CONFIG_PPC_BOOK3S_32) += shared.o bats.o segment_regs.o 9 + obj-$(CONFIG_PPC_BOOK3S_64) += book3s64.o hashpagetable.o