]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
powerpc/mm: make ioremap_bot common to all
authorChristophe Leroy <christophe.leroy@c-s.fr>
Tue, 20 Aug 2019 14:07:16 +0000 (14:07 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Aug 2019 03:03:34 +0000 (13:03 +1000)
Drop multiple definitions of ioremap_bot and make one common to
all subarches.

Only CONFIG_PPC_BOOK3E_64 had a global static init value for
ioremap_bot. Now ioremap_bot is set in early_init_mmu_global().

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/920eebfd9f36f14c79d1755847f5bf7c83703bdd.1566309262.git.christophe.leroy@c-s.fr
arch/powerpc/include/asm/book3s/32/pgtable.h
arch/powerpc/include/asm/book3s/64/pgtable.h
arch/powerpc/include/asm/nohash/32/pgtable.h
arch/powerpc/include/asm/pgtable.h
arch/powerpc/mm/ioremap.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/mm/nohash/tlb.c
arch/powerpc/mm/pgtable_32.c
arch/powerpc/mm/pgtable_64.c

index 838de59f6754b80ed9fb5de3ba60218c3cf57e4f..aa1bc5f8da90890a9ea687978e2427d8020fcc05 100644 (file)
@@ -201,8 +201,6 @@ int map_kernel_page(unsigned long va, phys_addr_t pa, pgprot_t prot);
 #include <linux/sched.h>
 #include <linux/threads.h>
 
-extern unsigned long ioremap_bot;
-
 /* Bits to mask out from a PGD to get to the PUD page */
 #define PGD_MASKED_BITS                0
 
index 8e47fb85dfa6ba90394592d7bf5cdfcc505de7cd..03c9a14dd9023a084a2a6df83c9578835aa2d0be 100644 (file)
@@ -289,7 +289,6 @@ extern unsigned long __kernel_io_end;
 #define KERN_IO_END __kernel_io_end
 
 extern struct page *vmemmap;
-extern unsigned long ioremap_bot;
 extern unsigned long pci_io_base;
 #endif /* __ASSEMBLY__ */
 
index 0284f8f5305f8a475f40be46b2c04be93125e296..7ce2a7c9fade15ab548d31f8d27be2820254a998 100644 (file)
@@ -11,8 +11,6 @@
 #include <asm/mmu.h>                   /* For sub-arch specific PPC_PIN_SIZE */
 #include <asm/asm-405.h>
 
-extern unsigned long ioremap_bot;
-
 #ifdef CONFIG_44x
 extern int icache_44x_need_flush;
 #endif
index c70916a7865a532f314f3038389bd89d69e2771d..8b7865a2d576630613e7a4e1a5a3ae2e3386bade 100644 (file)
@@ -68,6 +68,8 @@ extern pgd_t swapper_pg_dir[];
 
 extern void paging_init(void);
 
+extern unsigned long ioremap_bot;
+
 /*
  * kern_addr_valid is intended to indicate whether an address is a valid
  * kernel address.  Most 32-bit archs define it as always true (like this)
index 3d388aaa3ee6696768074f883b60566709c67508..eaf5f8a4a63f9c525f3128f50b5ad98b714801ef 100644 (file)
@@ -3,6 +3,9 @@
 #include <linux/io.h>
 #include <asm/io-workarounds.h>
 
+unsigned long ioremap_bot;
+EXPORT_SYMBOL(ioremap_bot);
+
 void __iomem *ioremap(phys_addr_t addr, unsigned long size)
 {
        pgprot_t prot = pgprot_noncached(PAGE_KERNEL);
index adbaf2167214ff7f219a218b89646e17c9c177a9..c750ac9ec7130ead6cf63ac3f2ff9d79cdfa833c 100644 (file)
@@ -106,7 +106,6 @@ extern u8 early_hash[];
 
 #endif /* CONFIG_PPC32 */
 
-extern unsigned long ioremap_bot;
 extern unsigned long __max_low_memory;
 extern phys_addr_t __initial_memory_limit_addr;
 extern phys_addr_t total_memory;
index bf60983a58c7818c5ba2d36471b37df45cf26c90..696f568253a0ca0ee93bc3e376284a5494a368fd 100644 (file)
@@ -703,6 +703,8 @@ static void __init early_init_mmu_global(void)
         * for use by the TLB miss code
         */
        linear_map_top = memblock_end_of_DRAM();
+
+       ioremap_bot = IOREMAP_BASE;
 }
 
 static void __init early_mmu_set_memory_limit(void)
index ac5a267467faa53b1235d6c9e063924f92df56d9..102901a19f3c9bfa520bb27365da526b6f9e2236 100644 (file)
@@ -33,9 +33,6 @@
 
 #include <mm/mmu_decl.h>
 
-unsigned long ioremap_bot;
-EXPORT_SYMBOL(ioremap_bot);    /* aka VMALLOC_END */
-
 extern char etext[], _stext[], _sinittext[], _einittext[];
 
 void __iomem *
index 2b9078e1bc43a513b49072e93bb0dedd9d3c5da8..d865e053052d7db195f78fe0051913eab75c6889 100644 (file)
@@ -98,9 +98,6 @@ unsigned long __pte_frag_nr;
 EXPORT_SYMBOL(__pte_frag_nr);
 unsigned long __pte_frag_size_shift;
 EXPORT_SYMBOL(__pte_frag_size_shift);
-unsigned long ioremap_bot;
-#else /* !CONFIG_PPC_BOOK3S_64 */
-unsigned long ioremap_bot = IOREMAP_BASE;
 #endif
 
 int __weak ioremap_range(unsigned long ea, phys_addr_t pa, unsigned long size, pgprot_t prot, int nid)