]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/32: Remove the 'nobats' kernel parameter
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 14 Jun 2022 10:32:23 +0000 (12:32 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 29 Jun 2022 06:59:06 +0000 (16:59 +1000)
Mapping without BATs doesn't bring any added value to the user.

Remove that option.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/6977314c823cfb728bc0273cea634b41807bfb64.1655202721.git.christophe.leroy@csgroup.eu
Documentation/admin-guide/kernel-parameters.txt
arch/powerpc/mm/book3s32/mmu.c
arch/powerpc/mm/init_32.c
arch/powerpc/mm/mmu_decl.h
arch/powerpc/platforms/83xx/misc.c

index 8090130b544b0701237a7b657a29c83c000a60f4..96de3f1ece00177d53753ea403ac05e30dcd7360 100644 (file)
 
        noautogroup     Disable scheduler automatic task group creation.
 
-       nobats          [PPC] Do not use BATs for mapping kernel lowmem
-                       on "Classic" PPC cores.
-
        nocache         [ARM]
 
        nodsp           [SH] Disable hardware DSP at boot time.
index 49a737fbbd1893627718d99638314c42d1b26f6b..1794132db31ea70cbe29939b47664d9697c6c98c 100644 (file)
@@ -161,7 +161,7 @@ unsigned long __init mmu_mapin_ram(unsigned long base, unsigned long top)
        unsigned long border = (unsigned long)__init_begin - PAGE_OFFSET;
 
 
-       if (debug_pagealloc_enabled_or_kfence() || __map_without_bats) {
+       if (debug_pagealloc_enabled_or_kfence()) {
                pr_debug_once("Read-Write memory mapped without BATs\n");
                if (base >= border)
                        return base;
index 693a3a7a9463fcede56c433f3e44f075c43c1ae0..321794747ea18a0eab7581fc3d4d1894c581c9f4 100644 (file)
@@ -69,12 +69,6 @@ EXPORT_SYMBOL(agp_special_page);
 
 void MMU_init(void);
 
-/*
- * this tells the system to map all of ram with the segregs
- * (i.e. page tables) instead of the bats.
- * -- Cort
- */
-int __map_without_bats;
 int __map_without_ltlbs;
 
 /* max amount of low RAM to map in */
@@ -85,11 +79,6 @@ unsigned long __max_low_memory = MAX_LOW_MEM;
  */
 static void __init MMU_setup(void)
 {
-       /* Check for nobats option (used in mapin_ram). */
-       if (strstr(boot_command_line, "nobats")) {
-               __map_without_bats = 1;
-       }
-
        if (strstr(boot_command_line, "noltlbs")) {
                __map_without_ltlbs = 1;
        }
index 63c4b1a4d43540da6e3d5d68d18f1c8a18defdeb..229c72e491985a90825e22a8b7768ae1f7adcded 100644 (file)
@@ -92,7 +92,6 @@ extern void mapin_ram(void);
 extern void setbat(int index, unsigned long virt, phys_addr_t phys,
                   unsigned int size, pgprot_t prot);
 
-extern int __map_without_bats;
 extern unsigned int rtas_data, rtas_size;
 
 struct hash_pte;
index 3285dabcf923bbb71282f06a7adfa3354a0b6563..2fb2a85d131fd510503d6945c40b60c791fe47df 100644 (file)
@@ -121,17 +121,15 @@ void __init mpc83xx_setup_pci(void)
 
 void __init mpc83xx_setup_arch(void)
 {
+       phys_addr_t immrbase = get_immrbase();
+       int immrsize = IS_ALIGNED(immrbase, SZ_2M) ? SZ_2M : SZ_1M;
+       unsigned long va = fix_to_virt(FIX_IMMR_BASE);
+
        if (ppc_md.progress)
                ppc_md.progress("mpc83xx_setup_arch()", 0);
 
-       if (!__map_without_bats) {
-               phys_addr_t immrbase = get_immrbase();
-               int immrsize = IS_ALIGNED(immrbase, SZ_2M) ? SZ_2M : SZ_1M;
-               unsigned long va = fix_to_virt(FIX_IMMR_BASE);
-
-               setbat(-1, va, immrbase, immrsize, PAGE_KERNEL_NCG);
-               update_bats();
-       }
+       setbat(-1, va, immrbase, immrsize, PAGE_KERNEL_NCG);
+       update_bats();
 }
 
 int machine_check_83xx(struct pt_regs *regs)