]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:10:53 +0000 (15:10 +0200)
[ Upstream commit 1ce844973bb516e95d3f2bcb001a3992548def9d ]

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
Stable-dep-of: f9f2bff64c2f ("powerpc/8xx: Fix initial memory mapping")
Signed-off-by: Sasha Levin <sashal@kernel.org>
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 cf35b2cf90c27696e9ef63e0b5aeeaeac91e4441..e2c2ccba6e388c727f188723ea72d6a127d3511a 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]
 
        noclflush       [BUGS=X86] Don't use the CLFLUSH instruction
index 692c336e4f55b6fbf8186e814b52e082d69e5100..75c7f3566664270ba701c0c0fb72b2655305ea56 100644 (file)
@@ -165,7 +165,7 @@ unsigned long __init mmu_mapin_ram(unsigned long base, unsigned long top)
        size = roundup_pow_of_two((unsigned long)_einittext - PAGE_OFFSET);
        setibat(0, PAGE_OFFSET, 0, size, PAGE_KERNEL_X);
 
-       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 3d690be48e845e303f448e4da8d03ecb7d251321..b702f2b6429578c35e7417f83a74776360d25de0 100644 (file)
@@ -70,12 +70,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 */
@@ -86,11 +80,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 21996b9e0a64f3f2723f060f6c7c07eee5d38e49..990dccf45fc130d9846bf396652e2094f8d9f279 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)