2019-02-18 12:36:52

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH] 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 <[email protected]>
---
arch/powerpc/Kconfig.debug | 4 ----
arch/powerpc/mm/Makefile | 10 +---------
arch/powerpc/mm/ptdump/Makefile | 9 +++++++++
arch/powerpc/mm/{ => ptdump}/dump_bats.c | 0
arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c | 0
arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c | 0
arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c | 0
arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c | 0
arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c | 0
arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h | 0
arch/powerpc/mm/{ => ptdump}/dump_sr.c | 0
11 files changed, 10 insertions(+), 13 deletions(-)
create mode 100644 arch/powerpc/mm/ptdump/Makefile
rename arch/powerpc/mm/{ => ptdump}/dump_bats.c (100%)
rename arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c (100%)
rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c (100%)
rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c (100%)
rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c (100%)
rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c (100%)
rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h (100%)
rename arch/powerpc/mm/{ => ptdump}/dump_sr.c (100%)

diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index f4961fbcb48d..4e00cb0a5464 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -361,10 +361,6 @@ config PPC_PTDUMP

If you are unsure, say N.

-config PPC_HTDUMP
- def_bool y
- depends on PPC_PTDUMP && PPC_BOOK3S_64
-
config PPC_FAST_ENDIAN_SWITCH
bool "Deprecated fast endian-switch syscall"
depends on DEBUG_KERNEL && PPC_BOOK3S_64
diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index d974f7bcb177..ab2ed80d224d 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -47,14 +47,6 @@ obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
obj-$(CONFIG_HIGHMEM) += highmem.o
obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o
-obj-$(CONFIG_PPC_PTDUMP) += dump_linuxpagetables.o
-ifdef CONFIG_PPC_PTDUMP
-obj-$(CONFIG_4xx) += dump_linuxpagetables-generic.o
-obj-$(CONFIG_PPC_8xx) += dump_linuxpagetables-8xx.o
-obj-$(CONFIG_PPC_BOOK3E_MMU) += dump_linuxpagetables-generic.o
-obj-$(CONFIG_PPC_BOOK3S_32) += dump_linuxpagetables-generic.o dump_bats.o dump_sr.o
-obj-$(CONFIG_PPC_BOOK3S_64) += dump_linuxpagetables-book3s64.o
-endif
-obj-$(CONFIG_PPC_HTDUMP) += dump_hashpagetable.o
+obj-$(CONFIG_PPC_PTDUMP) += ptdump/
obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
obj-$(CONFIG_KASAN) += kasan/
diff --git a/arch/powerpc/mm/ptdump/Makefile b/arch/powerpc/mm/ptdump/Makefile
new file mode 100644
index 000000000000..c60578d16ac4
--- /dev/null
+++ b/arch/powerpc/mm/ptdump/Makefile
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-y += dump_linuxpagetables.o
+
+obj-$(CONFIG_4xx) += dump_linuxpagetables-generic.o
+obj-$(CONFIG_PPC_8xx) += dump_linuxpagetables-8xx.o
+obj-$(CONFIG_PPC_BOOK3E_MMU) += dump_linuxpagetables-generic.o
+obj-$(CONFIG_PPC_BOOK3S_32) += dump_linuxpagetables-generic.o dump_bats.o dump_sr.o
+obj-$(CONFIG_PPC_BOOK3S_64) += dump_linuxpagetables-book3s64.o dump_hashpagetable.o
diff --git a/arch/powerpc/mm/dump_bats.c b/arch/powerpc/mm/ptdump/dump_bats.c
similarity index 100%
rename from arch/powerpc/mm/dump_bats.c
rename to arch/powerpc/mm/ptdump/dump_bats.c
diff --git a/arch/powerpc/mm/dump_hashpagetable.c b/arch/powerpc/mm/ptdump/dump_hashpagetable.c
similarity index 100%
rename from arch/powerpc/mm/dump_hashpagetable.c
rename to arch/powerpc/mm/ptdump/dump_hashpagetable.c
diff --git a/arch/powerpc/mm/dump_linuxpagetables-8xx.c b/arch/powerpc/mm/ptdump/dump_linuxpagetables-8xx.c
similarity index 100%
rename from arch/powerpc/mm/dump_linuxpagetables-8xx.c
rename to arch/powerpc/mm/ptdump/dump_linuxpagetables-8xx.c
diff --git a/arch/powerpc/mm/dump_linuxpagetables-book3s64.c b/arch/powerpc/mm/ptdump/dump_linuxpagetables-book3s64.c
similarity index 100%
rename from arch/powerpc/mm/dump_linuxpagetables-book3s64.c
rename to arch/powerpc/mm/ptdump/dump_linuxpagetables-book3s64.c
diff --git a/arch/powerpc/mm/dump_linuxpagetables-generic.c b/arch/powerpc/mm/ptdump/dump_linuxpagetables-generic.c
similarity index 100%
rename from arch/powerpc/mm/dump_linuxpagetables-generic.c
rename to arch/powerpc/mm/ptdump/dump_linuxpagetables-generic.c
diff --git a/arch/powerpc/mm/dump_linuxpagetables.c b/arch/powerpc/mm/ptdump/dump_linuxpagetables.c
similarity index 100%
rename from arch/powerpc/mm/dump_linuxpagetables.c
rename to arch/powerpc/mm/ptdump/dump_linuxpagetables.c
diff --git a/arch/powerpc/mm/dump_linuxpagetables.h b/arch/powerpc/mm/ptdump/dump_linuxpagetables.h
similarity index 100%
rename from arch/powerpc/mm/dump_linuxpagetables.h
rename to arch/powerpc/mm/ptdump/dump_linuxpagetables.h
diff --git a/arch/powerpc/mm/dump_sr.c b/arch/powerpc/mm/ptdump/dump_sr.c
similarity index 100%
rename from arch/powerpc/mm/dump_sr.c
rename to arch/powerpc/mm/ptdump/dump_sr.c
--
2.13.3



2019-02-20 13:39:17

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH] powerpc: Move page table dump files in a dedicated subdirectory

Christophe Leroy <[email protected]> writes:

> 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 <[email protected]>
> ---
> arch/powerpc/Kconfig.debug | 4 ----
> arch/powerpc/mm/Makefile | 10 +---------
> arch/powerpc/mm/ptdump/Makefile | 9 +++++++++
> arch/powerpc/mm/{ => ptdump}/dump_bats.c | 0
> arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c | 0
> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c | 0
> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c | 0
> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c | 0
> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c | 0
> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h | 0
> arch/powerpc/mm/{ => ptdump}/dump_sr.c | 0
> 11 files changed, 10 insertions(+), 13 deletions(-)
> create mode 100644 arch/powerpc/mm/ptdump/Makefile
> rename arch/powerpc/mm/{ => ptdump}/dump_bats.c (100%)
> rename arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c (100%)
> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c (100%)
> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c (100%)
> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c (100%)
> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c (100%)
> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h (100%)
> rename arch/powerpc/mm/{ => ptdump}/dump_sr.c (100%)

I'd like to shorten the file names as well, now that they're namespaced
in the ptdump directory, how about:

arch/powerpc/Kconfig.debug | 4 ----
arch/powerpc/mm/Makefile | 10 +---------
arch/powerpc/mm/{dump_linuxpagetables-8xx.c => ptdump/8xx.c} | 2 +-
arch/powerpc/mm/ptdump/Makefile | 9 +++++++++
arch/powerpc/mm/{dump_bats.c => ptdump/bats.c} | 0
arch/powerpc/mm/{dump_linuxpagetables-book3s64.c => ptdump/book3s64.c} | 2 +-
arch/powerpc/mm/{dump_hashpagetable.c => ptdump/hashpagetable.c} | 0
arch/powerpc/mm/{dump_linuxpagetables.c => ptdump/ptdump.c} | 2 +-
arch/powerpc/mm/{dump_linuxpagetables.h => ptdump/ptdump.h} | 0
arch/powerpc/mm/{dump_sr.c => ptdump/segment_regs.c} | 0
arch/powerpc/mm/{dump_linuxpagetables-generic.c => ptdump/shared.c} | 2 +-


cheers

2019-02-20 14:01:46

by Christophe Leroy

[permalink] [raw]
Subject: Re: [PATCH] powerpc: Move page table dump files in a dedicated subdirectory



Le 20/02/2019 à 14:37, Michael Ellerman a écrit :
> Christophe Leroy <[email protected]> writes:
>
>> 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 <[email protected]>
>> ---
>> arch/powerpc/Kconfig.debug | 4 ----
>> arch/powerpc/mm/Makefile | 10 +---------
>> arch/powerpc/mm/ptdump/Makefile | 9 +++++++++
>> arch/powerpc/mm/{ => ptdump}/dump_bats.c | 0
>> arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c | 0
>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c | 0
>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c | 0
>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c | 0
>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c | 0
>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h | 0
>> arch/powerpc/mm/{ => ptdump}/dump_sr.c | 0
>> 11 files changed, 10 insertions(+), 13 deletions(-)
>> create mode 100644 arch/powerpc/mm/ptdump/Makefile
>> rename arch/powerpc/mm/{ => ptdump}/dump_bats.c (100%)
>> rename arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c (100%)
>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c (100%)
>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c (100%)
>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c (100%)
>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c (100%)
>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h (100%)
>> rename arch/powerpc/mm/{ => ptdump}/dump_sr.c (100%)
>
> I'd like to shorten the file names as well, now that they're namespaced
> in the ptdump directory, how about:
>
> arch/powerpc/Kconfig.debug | 4 ----
> arch/powerpc/mm/Makefile | 10 +---------
> arch/powerpc/mm/{dump_linuxpagetables-8xx.c => ptdump/8xx.c} | 2 +-
> arch/powerpc/mm/ptdump/Makefile | 9 +++++++++
> arch/powerpc/mm/{dump_bats.c => ptdump/bats.c} | 0
> arch/powerpc/mm/{dump_linuxpagetables-book3s64.c => ptdump/book3s64.c} | 2 +-
> arch/powerpc/mm/{dump_hashpagetable.c => ptdump/hashpagetable.c} | 0
> arch/powerpc/mm/{dump_linuxpagetables.c => ptdump/ptdump.c} | 2 +-
> arch/powerpc/mm/{dump_linuxpagetables.h => ptdump/ptdump.h} | 0
> arch/powerpc/mm/{dump_sr.c => ptdump/segment_regs.c} | 0
> arch/powerpc/mm/{dump_linuxpagetables-generic.c => ptdump/shared.c} | 2 +-

Yes good idea. Do you want a v2 or will you do it ?

Christophe

>
>
> cheers
>

2019-02-21 09:13:55

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH] powerpc: Move page table dump files in a dedicated subdirectory

Christophe Leroy <[email protected]> writes:
> Le 20/02/2019 à 14:37, Michael Ellerman a écrit :
>> Christophe Leroy <[email protected]> writes:
>>
>>> 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 <[email protected]>
>>> ---
>>> arch/powerpc/Kconfig.debug | 4 ----
>>> arch/powerpc/mm/Makefile | 10 +---------
>>> arch/powerpc/mm/ptdump/Makefile | 9 +++++++++
>>> arch/powerpc/mm/{ => ptdump}/dump_bats.c | 0
>>> arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c | 0
>>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c | 0
>>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c | 0
>>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c | 0
>>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c | 0
>>> arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h | 0
>>> arch/powerpc/mm/{ => ptdump}/dump_sr.c | 0
>>> 11 files changed, 10 insertions(+), 13 deletions(-)
>>> create mode 100644 arch/powerpc/mm/ptdump/Makefile
>>> rename arch/powerpc/mm/{ => ptdump}/dump_bats.c (100%)
>>> rename arch/powerpc/mm/{ => ptdump}/dump_hashpagetable.c (100%)
>>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-8xx.c (100%)
>>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-book3s64.c (100%)
>>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables-generic.c (100%)
>>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.c (100%)
>>> rename arch/powerpc/mm/{ => ptdump}/dump_linuxpagetables.h (100%)
>>> rename arch/powerpc/mm/{ => ptdump}/dump_sr.c (100%)
>>
>> I'd like to shorten the file names as well, now that they're namespaced
>> in the ptdump directory, how about:
>>
>> arch/powerpc/Kconfig.debug | 4 ----
>> arch/powerpc/mm/Makefile | 10 +---------
>> arch/powerpc/mm/{dump_linuxpagetables-8xx.c => ptdump/8xx.c} | 2 +-
>> arch/powerpc/mm/ptdump/Makefile | 9 +++++++++
>> arch/powerpc/mm/{dump_bats.c => ptdump/bats.c} | 0
>> arch/powerpc/mm/{dump_linuxpagetables-book3s64.c => ptdump/book3s64.c} | 2 +-
>> arch/powerpc/mm/{dump_hashpagetable.c => ptdump/hashpagetable.c} | 0
>> arch/powerpc/mm/{dump_linuxpagetables.c => ptdump/ptdump.c} | 2 +-
>> arch/powerpc/mm/{dump_linuxpagetables.h => ptdump/ptdump.h} | 0
>> arch/powerpc/mm/{dump_sr.c => ptdump/segment_regs.c} | 0
>> arch/powerpc/mm/{dump_linuxpagetables-generic.c => ptdump/shared.c} | 2 +-
>
> Yes good idea. Do you want a v2 or will you do it ?

I'll do it, thanks.

cheers

2019-02-22 09:49:14

by Michael Ellerman

[permalink] [raw]
Subject: Re: powerpc: Move page table dump files in a dedicated subdirectory

On Mon, 2019-02-18 at 12:28:36 UTC, Christophe Leroy wrote:
> 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 <[email protected]>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/5df1cfa433945bbe10ea04e8d2733f8e

cheers