2019-03-29 10:01:58

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH v1 0/4] powerpc: Split arch/powerpc/mm/ directory

arch/powerpc/mm/ contains many files that are specific to subarches.

This series splits arch/powerpc/mm/ in three subparts:
- arch/powerpc/mm/book3s64
- arch/powerpc/mm/book3s32
- arch/powerpc/mm/nohash

Christophe Leroy (4):
powerpc/mm: change #include "mmu_decl.h" to <mm/mmu_decl.h>
powerpc/mm: Move book3s64 specifics in subdirectory mm/book3s64
powerpc/mm: Move book3s32 specifics in subdirectory mm/book3s64
powerpc/mm: Move nohash specifics in subdirectory mm/nohash

arch/powerpc/mm/Makefile | 43 ++--------------------
arch/powerpc/mm/book3s32/Makefile | 6 +++
arch/powerpc/mm/{ => book3s32}/hash_low_32.S | 0
.../powerpc/mm/{ => book3s32}/mmu_context_hash32.c | 0
arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c | 2 +-
arch/powerpc/mm/{ => book3s32}/tlb_hash32.c | 2 +-
arch/powerpc/mm/book3s64/Makefile | 28 ++++++++++++++
arch/powerpc/mm/{ => book3s64}/hash64_4k.c | 0
arch/powerpc/mm/{ => book3s64}/hash64_64k.c | 0
arch/powerpc/mm/{ => book3s64}/hash_native_64.c | 0
arch/powerpc/mm/{ => book3s64}/hash_utils_64.c | 0
arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c | 0
.../powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c | 0
arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c | 0
.../mm/{ => book3s64}/mmu_context_book3s64.c | 0
arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c | 0
arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c | 2 +-
arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c | 2 +-
arch/powerpc/mm/{ => book3s64}/pgtable-radix.c | 0
arch/powerpc/mm/{ => book3s64}/pkeys.c | 0
arch/powerpc/mm/{ => book3s64}/slb.c | 0
arch/powerpc/mm/{ => book3s64}/subpage-prot.c | 0
arch/powerpc/mm/{ => book3s64}/tlb-radix.c | 0
arch/powerpc/mm/{ => book3s64}/tlb_hash64.c | 0
arch/powerpc/mm/{ => book3s64}/vphn.c | 0
arch/powerpc/mm/{ => book3s64}/vphn.h | 0
arch/powerpc/mm/dma-noncoherent.c | 2 +-
arch/powerpc/mm/init_32.c | 2 +-
arch/powerpc/mm/init_64.c | 2 +-
arch/powerpc/mm/mem.c | 2 +-
arch/powerpc/mm/{ => nohash}/40x_mmu.c | 2 +-
arch/powerpc/mm/{ => nohash}/44x_mmu.c | 2 +-
arch/powerpc/mm/{ => nohash}/8xx_mmu.c | 2 +-
arch/powerpc/mm/nohash/Makefile | 21 +++++++++++
arch/powerpc/mm/{ => nohash}/fsl_booke_mmu.c | 2 +-
arch/powerpc/mm/{ => nohash}/hugetlbpage-book3e.c | 0
arch/powerpc/mm/{ => nohash}/mmu_context_nohash.c | 2 +-
arch/powerpc/mm/{ => nohash}/pgtable-book3e.c | 2 +-
arch/powerpc/mm/{ => nohash}/tlb_low_64e.S | 0
arch/powerpc/mm/{ => nohash}/tlb_nohash.c | 2 +-
arch/powerpc/mm/{ => nohash}/tlb_nohash_low.S | 0
arch/powerpc/mm/numa.c | 2 +-
arch/powerpc/mm/pgtable_32.c | 2 +-
arch/powerpc/mm/pgtable_64.c | 2 +-
44 files changed, 77 insertions(+), 57 deletions(-)
create mode 100644 arch/powerpc/mm/book3s32/Makefile
rename arch/powerpc/mm/{ => book3s32}/hash_low_32.S (100%)
rename arch/powerpc/mm/{ => book3s32}/mmu_context_hash32.c (100%)
rename arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c (99%)
rename arch/powerpc/mm/{ => book3s32}/tlb_hash32.c (99%)
create mode 100644 arch/powerpc/mm/book3s64/Makefile
rename arch/powerpc/mm/{ => book3s64}/hash64_4k.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hash64_64k.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hash_native_64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hash_utils_64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c (100%)
rename arch/powerpc/mm/{ => book3s64}/mmu_context_book3s64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c (100%)
rename arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c (99%)
rename arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c (99%)
rename arch/powerpc/mm/{ => book3s64}/pgtable-radix.c (100%)
rename arch/powerpc/mm/{ => book3s64}/pkeys.c (100%)
rename arch/powerpc/mm/{ => book3s64}/slb.c (100%)
rename arch/powerpc/mm/{ => book3s64}/subpage-prot.c (100%)
rename arch/powerpc/mm/{ => book3s64}/tlb-radix.c (100%)
rename arch/powerpc/mm/{ => book3s64}/tlb_hash64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/vphn.c (100%)
rename arch/powerpc/mm/{ => book3s64}/vphn.h (100%)
rename arch/powerpc/mm/{ => nohash}/40x_mmu.c (99%)
rename arch/powerpc/mm/{ => nohash}/44x_mmu.c (99%)
rename arch/powerpc/mm/{ => nohash}/8xx_mmu.c (99%)
create mode 100644 arch/powerpc/mm/nohash/Makefile
rename arch/powerpc/mm/{ => nohash}/fsl_booke_mmu.c (99%)
rename arch/powerpc/mm/{ => nohash}/hugetlbpage-book3e.c (100%)
rename arch/powerpc/mm/{ => nohash}/mmu_context_nohash.c (99%)
rename arch/powerpc/mm/{ => nohash}/pgtable-book3e.c (99%)
rename arch/powerpc/mm/{ => nohash}/tlb_low_64e.S (100%)
rename arch/powerpc/mm/{ => nohash}/tlb_nohash.c (99%)
rename arch/powerpc/mm/{ => nohash}/tlb_nohash_low.S (100%)

--
2.13.3



2019-03-29 10:01:03

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH v1 4/4] powerpc/mm: Move nohash specifics in subdirectory mm/nohash

Many files in arch/powerpc/mm are only for nohash. This patch
creates a subdirectory for them.

Signed-off-by: Christophe Leroy <[email protected]>
---
arch/powerpc/mm/Makefile | 17 +----------------
arch/powerpc/mm/{ => nohash}/40x_mmu.c | 0
arch/powerpc/mm/{ => nohash}/44x_mmu.c | 0
arch/powerpc/mm/{ => nohash}/8xx_mmu.c | 0
arch/powerpc/mm/nohash/Makefile | 21 +++++++++++++++++++++
arch/powerpc/mm/{ => nohash}/fsl_booke_mmu.c | 0
arch/powerpc/mm/{ => nohash}/hugetlbpage-book3e.c | 0
arch/powerpc/mm/{ => nohash}/mmu_context_nohash.c | 0
arch/powerpc/mm/{ => nohash}/pgtable-book3e.c | 0
arch/powerpc/mm/{ => nohash}/tlb_low_64e.S | 0
arch/powerpc/mm/{ => nohash}/tlb_nohash.c | 0
arch/powerpc/mm/{ => nohash}/tlb_nohash_low.S | 0
12 files changed, 22 insertions(+), 16 deletions(-)
rename arch/powerpc/mm/{ => nohash}/40x_mmu.c (100%)
rename arch/powerpc/mm/{ => nohash}/44x_mmu.c (100%)
rename arch/powerpc/mm/{ => nohash}/8xx_mmu.c (100%)
create mode 100644 arch/powerpc/mm/nohash/Makefile
rename arch/powerpc/mm/{ => nohash}/fsl_booke_mmu.c (100%)
rename arch/powerpc/mm/{ => nohash}/hugetlbpage-book3e.c (100%)
rename arch/powerpc/mm/{ => nohash}/mmu_context_nohash.c (100%)
rename arch/powerpc/mm/{ => nohash}/pgtable-book3e.c (100%)
rename arch/powerpc/mm/{ => nohash}/tlb_low_64e.S (100%)
rename arch/powerpc/mm/{ => nohash}/tlb_nohash.c (100%)
rename arch/powerpc/mm/{ => nohash}/tlb_nohash_low.S (100%)

diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 68cb1e840b5e..08557bae6fa1 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -8,30 +8,15 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
obj-y := fault.o mem.o pgtable.o mmap.o \
init_$(BITS).o pgtable_$(BITS).o \
init-common.o mmu_context.o drmem.o
-obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \
- tlb_nohash_low.o
-obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(BITS)e.o
-obj-$(CONFIG_PPC_BOOK3E_64) += pgtable-book3e.o
+obj-$(CONFIG_PPC_MMU_NOHASH) += nohash/
obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/
obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/
obj-$(CONFIG_PPC_BOOK3S_64) += pgtable-frag.o
obj-$(CONFIG_PPC32) += pgtable-frag.o
-obj-$(CONFIG_40x) += 40x_mmu.o
-obj-$(CONFIG_44x) += 44x_mmu.o
-obj-$(CONFIG_PPC_8xx) += 8xx_mmu.o
-obj-$(CONFIG_PPC_FSL_BOOK3E) += fsl_booke_mmu.o
obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
obj-$(CONFIG_PPC_MM_SLICES) += slice.o
obj-y += hugetlbpage.o
-ifdef CONFIG_HUGETLB_PAGE
-obj-$(CONFIG_PPC_BOOK3E_MMU) += hugetlbpage-book3e.o
-endif
obj-$(CONFIG_NOT_COHERENT_CACHE) += dma-noncoherent.o
obj-$(CONFIG_HIGHMEM) += highmem.o
obj-$(CONFIG_PPC_COPRO_BASE) += copro_fault.o
obj-$(CONFIG_PPC_PTDUMP) += ptdump/
-
-# Disable kcov instrumentation on sensitive code
-# This is necessary for booting with kcov enabled on book3e machines
-KCOV_INSTRUMENT_tlb_nohash.o := n
-KCOV_INSTRUMENT_fsl_booke_mmu.o := n
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/nohash/40x_mmu.c
similarity index 100%
rename from arch/powerpc/mm/40x_mmu.c
rename to arch/powerpc/mm/nohash/40x_mmu.c
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/nohash/44x_mmu.c
similarity index 100%
rename from arch/powerpc/mm/44x_mmu.c
rename to arch/powerpc/mm/nohash/44x_mmu.c
diff --git a/arch/powerpc/mm/8xx_mmu.c b/arch/powerpc/mm/nohash/8xx_mmu.c
similarity index 100%
rename from arch/powerpc/mm/8xx_mmu.c
rename to arch/powerpc/mm/nohash/8xx_mmu.c
diff --git a/arch/powerpc/mm/nohash/Makefile b/arch/powerpc/mm/nohash/Makefile
new file mode 100644
index 000000000000..f9f5161fd487
--- /dev/null
+++ b/arch/powerpc/mm/nohash/Makefile
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the linux ppc-specific parts of the memory manager.
+#
+
+ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
+
+obj-y += mmu_context_nohash.o tlb_nohash.o tlb_nohash_low.o
+obj-$(CONFIG_PPC_BOOK3E_64) += tlb_low_64e.o pgtable-book3e.o
+obj-$(CONFIG_40x) += 40x_mmu.o
+obj-$(CONFIG_44x) += 44x_mmu.o
+obj-$(CONFIG_PPC_8xx) += 8xx_mmu.o
+obj-$(CONFIG_PPC_FSL_BOOK3E) += fsl_booke_mmu.o
+ifdef CONFIG_HUGETLB_PAGE
+obj-$(CONFIG_PPC_BOOK3E_MMU) += hugetlbpage-book3e.o
+endif
+
+# Disable kcov instrumentation on sensitive code
+# This is necessary for booting with kcov enabled on book3e machines
+KCOV_INSTRUMENT_tlb_nohash.o := n
+KCOV_INSTRUMENT_fsl_booke_mmu.o := n
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/nohash/fsl_booke_mmu.c
similarity index 100%
rename from arch/powerpc/mm/fsl_booke_mmu.c
rename to arch/powerpc/mm/nohash/fsl_booke_mmu.c
diff --git a/arch/powerpc/mm/hugetlbpage-book3e.c b/arch/powerpc/mm/nohash/hugetlbpage-book3e.c
similarity index 100%
rename from arch/powerpc/mm/hugetlbpage-book3e.c
rename to arch/powerpc/mm/nohash/hugetlbpage-book3e.c
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/nohash/mmu_context_nohash.c
similarity index 100%
rename from arch/powerpc/mm/mmu_context_nohash.c
rename to arch/powerpc/mm/nohash/mmu_context_nohash.c
diff --git a/arch/powerpc/mm/pgtable-book3e.c b/arch/powerpc/mm/nohash/pgtable-book3e.c
similarity index 100%
rename from arch/powerpc/mm/pgtable-book3e.c
rename to arch/powerpc/mm/nohash/pgtable-book3e.c
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/nohash/tlb_low_64e.S
similarity index 100%
rename from arch/powerpc/mm/tlb_low_64e.S
rename to arch/powerpc/mm/nohash/tlb_low_64e.S
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/nohash/tlb_nohash.c
similarity index 100%
rename from arch/powerpc/mm/tlb_nohash.c
rename to arch/powerpc/mm/nohash/tlb_nohash.c
diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/nohash/tlb_nohash_low.S
similarity index 100%
rename from arch/powerpc/mm/tlb_nohash_low.S
rename to arch/powerpc/mm/nohash/tlb_nohash_low.S
--
2.13.3


2019-03-29 10:01:04

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH v1 1/4] powerpc/mm: change #include "mmu_decl.h" to <mm/mmu_decl.h>

This patch make inclusion of mmu_decl.h independant of the location
of the file including it.

Signed-off-by: Christophe Leroy <[email protected]>
---
arch/powerpc/mm/40x_mmu.c | 2 +-
arch/powerpc/mm/44x_mmu.c | 2 +-
arch/powerpc/mm/8xx_mmu.c | 2 +-
arch/powerpc/mm/dma-noncoherent.c | 2 +-
arch/powerpc/mm/fsl_booke_mmu.c | 2 +-
arch/powerpc/mm/init_32.c | 2 +-
arch/powerpc/mm/init_64.c | 2 +-
arch/powerpc/mm/mem.c | 2 +-
arch/powerpc/mm/mmu_context_nohash.c | 2 +-
arch/powerpc/mm/pgtable-book3e.c | 2 +-
arch/powerpc/mm/pgtable-book3s64.c | 2 +-
arch/powerpc/mm/pgtable-hash64.c | 2 +-
arch/powerpc/mm/pgtable_32.c | 2 +-
arch/powerpc/mm/pgtable_64.c | 2 +-
arch/powerpc/mm/ppc_mmu_32.c | 2 +-
arch/powerpc/mm/tlb_hash32.c | 2 +-
arch/powerpc/mm/tlb_nohash.c | 2 +-
17 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
index b9cf6f8764b0..460459b6f53e 100644
--- a/arch/powerpc/mm/40x_mmu.c
+++ b/arch/powerpc/mm/40x_mmu.c
@@ -49,7 +49,7 @@
#include <asm/machdep.h>
#include <asm/setup.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

extern int __map_without_ltlbs;
/*
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index aad127acdbaa..c07983ebc02e 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -31,7 +31,7 @@
#include <asm/cacheflush.h>
#include <asm/code-patching.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

/* Used by the 44x TLB replacement exception handler.
* Just needed it declared someplace.
diff --git a/arch/powerpc/mm/8xx_mmu.c b/arch/powerpc/mm/8xx_mmu.c
index fe1f6443d57f..a10f6578c58b 100644
--- a/arch/powerpc/mm/8xx_mmu.c
+++ b/arch/powerpc/mm/8xx_mmu.c
@@ -17,7 +17,7 @@
#include <asm/fixmap.h>
#include <asm/code-patching.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

#define IMMR_SIZE (FIX_IMMR_SIZE << PAGE_SHIFT)

diff --git a/arch/powerpc/mm/dma-noncoherent.c b/arch/powerpc/mm/dma-noncoherent.c
index b5d2658c26af..2f6154b76328 100644
--- a/arch/powerpc/mm/dma-noncoherent.c
+++ b/arch/powerpc/mm/dma-noncoherent.c
@@ -36,7 +36,7 @@
#include <asm/tlbflush.h>
#include <asm/dma.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

/*
* This address range defaults to a value that is safe for all
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index 210cbc1faf63..71a1a36751dd 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -54,7 +54,7 @@
#include <asm/setup.h>
#include <asm/paca.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

unsigned int tlbcam_index;

diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 41a3513cadc9..28b2c5fc772f 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -46,7 +46,7 @@
#include <asm/sections.h>
#include <asm/hugetlb.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

#if defined(CONFIG_KERNEL_START_BOOL) || defined(CONFIG_LOWMEM_SIZE_BOOL)
/* The amount of lowmem must be within 0xF0000000 - KERNELBASE. */
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index a4c155af1597..45b02fa11cd8 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -66,7 +66,7 @@
#include <asm/iommu.h>
#include <asm/vdso.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

phys_addr_t memstart_addr = ~0;
EXPORT_SYMBOL_GPL(memstart_addr);
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index f6787f90e158..0f1bd9312d9a 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -54,7 +54,7 @@
#include <asm/swiotlb.h>
#include <asm/rtas.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

#ifndef CPU_FTR_COHERENT_ICACHE
#define CPU_FTR_COHERENT_ICACHE 0 /* XXX for now */
diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index 1945c5f19f5e..ae4505d5b4b8 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -52,7 +52,7 @@
#include <asm/mmu_context.h>
#include <asm/tlbflush.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

/*
* The MPC8xx has only 16 contexts. We rotate through them on each task switch.
diff --git a/arch/powerpc/mm/pgtable-book3e.c b/arch/powerpc/mm/pgtable-book3e.c
index 1032ef7aaf62..062e4463622e 100644
--- a/arch/powerpc/mm/pgtable-book3e.c
+++ b/arch/powerpc/mm/pgtable-book3e.c
@@ -15,7 +15,7 @@
#include <asm/tlb.h>
#include <asm/dma.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

#ifdef CONFIG_SPARSEMEM_VMEMMAP
/*
diff --git a/arch/powerpc/mm/pgtable-book3s64.c b/arch/powerpc/mm/pgtable-book3s64.c
index a4341aba0af4..16bda049187a 100644
--- a/arch/powerpc/mm/pgtable-book3s64.c
+++ b/arch/powerpc/mm/pgtable-book3s64.c
@@ -17,7 +17,7 @@
#include <asm/trace.h>
#include <asm/powernv.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>
#include <trace/events/thp.h>

unsigned long __pmd_frag_nr;
diff --git a/arch/powerpc/mm/pgtable-hash64.c b/arch/powerpc/mm/pgtable-hash64.c
index c08d49046a96..9c6b09c09d50 100644
--- a/arch/powerpc/mm/pgtable-hash64.c
+++ b/arch/powerpc/mm/pgtable-hash64.c
@@ -19,7 +19,7 @@
#include <asm/mmu.h>
#include <asm/tlb.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

#define CREATE_TRACE_POINTS
#include <trace/events/thp.h>
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 6e56a6240bfa..c9cdbb84d31f 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -36,7 +36,7 @@
#include <asm/setup.h>
#include <asm/sections.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

unsigned long ioremap_bot;
EXPORT_SYMBOL(ioremap_bot); /* aka VMALLOC_END */
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index fb1375c07e8c..e1086611deca 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -52,7 +52,7 @@
#include <asm/firmware.h>
#include <asm/dma.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>


#ifdef CONFIG_PPC_BOOK3S_64
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index f29d2f118b44..1a5c9fa0e6d8 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -34,7 +34,7 @@
#include <asm/code-patching.h>
#include <asm/sections.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

struct hash_pte *Hash, *Hash_end;
unsigned long Hash_size, Hash_mask;
diff --git a/arch/powerpc/mm/tlb_hash32.c b/arch/powerpc/mm/tlb_hash32.c
index cf8472cf3d59..8d56f0417f87 100644
--- a/arch/powerpc/mm/tlb_hash32.c
+++ b/arch/powerpc/mm/tlb_hash32.c
@@ -32,7 +32,7 @@
#include <asm/tlbflush.h>
#include <asm/tlb.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

/*
* Called when unmapping pages to flush entries from the TLB/hash table.
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index ac23dc1c6535..adf894d8405f 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -46,7 +46,7 @@
#include <asm/hugetlb.h>
#include <asm/paca.h>

-#include "mmu_decl.h"
+#include <mm/mmu_decl.h>

/*
* This struct lists the sw-supported page sizes. The hardawre MMU may support
--
2.13.3


2019-03-29 10:01:09

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH v1 3/4] powerpc/mm: Move book3s32 specifics in subdirectory mm/book3s64

Several files in arch/powerpc/mm are only for book3S32. This patch
creates a subdirectory for them.

Signed-off-by: Christophe Leroy <[email protected]>
---
arch/powerpc/mm/Makefile | 3 +--
arch/powerpc/mm/book3s32/Makefile | 6 ++++++
arch/powerpc/mm/{ => book3s32}/hash_low_32.S | 0
arch/powerpc/mm/{ => book3s32}/mmu_context_hash32.c | 0
arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c | 0
arch/powerpc/mm/{ => book3s32}/tlb_hash32.c | 0
6 files changed, 7 insertions(+), 2 deletions(-)
create mode 100644 arch/powerpc/mm/book3s32/Makefile
rename arch/powerpc/mm/{ => book3s32}/hash_low_32.S (100%)
rename arch/powerpc/mm/{ => book3s32}/mmu_context_hash32.c (100%)
rename arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c (100%)
rename arch/powerpc/mm/{ => book3s32}/tlb_hash32.c (100%)

diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index a137fdf775e2..68cb1e840b5e 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -12,11 +12,10 @@ obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \
tlb_nohash_low.o
obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(BITS)e.o
obj-$(CONFIG_PPC_BOOK3E_64) += pgtable-book3e.o
+obj-$(CONFIG_PPC_BOOK3S_32) += book3s32/
obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/
obj-$(CONFIG_PPC_BOOK3S_64) += pgtable-frag.o
obj-$(CONFIG_PPC32) += pgtable-frag.o
-obj-$(CONFIG_PPC_BOOK3S_32) += ppc_mmu_32.o hash_low_32.o mmu_context_hash32.o
-obj-$(CONFIG_PPC_BOOK3S_32) += tlb_hash32.o
obj-$(CONFIG_40x) += 40x_mmu.o
obj-$(CONFIG_44x) += 44x_mmu.o
obj-$(CONFIG_PPC_8xx) += 8xx_mmu.o
diff --git a/arch/powerpc/mm/book3s32/Makefile b/arch/powerpc/mm/book3s32/Makefile
new file mode 100644
index 000000000000..7f2690d319fd
--- /dev/null
+++ b/arch/powerpc/mm/book3s32/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the linux ppc-specific parts of the memory manager.
+#
+
+obj-y += ppc_mmu_32.o hash_low_32.o mmu_context_hash32.o tlb_hash32.o
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/book3s32/hash_low_32.S
similarity index 100%
rename from arch/powerpc/mm/hash_low_32.S
rename to arch/powerpc/mm/book3s32/hash_low_32.S
diff --git a/arch/powerpc/mm/mmu_context_hash32.c b/arch/powerpc/mm/book3s32/mmu_context_hash32.c
similarity index 100%
rename from arch/powerpc/mm/mmu_context_hash32.c
rename to arch/powerpc/mm/book3s32/mmu_context_hash32.c
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/book3s32/ppc_mmu_32.c
similarity index 100%
rename from arch/powerpc/mm/ppc_mmu_32.c
rename to arch/powerpc/mm/book3s32/ppc_mmu_32.c
diff --git a/arch/powerpc/mm/tlb_hash32.c b/arch/powerpc/mm/book3s32/tlb_hash32.c
similarity index 100%
rename from arch/powerpc/mm/tlb_hash32.c
rename to arch/powerpc/mm/book3s32/tlb_hash32.c
--
2.13.3


2019-03-29 10:01:42

by Christophe Leroy

[permalink] [raw]
Subject: [PATCH v1 2/4] powerpc/mm: Move book3s64 specifics in subdirectory mm/book3s64

Many files in arch/powerpc/mm are only for book3S64. This patch
creates a subdirectory for them.

Signed-off-by: Christophe Leroy <[email protected]>
---
arch/powerpc/mm/Makefile | 25 +++----------------
arch/powerpc/mm/book3s64/Makefile | 28 ++++++++++++++++++++++
arch/powerpc/mm/{ => book3s64}/hash64_4k.c | 0
arch/powerpc/mm/{ => book3s64}/hash64_64k.c | 0
arch/powerpc/mm/{ => book3s64}/hash_native_64.c | 0
arch/powerpc/mm/{ => book3s64}/hash_utils_64.c | 0
arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c | 0
.../powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c | 0
arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c | 0
.../mm/{ => book3s64}/mmu_context_book3s64.c | 0
arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c | 0
arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c | 0
arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c | 0
arch/powerpc/mm/{ => book3s64}/pgtable-radix.c | 0
arch/powerpc/mm/{ => book3s64}/pkeys.c | 0
arch/powerpc/mm/{ => book3s64}/slb.c | 0
arch/powerpc/mm/{ => book3s64}/subpage-prot.c | 0
arch/powerpc/mm/{ => book3s64}/tlb-radix.c | 0
arch/powerpc/mm/{ => book3s64}/tlb_hash64.c | 0
arch/powerpc/mm/{ => book3s64}/vphn.c | 0
arch/powerpc/mm/{ => book3s64}/vphn.h | 0
arch/powerpc/mm/numa.c | 2 +-
22 files changed, 32 insertions(+), 23 deletions(-)
create mode 100644 arch/powerpc/mm/book3s64/Makefile
rename arch/powerpc/mm/{ => book3s64}/hash64_4k.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hash64_64k.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hash_native_64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hash_utils_64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c (100%)
rename arch/powerpc/mm/{ => book3s64}/mmu_context_book3s64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c (100%)
rename arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/pgtable-radix.c (100%)
rename arch/powerpc/mm/{ => book3s64}/pkeys.c (100%)
rename arch/powerpc/mm/{ => book3s64}/slb.c (100%)
rename arch/powerpc/mm/{ => book3s64}/subpage-prot.c (100%)
rename arch/powerpc/mm/{ => book3s64}/tlb-radix.c (100%)
rename arch/powerpc/mm/{ => book3s64}/tlb_hash64.c (100%)
rename arch/powerpc/mm/{ => book3s64}/vphn.c (100%)
rename arch/powerpc/mm/{ => book3s64}/vphn.h (100%)

diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile
index 3c1bd9fa23cd..a137fdf775e2 100644
--- a/arch/powerpc/mm/Makefile
+++ b/arch/powerpc/mm/Makefile
@@ -5,53 +5,34 @@

ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)

-CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE)
-
obj-y := fault.o mem.o pgtable.o mmap.o \
init_$(BITS).o pgtable_$(BITS).o \
init-common.o mmu_context.o drmem.o
obj-$(CONFIG_PPC_MMU_NOHASH) += mmu_context_nohash.o tlb_nohash.o \
tlb_nohash_low.o
obj-$(CONFIG_PPC_BOOK3E) += tlb_low_$(BITS)e.o
-hash64-$(CONFIG_PPC_NATIVE) := hash_native_64.o
obj-$(CONFIG_PPC_BOOK3E_64) += pgtable-book3e.o
-obj-$(CONFIG_PPC_BOOK3S_64) += pgtable-hash64.o hash_utils_64.o slb.o \
- $(hash64-y) mmu_context_book3s64.o \
- pgtable-book3s64.o pgtable-frag.o
+obj-$(CONFIG_PPC_BOOK3S_64) += book3s64/
+obj-$(CONFIG_PPC_BOOK3S_64) += pgtable-frag.o
obj-$(CONFIG_PPC32) += pgtable-frag.o
-obj-$(CONFIG_PPC_RADIX_MMU) += pgtable-radix.o tlb-radix.o
obj-$(CONFIG_PPC_BOOK3S_32) += ppc_mmu_32.o hash_low_32.o mmu_context_hash32.o
-obj-$(CONFIG_PPC_BOOK3S) += tlb_hash$(BITS).o
-ifdef CONFIG_PPC_BOOK3S_64
-obj-$(CONFIG_PPC_4K_PAGES) += hash64_4k.o
-obj-$(CONFIG_PPC_64K_PAGES) += hash64_64k.o
-endif
+obj-$(CONFIG_PPC_BOOK3S_32) += tlb_hash32.o
obj-$(CONFIG_40x) += 40x_mmu.o
obj-$(CONFIG_44x) += 44x_mmu.o
obj-$(CONFIG_PPC_8xx) += 8xx_mmu.o
obj-$(CONFIG_PPC_FSL_BOOK3E) += fsl_booke_mmu.o
obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
-obj-$(CONFIG_PPC_SPLPAR) += vphn.o
obj-$(CONFIG_PPC_MM_SLICES) += slice.o
obj-y += hugetlbpage.o
ifdef CONFIG_HUGETLB_PAGE
-obj-$(CONFIG_PPC_BOOK3S_64) += hugetlbpage-hash64.o
-obj-$(CONFIG_PPC_RADIX_MMU) += hugetlbpage-radix.o
obj-$(CONFIG_PPC_BOOK3E_MMU) += hugetlbpage-book3e.o
endif
-obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += hugepage-hash64.o
-obj-$(CONFIG_PPC_SUBPAGE_PROT) += subpage-prot.o
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) += ptdump/
-obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o

# Disable kcov instrumentation on sensitive code
# This is necessary for booting with kcov enabled on book3e machines
KCOV_INSTRUMENT_tlb_nohash.o := n
KCOV_INSTRUMENT_fsl_booke_mmu.o := n
-
-# Instrumenting the SLB fault path can lead to duplicate SLB entries
-KCOV_INSTRUMENT_slb.o := n
diff --git a/arch/powerpc/mm/book3s64/Makefile b/arch/powerpc/mm/book3s64/Makefile
new file mode 100644
index 000000000000..cfea527b66d9
--- /dev/null
+++ b/arch/powerpc/mm/book3s64/Makefile
@@ -0,0 +1,28 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for the linux ppc-specific parts of the memory manager.
+#
+
+ccflags-y := $(NO_MINIMAL_TOC)
+
+CFLAGS_REMOVE_slb.o = $(CC_FLAGS_FTRACE)
+
+obj-y += pgtable-hash64.o hash_utils_64.o slb.o \
+ mmu_context_book3s64.o pgtable-book3s64.o \
+ tlb_hash64.o
+obj-$(CONFIG_PPC_NATIVE) += hash_native_64.o
+obj-$(CONFIG_PPC_RADIX_MMU) += pgtable-radix.o tlb-radix.o
+obj-$(CONFIG_PPC_4K_PAGES) += hash64_4k.o
+obj-$(CONFIG_PPC_64K_PAGES) += hash64_64k.o
+obj-$(CONFIG_PPC_SPLPAR) += vphn.o
+obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage-hash64.o
+ifdef CONFIG_HUGETLB_PAGE
+obj-$(CONFIG_PPC_RADIX_MMU) += hugetlbpage-radix.o
+endif
+obj-$(CONFIG_TRANSPARENT_HUGEPAGE) += hugepage-hash64.o
+obj-$(CONFIG_PPC_SUBPAGE_PROT) += subpage-prot.o
+obj-$(CONFIG_SPAPR_TCE_IOMMU) += mmu_context_iommu.o
+obj-$(CONFIG_PPC_MEM_KEYS) += pkeys.o
+
+# Instrumenting the SLB fault path can lead to duplicate SLB entries
+KCOV_INSTRUMENT_slb.o := n
diff --git a/arch/powerpc/mm/hash64_4k.c b/arch/powerpc/mm/book3s64/hash64_4k.c
similarity index 100%
rename from arch/powerpc/mm/hash64_4k.c
rename to arch/powerpc/mm/book3s64/hash64_4k.c
diff --git a/arch/powerpc/mm/hash64_64k.c b/arch/powerpc/mm/book3s64/hash64_64k.c
similarity index 100%
rename from arch/powerpc/mm/hash64_64k.c
rename to arch/powerpc/mm/book3s64/hash64_64k.c
diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/book3s64/hash_native_64.c
similarity index 100%
rename from arch/powerpc/mm/hash_native_64.c
rename to arch/powerpc/mm/book3s64/hash_native_64.c
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/book3s64/hash_utils_64.c
similarity index 100%
rename from arch/powerpc/mm/hash_utils_64.c
rename to arch/powerpc/mm/book3s64/hash_utils_64.c
diff --git a/arch/powerpc/mm/hugepage-hash64.c b/arch/powerpc/mm/book3s64/hugepage-hash64.c
similarity index 100%
rename from arch/powerpc/mm/hugepage-hash64.c
rename to arch/powerpc/mm/book3s64/hugepage-hash64.c
diff --git a/arch/powerpc/mm/hugetlbpage-hash64.c b/arch/powerpc/mm/book3s64/hugetlbpage-hash64.c
similarity index 100%
rename from arch/powerpc/mm/hugetlbpage-hash64.c
rename to arch/powerpc/mm/book3s64/hugetlbpage-hash64.c
diff --git a/arch/powerpc/mm/hugetlbpage-radix.c b/arch/powerpc/mm/book3s64/hugetlbpage-radix.c
similarity index 100%
rename from arch/powerpc/mm/hugetlbpage-radix.c
rename to arch/powerpc/mm/book3s64/hugetlbpage-radix.c
diff --git a/arch/powerpc/mm/mmu_context_book3s64.c b/arch/powerpc/mm/book3s64/mmu_context_book3s64.c
similarity index 100%
rename from arch/powerpc/mm/mmu_context_book3s64.c
rename to arch/powerpc/mm/book3s64/mmu_context_book3s64.c
diff --git a/arch/powerpc/mm/mmu_context_iommu.c b/arch/powerpc/mm/book3s64/mmu_context_iommu.c
similarity index 100%
rename from arch/powerpc/mm/mmu_context_iommu.c
rename to arch/powerpc/mm/book3s64/mmu_context_iommu.c
diff --git a/arch/powerpc/mm/pgtable-book3s64.c b/arch/powerpc/mm/book3s64/pgtable-book3s64.c
similarity index 100%
rename from arch/powerpc/mm/pgtable-book3s64.c
rename to arch/powerpc/mm/book3s64/pgtable-book3s64.c
diff --git a/arch/powerpc/mm/pgtable-hash64.c b/arch/powerpc/mm/book3s64/pgtable-hash64.c
similarity index 100%
rename from arch/powerpc/mm/pgtable-hash64.c
rename to arch/powerpc/mm/book3s64/pgtable-hash64.c
diff --git a/arch/powerpc/mm/pgtable-radix.c b/arch/powerpc/mm/book3s64/pgtable-radix.c
similarity index 100%
rename from arch/powerpc/mm/pgtable-radix.c
rename to arch/powerpc/mm/book3s64/pgtable-radix.c
diff --git a/arch/powerpc/mm/pkeys.c b/arch/powerpc/mm/book3s64/pkeys.c
similarity index 100%
rename from arch/powerpc/mm/pkeys.c
rename to arch/powerpc/mm/book3s64/pkeys.c
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/book3s64/slb.c
similarity index 100%
rename from arch/powerpc/mm/slb.c
rename to arch/powerpc/mm/book3s64/slb.c
diff --git a/arch/powerpc/mm/subpage-prot.c b/arch/powerpc/mm/book3s64/subpage-prot.c
similarity index 100%
rename from arch/powerpc/mm/subpage-prot.c
rename to arch/powerpc/mm/book3s64/subpage-prot.c
diff --git a/arch/powerpc/mm/tlb-radix.c b/arch/powerpc/mm/book3s64/tlb-radix.c
similarity index 100%
rename from arch/powerpc/mm/tlb-radix.c
rename to arch/powerpc/mm/book3s64/tlb-radix.c
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/book3s64/tlb_hash64.c
similarity index 100%
rename from arch/powerpc/mm/tlb_hash64.c
rename to arch/powerpc/mm/book3s64/tlb_hash64.c
diff --git a/arch/powerpc/mm/vphn.c b/arch/powerpc/mm/book3s64/vphn.c
similarity index 100%
rename from arch/powerpc/mm/vphn.c
rename to arch/powerpc/mm/book3s64/vphn.c
diff --git a/arch/powerpc/mm/vphn.h b/arch/powerpc/mm/book3s64/vphn.h
similarity index 100%
rename from arch/powerpc/mm/vphn.h
rename to arch/powerpc/mm/book3s64/vphn.h
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index f976676004ad..6ef516718da3 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1063,7 +1063,7 @@ u64 memory_hotplug_max(void)
/* Virtual Processor Home Node (VPHN) support */
#ifdef CONFIG_PPC_SPLPAR

-#include "vphn.h"
+#include "book3s64/vphn.h"

struct topology_update_data {
struct topology_update_data *next;
--
2.13.3


2019-05-02 07:14:02

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 2/4] powerpc/mm: Move book3s64 specifics in subdirectory mm/book3s64

Christophe Leroy <[email protected]> writes:

> Many files in arch/powerpc/mm are only for book3S64. This patch
> creates a subdirectory for them.
>
> Signed-off-by: Christophe Leroy <[email protected]>
> ---
> arch/powerpc/mm/Makefile | 25 +++----------------
> arch/powerpc/mm/book3s64/Makefile | 28 ++++++++++++++++++++++
> arch/powerpc/mm/{ => book3s64}/hash64_4k.c | 0
> arch/powerpc/mm/{ => book3s64}/hash64_64k.c | 0
> arch/powerpc/mm/{ => book3s64}/hash_native_64.c | 0
> arch/powerpc/mm/{ => book3s64}/hash_utils_64.c | 0
> arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c | 0
> .../powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c | 0
> arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c | 0
> .../mm/{ => book3s64}/mmu_context_book3s64.c | 0
> arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c | 0
> arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c | 0
> arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c | 0
> arch/powerpc/mm/{ => book3s64}/pgtable-radix.c | 0
> arch/powerpc/mm/{ => book3s64}/pkeys.c | 0
> arch/powerpc/mm/{ => book3s64}/slb.c | 0
> arch/powerpc/mm/{ => book3s64}/subpage-prot.c | 0
> arch/powerpc/mm/{ => book3s64}/tlb-radix.c | 0
> arch/powerpc/mm/{ => book3s64}/tlb_hash64.c | 0
> arch/powerpc/mm/{ => book3s64}/vphn.c | 0
> arch/powerpc/mm/{ => book3s64}/vphn.h | 0
> arch/powerpc/mm/numa.c | 2 +-
> 22 files changed, 32 insertions(+), 23 deletions(-)
> create mode 100644 arch/powerpc/mm/book3s64/Makefile
> rename arch/powerpc/mm/{ => book3s64}/hash64_4k.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/hash64_64k.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/hash_native_64.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/hash_utils_64.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/mmu_context_book3s64.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/pgtable-radix.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/pkeys.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/slb.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/subpage-prot.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/tlb-radix.c (100%)
> rename arch/powerpc/mm/{ => book3s64}/tlb_hash64.c (100%)

Do you mind if I take this but rework the destination names in the process?

I don't like having eg. book3s64/pgtable-book3s64.c

And some of the other names could use a bit of cleanup too.

What about:

arch/powerpc/mm/{hash64_4k.c => book3s64/hash_4k.c}
arch/powerpc/mm/{hash64_64k.c => book3s64/hash_64k.c}
arch/powerpc/mm/{hugepage-hash64.c => book3s64/hash_hugepage.c}
arch/powerpc/mm/{hugetlbpage-hash64.c => book3s64/hash_hugetlbpage.c}
arch/powerpc/mm/{hash_native_64.c => book3s64/hash_native.c}
arch/powerpc/mm/{pgtable-hash64.c => book3s64/hash_pgtable.c}
arch/powerpc/mm/{tlb_hash64.c => book3s64/hash_tlb.c}
arch/powerpc/mm/{hash_utils_64.c => book3s64/hash_utils.c}
arch/powerpc/mm/{mmu_context_iommu.c => book3s64/iommu_api.c}
arch/powerpc/mm/{mmu_context_book3s64.c => book3s64/mmu_context.c}
arch/powerpc/mm/{pgtable-book3s64.c => book3s64/pgtable.c}
arch/powerpc/mm/{hugetlbpage-radix.c => book3s64/radix_hugetlbpage.c}
arch/powerpc/mm/{pgtable-radix.c => book3s64/radix_pgtable.c}
arch/powerpc/mm/{tlb-radix.c => book3s64/radix_tlb.c}

cheers

2019-05-02 07:16:14

by Christophe Leroy

[permalink] [raw]
Subject: Re: [PATCH v1 2/4] powerpc/mm: Move book3s64 specifics in subdirectory mm/book3s64



Le 02/05/2019 à 09:11, Michael Ellerman a écrit :
> Christophe Leroy <[email protected]> writes:
>
>> Many files in arch/powerpc/mm are only for book3S64. This patch
>> creates a subdirectory for them.
>>
>> Signed-off-by: Christophe Leroy <[email protected]>
>> ---
>> arch/powerpc/mm/Makefile | 25 +++----------------
>> arch/powerpc/mm/book3s64/Makefile | 28 ++++++++++++++++++++++
>> arch/powerpc/mm/{ => book3s64}/hash64_4k.c | 0
>> arch/powerpc/mm/{ => book3s64}/hash64_64k.c | 0
>> arch/powerpc/mm/{ => book3s64}/hash_native_64.c | 0
>> arch/powerpc/mm/{ => book3s64}/hash_utils_64.c | 0
>> arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c | 0
>> .../powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c | 0
>> arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c | 0
>> .../mm/{ => book3s64}/mmu_context_book3s64.c | 0
>> arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c | 0
>> arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c | 0
>> arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c | 0
>> arch/powerpc/mm/{ => book3s64}/pgtable-radix.c | 0
>> arch/powerpc/mm/{ => book3s64}/pkeys.c | 0
>> arch/powerpc/mm/{ => book3s64}/slb.c | 0
>> arch/powerpc/mm/{ => book3s64}/subpage-prot.c | 0
>> arch/powerpc/mm/{ => book3s64}/tlb-radix.c | 0
>> arch/powerpc/mm/{ => book3s64}/tlb_hash64.c | 0
>> arch/powerpc/mm/{ => book3s64}/vphn.c | 0
>> arch/powerpc/mm/{ => book3s64}/vphn.h | 0
>> arch/powerpc/mm/numa.c | 2 +-
>> 22 files changed, 32 insertions(+), 23 deletions(-)
>> create mode 100644 arch/powerpc/mm/book3s64/Makefile
>> rename arch/powerpc/mm/{ => book3s64}/hash64_4k.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/hash64_64k.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/hash_native_64.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/hash_utils_64.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/mmu_context_book3s64.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/pgtable-radix.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/pkeys.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/slb.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/subpage-prot.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/tlb-radix.c (100%)
>> rename arch/powerpc/mm/{ => book3s64}/tlb_hash64.c (100%)
>
> Do you mind if I take this but rework the destination names in the process?

I don't mind, I think it's a good idea.

>
> I don't like having eg. book3s64/pgtable-book3s64.c
>
> And some of the other names could use a bit of cleanup too.
>
> What about:
>
> arch/powerpc/mm/{hash64_4k.c => book3s64/hash_4k.c}
> arch/powerpc/mm/{hash64_64k.c => book3s64/hash_64k.c}
> arch/powerpc/mm/{hugepage-hash64.c => book3s64/hash_hugepage.c}
> arch/powerpc/mm/{hugetlbpage-hash64.c => book3s64/hash_hugetlbpage.c}
> arch/powerpc/mm/{hash_native_64.c => book3s64/hash_native.c}
> arch/powerpc/mm/{pgtable-hash64.c => book3s64/hash_pgtable.c}
> arch/powerpc/mm/{tlb_hash64.c => book3s64/hash_tlb.c}
> arch/powerpc/mm/{hash_utils_64.c => book3s64/hash_utils.c}
> arch/powerpc/mm/{mmu_context_iommu.c => book3s64/iommu_api.c}
> arch/powerpc/mm/{mmu_context_book3s64.c => book3s64/mmu_context.c}
> arch/powerpc/mm/{pgtable-book3s64.c => book3s64/pgtable.c}
> arch/powerpc/mm/{hugetlbpage-radix.c => book3s64/radix_hugetlbpage.c}
> arch/powerpc/mm/{pgtable-radix.c => book3s64/radix_pgtable.c}
> arch/powerpc/mm/{tlb-radix.c => book3s64/radix_tlb.c}

Looks good

Christophe

2019-05-02 11:17:18

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 2/4] powerpc/mm: Move book3s64 specifics in subdirectory mm/book3s64

Christophe Leroy <[email protected]> writes:
> Le 02/05/2019 à 09:11, Michael Ellerman a écrit :
>> Christophe Leroy <[email protected]> writes:
>>
>>> Many files in arch/powerpc/mm are only for book3S64. This patch
>>> creates a subdirectory for them.
>>>
>>> Signed-off-by: Christophe Leroy <[email protected]>
>>> ---
>>> arch/powerpc/mm/Makefile | 25 +++----------------
>>> arch/powerpc/mm/book3s64/Makefile | 28 ++++++++++++++++++++++
>>> arch/powerpc/mm/{ => book3s64}/hash64_4k.c | 0
>>> arch/powerpc/mm/{ => book3s64}/hash64_64k.c | 0
>>> arch/powerpc/mm/{ => book3s64}/hash_native_64.c | 0
>>> arch/powerpc/mm/{ => book3s64}/hash_utils_64.c | 0
>>> arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c | 0
>>> .../powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c | 0
>>> arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c | 0
>>> .../mm/{ => book3s64}/mmu_context_book3s64.c | 0
>>> arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c | 0
>>> arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c | 0
>>> arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c | 0
>>> arch/powerpc/mm/{ => book3s64}/pgtable-radix.c | 0
>>> arch/powerpc/mm/{ => book3s64}/pkeys.c | 0
>>> arch/powerpc/mm/{ => book3s64}/slb.c | 0
>>> arch/powerpc/mm/{ => book3s64}/subpage-prot.c | 0
>>> arch/powerpc/mm/{ => book3s64}/tlb-radix.c | 0
>>> arch/powerpc/mm/{ => book3s64}/tlb_hash64.c | 0
>>> arch/powerpc/mm/{ => book3s64}/vphn.c | 0
>>> arch/powerpc/mm/{ => book3s64}/vphn.h | 0
>>> arch/powerpc/mm/numa.c | 2 +-
>>> 22 files changed, 32 insertions(+), 23 deletions(-)
>>> create mode 100644 arch/powerpc/mm/book3s64/Makefile
>>> rename arch/powerpc/mm/{ => book3s64}/hash64_4k.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/hash64_64k.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/hash_native_64.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/hash_utils_64.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/hugepage-hash64.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-hash64.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/hugetlbpage-radix.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/mmu_context_book3s64.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/mmu_context_iommu.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/pgtable-book3s64.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/pgtable-hash64.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/pgtable-radix.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/pkeys.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/slb.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/subpage-prot.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/tlb-radix.c (100%)
>>> rename arch/powerpc/mm/{ => book3s64}/tlb_hash64.c (100%)
>>
>> Do you mind if I take this but rework the destination names in the process?
>
> I don't mind, I think it's a good idea.
>
>>
>> I don't like having eg. book3s64/pgtable-book3s64.c
>>
>> And some of the other names could use a bit of cleanup too.
>>
>> What about:
>>
>> arch/powerpc/mm/{hash64_4k.c => book3s64/hash_4k.c}
>> arch/powerpc/mm/{hash64_64k.c => book3s64/hash_64k.c}
>> arch/powerpc/mm/{hugepage-hash64.c => book3s64/hash_hugepage.c}
>> arch/powerpc/mm/{hugetlbpage-hash64.c => book3s64/hash_hugetlbpage.c}
>> arch/powerpc/mm/{hash_native_64.c => book3s64/hash_native.c}
>> arch/powerpc/mm/{pgtable-hash64.c => book3s64/hash_pgtable.c}
>> arch/powerpc/mm/{tlb_hash64.c => book3s64/hash_tlb.c}
>> arch/powerpc/mm/{hash_utils_64.c => book3s64/hash_utils.c}
>> arch/powerpc/mm/{mmu_context_iommu.c => book3s64/iommu_api.c}
>> arch/powerpc/mm/{mmu_context_book3s64.c => book3s64/mmu_context.c}
>> arch/powerpc/mm/{pgtable-book3s64.c => book3s64/pgtable.c}
>> arch/powerpc/mm/{hugetlbpage-radix.c => book3s64/radix_hugetlbpage.c}
>> arch/powerpc/mm/{pgtable-radix.c => book3s64/radix_pgtable.c}
>> arch/powerpc/mm/{tlb-radix.c => book3s64/radix_tlb.c}
>
> Looks good

Thanks. I'll do something similar for 32-bit & nohash.

cheers

2019-05-02 11:34:16

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 3/4] powerpc/mm: Move book3s32 specifics in subdirectory mm/book3s64

Christophe Leroy <[email protected]> writes:

> Several files in arch/powerpc/mm are only for book3S32. This patch
> creates a subdirectory for them.
>
> Signed-off-by: Christophe Leroy <[email protected]>
> ---
> arch/powerpc/mm/Makefile | 3 +--
> arch/powerpc/mm/book3s32/Makefile | 6 ++++++
> arch/powerpc/mm/{ => book3s32}/hash_low_32.S | 0
> arch/powerpc/mm/{ => book3s32}/mmu_context_hash32.c | 0
> arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c | 0
> arch/powerpc/mm/{ => book3s32}/tlb_hash32.c | 0
> 6 files changed, 7 insertions(+), 2 deletions(-)
> create mode 100644 arch/powerpc/mm/book3s32/Makefile
> rename arch/powerpc/mm/{ => book3s32}/hash_low_32.S (100%)
> rename arch/powerpc/mm/{ => book3s32}/mmu_context_hash32.c (100%)
> rename arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c (100%)
> rename arch/powerpc/mm/{ => book3s32}/tlb_hash32.c (100%)

I shortened them to:

arch/powerpc/mm/{hash_low_32.S => book3s32/hash_low.S}
arch/powerpc/mm/{ppc_mmu_32.c => book3s32/mmu.c}
arch/powerpc/mm/{mmu_context_hash32.c => book3s32/mmu_context.c}
arch/powerpc/mm/{tlb_hash32.c => book3s32/tlb.c}

cheers

2019-05-02 11:44:15

by Christophe Leroy

[permalink] [raw]
Subject: Re: [PATCH v1 3/4] powerpc/mm: Move book3s32 specifics in subdirectory mm/book3s64



Le 02/05/2019 à 13:32, Michael Ellerman a écrit :
> Christophe Leroy <[email protected]> writes:
>
>> Several files in arch/powerpc/mm are only for book3S32. This patch
>> creates a subdirectory for them.
>>
>> Signed-off-by: Christophe Leroy <[email protected]>
>> ---
>> arch/powerpc/mm/Makefile | 3 +--
>> arch/powerpc/mm/book3s32/Makefile | 6 ++++++
>> arch/powerpc/mm/{ => book3s32}/hash_low_32.S | 0
>> arch/powerpc/mm/{ => book3s32}/mmu_context_hash32.c | 0
>> arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c | 0
>> arch/powerpc/mm/{ => book3s32}/tlb_hash32.c | 0
>> 6 files changed, 7 insertions(+), 2 deletions(-)
>> create mode 100644 arch/powerpc/mm/book3s32/Makefile
>> rename arch/powerpc/mm/{ => book3s32}/hash_low_32.S (100%)
>> rename arch/powerpc/mm/{ => book3s32}/mmu_context_hash32.c (100%)
>> rename arch/powerpc/mm/{ => book3s32}/ppc_mmu_32.c (100%)
>> rename arch/powerpc/mm/{ => book3s32}/tlb_hash32.c (100%)
>
> I shortened them to:
>
> arch/powerpc/mm/{hash_low_32.S => book3s32/hash_low.S}
> arch/powerpc/mm/{ppc_mmu_32.c => book3s32/mmu.c}

To be consistent with what you did in nohash/ dir, shouldn't we rename
the above 'ppc.c' or 'ppc_32.c' instead of 'mmu.c' ?

Christophe

> arch/powerpc/mm/{mmu_context_hash32.c => book3s32/mmu_context.c}
> arch/powerpc/mm/{tlb_hash32.c => book3s32/tlb.c}
>
> cheers
>

2019-05-02 11:47:04

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 4/4] powerpc/mm: Move nohash specifics in subdirectory mm/nohash

Christophe Leroy <[email protected]> writes:

> Many files in arch/powerpc/mm are only for nohash. This patch
> creates a subdirectory for them.
>
> Signed-off-by: Christophe Leroy <[email protected]>
> ---
> arch/powerpc/mm/Makefile | 17 +----------------
> arch/powerpc/mm/{ => nohash}/40x_mmu.c | 0
> arch/powerpc/mm/{ => nohash}/44x_mmu.c | 0
> arch/powerpc/mm/{ => nohash}/8xx_mmu.c | 0
> arch/powerpc/mm/nohash/Makefile | 21 +++++++++++++++++++++
> arch/powerpc/mm/{ => nohash}/fsl_booke_mmu.c | 0
> arch/powerpc/mm/{ => nohash}/hugetlbpage-book3e.c | 0
> arch/powerpc/mm/{ => nohash}/mmu_context_nohash.c | 0
> arch/powerpc/mm/{ => nohash}/pgtable-book3e.c | 0
> arch/powerpc/mm/{ => nohash}/tlb_low_64e.S | 0
> arch/powerpc/mm/{ => nohash}/tlb_nohash.c | 0
> arch/powerpc/mm/{ => nohash}/tlb_nohash_low.S | 0
> 12 files changed, 22 insertions(+), 16 deletions(-)
> rename arch/powerpc/mm/{ => nohash}/40x_mmu.c (100%)
> rename arch/powerpc/mm/{ => nohash}/44x_mmu.c (100%)
> rename arch/powerpc/mm/{ => nohash}/8xx_mmu.c (100%)
> create mode 100644 arch/powerpc/mm/nohash/Makefile
> rename arch/powerpc/mm/{ => nohash}/fsl_booke_mmu.c (100%)
> rename arch/powerpc/mm/{ => nohash}/hugetlbpage-book3e.c (100%)
> rename arch/powerpc/mm/{ => nohash}/mmu_context_nohash.c (100%)
> rename arch/powerpc/mm/{ => nohash}/pgtable-book3e.c (100%)
> rename arch/powerpc/mm/{ => nohash}/tlb_low_64e.S (100%)
> rename arch/powerpc/mm/{ => nohash}/tlb_nohash.c (100%)
> rename arch/powerpc/mm/{ => nohash}/tlb_nohash_low.S (100%)

I went with:

arch/powerpc/mm/{40x_mmu.c => nohash/40x.c}
arch/powerpc/mm/{44x_mmu.c => nohash/44x.c}
arch/powerpc/mm/{8xx_mmu.c => nohash/8xx.c}
arch/powerpc/mm/{hugetlbpage-book3e.c => nohash/book3e_hugetlbpage.c}
arch/powerpc/mm/{pgtable-book3e.c => nohash/book3e_pgtable.c}
arch/powerpc/mm/{fsl_booke_mmu.c => nohash/fsl_booke.c}
arch/powerpc/mm/{mmu_context_nohash.c => nohash/mmu_context.c}
arch/powerpc/mm/{tlb_nohash.c => nohash/tlb.c}
arch/powerpc/mm/{tlb_nohash_low.S => nohash/tlb_low.S}
arch/powerpc/mm/{ => nohash}/tlb_low_64e.S

cheers

2019-05-03 07:02:46

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH v1 1/4] powerpc/mm: change #include "mmu_decl.h" to <mm/mmu_decl.h>

On Fri, 2019-03-29 at 09:59:59 UTC, Christophe Leroy wrote:
> This patch make inclusion of mmu_decl.h independant of the location
> of the file including it.
>
> Signed-off-by: Christophe Leroy <[email protected]>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9d9f2cccde952126185e3336af0d4dc6

cheers