Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Remove CONFIG_FSL_BOOKE

PPC_85xx is PPC32 only.
PPC_85xx always selects E500 and is the only PPC32 that
selects E500.
FSL_BOOKE is selected when E500 and PPC32 are selected.

So FSL_BOOKE is redundant with PPC_85xx.

Remove FSL_BOOKE.

And rename four files accordingly.

cpu_setup_fsl_booke.S is not renamed because it is linked to
PPC_FSL_BOOK3E and not to FSL_BOOKE as suggested by its name.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/08e3e15594e66d63b9e89c5b4f9c35153913c28f.1663606875.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
dfc3095c e320a76d

+51 -56
+14 -14
arch/powerpc/Kconfig
··· 135 135 select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64 136 136 select ARCH_HAS_SET_MEMORY 137 137 select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION 138 - select ARCH_HAS_STRICT_KERNEL_RWX if FSL_BOOKE && !HIBERNATION && !RANDOMIZE_BASE 138 + select ARCH_HAS_STRICT_KERNEL_RWX if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE 139 139 select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX 140 140 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST 141 141 select ARCH_HAS_UACCESS_FLUSHCACHE ··· 548 548 549 549 config KEXEC 550 550 bool "kexec system call" 551 - depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E 551 + depends on (PPC_BOOK3S || PPC_85xx || (44x && !SMP)) || PPC_BOOK3E 552 552 select KEXEC_CORE 553 553 help 554 554 kexec is a system call that implements the ability to shutdown your ··· 583 583 584 584 config RELOCATABLE 585 585 bool "Build a relocatable kernel" 586 - depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE)) 586 + depends on PPC64 || (FLATMEM && (44x || PPC_85xx)) 587 587 select NONSTATIC_KERNEL 588 588 help 589 589 This builds a kernel image that is capable of running at the ··· 606 606 607 607 config RANDOMIZE_BASE 608 608 bool "Randomize the address of the kernel image" 609 - depends on (FSL_BOOKE && FLATMEM && PPC32) 609 + depends on (PPC_85xx && FLATMEM && PPC32) 610 610 depends on RELOCATABLE 611 611 help 612 612 Randomizes the virtual address at which the kernel image is ··· 625 625 626 626 config CRASH_DUMP 627 627 bool "Build a dump capture kernel" 628 - depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP) 629 - select RELOCATABLE if PPC64 || 44x || FSL_BOOKE 628 + depends on PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP) 629 + select RELOCATABLE if PPC64 || 44x || PPC_85xx 630 630 help 631 631 Build a kernel suitable for use as a dump capture kernel. 632 632 The same kernel binary can be used as production kernel and dump ··· 815 815 depends on ADVANCED_OPTIONS 816 816 depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE 817 817 depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX) || \ 818 - FSL_BOOKE 818 + PPC_85xx 819 819 help 820 820 This option allows you to set the kernel data alignment. When 821 821 RAM is mapped by blocks, the alignment needs to fit the size and ··· 828 828 default 24 if STRICT_KERNEL_RWX && PPC64 829 829 range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32 830 830 range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx 831 - range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && FSL_BOOKE 831 + range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx 832 832 default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32 833 833 default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32 834 834 default 23 if STRICT_KERNEL_RWX && PPC_8xx 835 835 default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA 836 836 default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx 837 - default 24 if STRICT_KERNEL_RWX && FSL_BOOKE 837 + default 24 if STRICT_KERNEL_RWX && PPC_85xx 838 838 default PPC_PAGE_SHIFT 839 839 help 840 840 On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO. ··· 1150 1150 1151 1151 config LOWMEM_CAM_NUM_BOOL 1152 1152 bool "Set number of CAMs to use to map low memory" 1153 - depends on ADVANCED_OPTIONS && FSL_BOOKE 1153 + depends on ADVANCED_OPTIONS && PPC_85xx 1154 1154 help 1155 1155 This option allows you to set the maximum number of CAM slots that 1156 1156 will be used to map low memory. There are a limited number of slots ··· 1161 1161 Say N here unless you know what you are doing. 1162 1162 1163 1163 config LOWMEM_CAM_NUM 1164 - depends on FSL_BOOKE 1164 + depends on PPC_85xx 1165 1165 int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL 1166 1166 default 3 if !STRICT_KERNEL_RWX 1167 1167 default 9 if DATA_SHIFT >= 24 ··· 1170 1170 1171 1171 config DYNAMIC_MEMSTART 1172 1172 bool "Enable page aligned dynamic load address for kernel" 1173 - depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x) 1173 + depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x) 1174 1174 select NONSTATIC_KERNEL 1175 1175 help 1176 1176 This option enables the kernel to be loaded at any page aligned ··· 1219 1219 1220 1220 config PHYSICAL_START_BOOL 1221 1221 bool "Set physical address where the kernel is loaded" 1222 - depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE 1222 + depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx 1223 1223 help 1224 1224 This gives the physical address where the kernel is loaded. 1225 1225 ··· 1232 1232 1233 1233 config PHYSICAL_ALIGN 1234 1234 hex 1235 - default "0x04000000" if FSL_BOOKE 1235 + default "0x04000000" if PPC_85xx 1236 1236 help 1237 1237 This value puts the alignment restrictions on physical address 1238 1238 where kernel is loaded and run from. Kernel is compiled for an
+1 -1
arch/powerpc/Makefile
··· 231 231 head-$(CONFIG_PPC_8xx) := arch/powerpc/kernel/head_8xx.o 232 232 head-$(CONFIG_40x) := arch/powerpc/kernel/head_40x.o 233 233 head-$(CONFIG_44x) := arch/powerpc/kernel/head_44x.o 234 - head-$(CONFIG_FSL_BOOKE) := arch/powerpc/kernel/head_fsl_booke.o 234 + head-$(CONFIG_PPC_85xx) := arch/powerpc/kernel/head_85xx.o 235 235 236 236 head-$(CONFIG_PPC64) += arch/powerpc/kernel/entry_64.o 237 237 head-$(CONFIG_PPC_FPU) += arch/powerpc/kernel/fpu.o
+1 -1
arch/powerpc/include/asm/kexec.h
··· 3 3 #define _ASM_POWERPC_KEXEC_H 4 4 #ifdef __KERNEL__ 5 5 6 - #if defined(CONFIG_FSL_BOOKE) || defined(CONFIG_44x) 6 + #if defined(CONFIG_PPC_85xx) || defined(CONFIG_44x) 7 7 8 8 /* 9 9 * On FSL-BookE we setup a 1:1 mapping which covers the first 2GiB of memory
+3 -3
arch/powerpc/include/asm/nohash/32/pgtable.h
··· 130 130 #include <asm/nohash/32/pte-40x.h> 131 131 #elif defined(CONFIG_44x) 132 132 #include <asm/nohash/32/pte-44x.h> 133 - #elif defined(CONFIG_FSL_BOOKE) && defined(CONFIG_PTE_64BIT) 133 + #elif defined(CONFIG_PPC_85xx) && defined(CONFIG_PTE_64BIT) 134 134 #include <asm/nohash/pte-book3e.h> 135 - #elif defined(CONFIG_FSL_BOOKE) 136 - #include <asm/nohash/32/pte-fsl-booke.h> 135 + #elif defined(CONFIG_PPC_85xx) 136 + #include <asm/nohash/32/pte-85xx.h> 137 137 #elif defined(CONFIG_PPC_8xx) 138 138 #include <asm/nohash/32/pte-8xx.h> 139 139 #endif
+3 -3
arch/powerpc/include/asm/nohash/32/pte-fsl-booke.h arch/powerpc/include/asm/nohash/32/pte-85xx.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H 3 - #define _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H 2 + #ifndef _ASM_POWERPC_NOHASH_32_PTE_85xx_H 3 + #define _ASM_POWERPC_NOHASH_32_PTE_85xx_H 4 4 #ifdef __KERNEL__ 5 5 6 6 /* PTE bit definitions for Freescale BookE SW loaded TLB MMU based ··· 71 71 #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_USER | _PAGE_EXEC) 72 72 73 73 #endif /* __KERNEL__ */ 74 - #endif /* _ASM_POWERPC_NOHASH_32_PTE_FSL_BOOKE_H */ 74 + #endif /* _ASM_POWERPC_NOHASH_32_PTE_FSL_85xx_H */
+1 -1
arch/powerpc/include/asm/nohash/tlbflush.h
··· 18 18 /* 19 19 * TLB flushing for software loaded TLB chips 20 20 * 21 - * TODO: (CONFIG_FSL_BOOKE) determine if flush_tlb_range & 21 + * TODO: (CONFIG_PPC_85xx) determine if flush_tlb_range & 22 22 * flush_tlb_kernel_range are best implemented as tlbia vs 23 23 * specific tlbie's 24 24 */
+3 -3
arch/powerpc/kernel/Makefile
··· 106 106 obj-$(CONFIG_PPC_BOOK3S_32) += idle_6xx.o l2cr_6xx.o cpu_setup_6xx.o 107 107 obj-$(CONFIG_TAU) += tau_6xx.o 108 108 obj-$(CONFIG_HIBERNATION) += swsusp.o suspend.o 109 - ifdef CONFIG_FSL_BOOKE 110 - obj-$(CONFIG_HIBERNATION) += swsusp_booke.o 109 + ifdef CONFIG_PPC_85xx 110 + obj-$(CONFIG_HIBERNATION) += swsusp_85xx.o 111 111 else 112 112 obj-$(CONFIG_HIBERNATION) += swsusp_$(BITS).o 113 113 endif ··· 122 122 extra-$(CONFIG_PPC_BOOK3S_32) := head_book3s_32.o 123 123 extra-$(CONFIG_40x) := head_40x.o 124 124 extra-$(CONFIG_44x) := head_44x.o 125 - extra-$(CONFIG_FSL_BOOKE) := head_fsl_booke.o 125 + extra-$(CONFIG_PPC_85xx) := head_85xx.o 126 126 extra-$(CONFIG_PPC_8xx) := head_8xx.o 127 127 extra-y += vmlinux.lds 128 128
arch/powerpc/kernel/fsl_booke_entry_mapping.S arch/powerpc/kernel/85xx_entry_mapping.S
+2 -2
arch/powerpc/kernel/head_fsl_booke.S arch/powerpc/kernel/head_85xx.S
··· 129 129 130 130 /* 131 131 * For the second relocation, we already set the right tlb entries 132 - * for the kernel space, so skip the code in fsl_booke_entry_mapping.S 132 + * for the kernel space, so skip the code in 85xx_entry_mapping.S 133 133 */ 134 134 cmpwi r19,1 135 135 beq set_ivor ··· 159 159 lwz r20,0(r20) 160 160 161 161 #define ENTRY_MAPPING_BOOT_SETUP 162 - #include "fsl_booke_entry_mapping.S" 162 + #include "85xx_entry_mapping.S" 163 163 #undef ENTRY_MAPPING_BOOT_SETUP 164 164 165 165 set_ivor:
+6 -6
arch/powerpc/kernel/kgdb.c
··· 47 47 { 0x0c00, 0x14 /* SIGCHLD */ }, /* system call */ 48 48 #ifdef CONFIG_BOOKE_OR_40x 49 49 { 0x2002, 0x05 /* SIGTRAP */ }, /* debug */ 50 - #if defined(CONFIG_FSL_BOOKE) 50 + #if defined(CONFIG_PPC_85xx) 51 51 { 0x2010, 0x08 /* SIGFPE */ }, /* spe unavailable */ 52 52 { 0x2020, 0x08 /* SIGFPE */ }, /* spe unavailable */ 53 53 { 0x2030, 0x08 /* SIGFPE */ }, /* spe fp data */ ··· 57 57 { 0x2900, 0x08 /* SIGFPE */ }, /* apu unavailable */ 58 58 { 0x3100, 0x0e /* SIGALRM */ }, /* fixed interval timer */ 59 59 { 0x3200, 0x02 /* SIGINT */ }, /* watchdog */ 60 - #else /* ! CONFIG_FSL_BOOKE */ 60 + #else /* ! CONFIG_PPC_85xx */ 61 61 { 0x1000, 0x0e /* SIGALRM */ }, /* prog interval timer */ 62 62 { 0x1010, 0x0e /* SIGALRM */ }, /* fixed interval timer */ 63 63 { 0x1020, 0x02 /* SIGINT */ }, /* watchdog */ ··· 208 208 for (reg = 14; reg < 32; reg++) 209 209 PACK64(ptr, regs->gpr[reg]); 210 210 211 - #ifdef CONFIG_FSL_BOOKE 211 + #ifdef CONFIG_PPC_85xx 212 212 #ifdef CONFIG_SPE 213 213 for (reg = 0; reg < 32; reg++) 214 214 PACK64(ptr, p->thread.evr[reg]); ··· 234 234 #define GDB_SIZEOF_REG sizeof(unsigned long) 235 235 #define GDB_SIZEOF_REG_U32 sizeof(u32) 236 236 237 - #ifdef CONFIG_FSL_BOOKE 237 + #ifdef CONFIG_PPC_85xx 238 238 #define GDB_SIZEOF_FLOAT_REG sizeof(unsigned long) 239 239 #else 240 240 #define GDB_SIZEOF_FLOAT_REG sizeof(u64) ··· 329 329 330 330 if (regno >= 32 && regno < 64) { 331 331 /* FP registers 32 -> 63 */ 332 - #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE) 332 + #if defined(CONFIG_PPC_85xx) && defined(CONFIG_SPE) 333 333 if (current) 334 334 memcpy(mem, &current->thread.evr[regno-32], 335 335 dbg_reg_def[regno].size); ··· 355 355 356 356 if (regno >= 32 && regno < 64) { 357 357 /* FP registers 32 -> 63 */ 358 - #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE) 358 + #if defined(CONFIG_PPC_85xx) && defined(CONFIG_SPE) 359 359 memcpy(&current->thread.evr[regno-32], mem, 360 360 dbg_reg_def[regno].size); 361 361 #else
arch/powerpc/kernel/swsusp_booke.S arch/powerpc/kernel/swsusp_85xx.S
+2 -2
arch/powerpc/kernel/traps.c
··· 2085 2085 } 2086 2086 #endif /* CONFIG_ALTIVEC */ 2087 2087 2088 - #ifdef CONFIG_FSL_BOOKE 2088 + #ifdef CONFIG_PPC_85xx 2089 2089 DEFINE_INTERRUPT_HANDLER(CacheLockingException) 2090 2090 { 2091 2091 unsigned long error_code = regs->dsisr; ··· 2098 2098 _exception(SIGILL, regs, ILL_PRVOPC, regs->nip); 2099 2099 return; 2100 2100 } 2101 - #endif /* CONFIG_FSL_BOOKE */ 2101 + #endif /* CONFIG_PPC_85xx */ 2102 2102 2103 2103 #ifdef CONFIG_SPE 2104 2104 DEFINE_INTERRUPT_HANDLER(SPEFloatingPointException)
+1 -1
arch/powerpc/kexec/core_32.c
··· 55 55 reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE); 56 56 printk(KERN_INFO "Bye!\n"); 57 57 58 - if (!IS_ENABLED(CONFIG_FSL_BOOKE) && !IS_ENABLED(CONFIG_44x)) 58 + if (!IS_ENABLED(CONFIG_PPC_85xx) && !IS_ENABLED(CONFIG_44x)) 59 59 relocate_new_kernel(page_list, reboot_code_buffer_phys, image->start); 60 60 61 61 /* now call it */
+2 -2
arch/powerpc/kexec/relocate_32.S
··· 25 25 /* r4 = reboot_code_buffer */ 26 26 /* r5 = start_address */ 27 27 28 - #ifdef CONFIG_FSL_BOOKE 28 + #ifdef CONFIG_PPC_85xx 29 29 30 30 mr r29, r3 31 31 mr r30, r4 32 32 mr r31, r5 33 33 34 34 #define ENTRY_MAPPING_KEXEC_SETUP 35 - #include <kernel/fsl_booke_entry_mapping.S> 35 + #include <kernel/85xx_entry_mapping.S> 36 36 #undef ENTRY_MAPPING_KEXEC_SETUP 37 37 38 38 mr r3, r29
+2 -2
arch/powerpc/kvm/booke_interrupts.S
··· 223 223 lwz r3, VCPU_HOST_PID(r4) 224 224 mtspr SPRN_PID, r3 225 225 226 - #ifdef CONFIG_FSL_BOOKE 226 + #ifdef CONFIG_PPC_85xx 227 227 /* we cheat and know that Linux doesn't use PID1 which is always 0 */ 228 228 lis r3, 0 229 229 mtspr SPRN_PID1, r3 ··· 406 406 lwz r3, VCPU_SHADOW_PID(r4) 407 407 mtspr SPRN_PID, r3 408 408 409 - #ifdef CONFIG_FSL_BOOKE 409 + #ifdef CONFIG_PPC_85xx 410 410 lwz r3, VCPU_SHADOW_PID1(r4) 411 411 mtspr SPRN_PID1, r3 412 412 #endif
+2 -2
arch/powerpc/mm/init_32.c
··· 85 85 total_lowmem = total_memory = memblock_end_of_DRAM() - memstart_addr; 86 86 lowmem_end_addr = memstart_addr + total_lowmem; 87 87 88 - #ifdef CONFIG_FSL_BOOKE 88 + #ifdef CONFIG_PPC_85xx 89 89 /* Freescale Book-E parts expect lowmem to be mapped by fixed TLB 90 90 * entries, so we need to adjust lowmem to match the amount we can map 91 91 * in the fixed entries */ 92 92 adjust_total_lowmem(); 93 - #endif /* CONFIG_FSL_BOOKE */ 93 + #endif /* CONFIG_PPC_85xx */ 94 94 95 95 if (total_lowmem > __max_low_memory) { 96 96 total_lowmem = __max_low_memory;
+2 -2
arch/powerpc/mm/mmu_decl.h
··· 146 146 extern struct tlbcam TLBCAM[NUM_TLBCAMS]; 147 147 #endif 148 148 149 - #if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_FSL_BOOKE) || defined(CONFIG_PPC_8xx) 149 + #if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_8xx) 150 150 /* 6xx have BATS */ 151 - /* FSL_BOOKE have TLBCAM */ 151 + /* PPC_85xx have TLBCAM */ 152 152 /* 8xx have LTLB */ 153 153 phys_addr_t v_block_mapped(unsigned long va); 154 154 unsigned long p_block_mapped(phys_addr_t pa);
+1 -1
arch/powerpc/mm/nohash/fsl_book3e.c
··· 59 59 phys_addr_t phys; 60 60 } tlbcam_addrs[NUM_TLBCAMS]; 61 61 62 - #ifdef CONFIG_FSL_BOOKE 62 + #ifdef CONFIG_PPC_85xx 63 63 /* 64 64 * Return PA for this VA if it is mapped by a CAM, or 0 65 65 */
+1 -1
arch/powerpc/mm/nohash/tlb.c
··· 130 130 .enc = BOOK3E_PAGESZ_1GB, 131 131 }, 132 132 }; 133 - #endif /* CONFIG_FSL_BOOKE */ 133 + #endif /* CONFIG_PPC_85xx */ 134 134 135 135 static inline int mmu_get_tsize(int psize) 136 136 {
+1 -1
arch/powerpc/mm/nohash/tlb_low.S
··· 221 221 blr 222 222 #endif /* CONFIG_PPC_47x */ 223 223 224 - #elif defined(CONFIG_FSL_BOOKE) 224 + #elif defined(CONFIG_PPC_85xx) 225 225 /* 226 226 * FSL BookE implementations. 227 227 *
+3 -8
arch/powerpc/platforms/Kconfig.cputype
··· 324 324 depends on BOOKE || 40x 325 325 default y 326 326 327 - config FSL_BOOKE 328 - bool 329 - depends on E500 && PPC32 330 - default y 331 - 332 327 # this is for common code between PPC32 & PPC64 FSL BOOKE 333 328 config PPC_FSL_BOOK3E 334 329 bool ··· 332 337 select PPC_SMP_MUXED_IPI 333 338 select PPC_DOORBELL 334 339 select PPC_KUEP 335 - default y if FSL_BOOKE 340 + default y if PPC_85xx 336 341 337 342 config PTE_64BIT 338 343 bool ··· 480 485 481 486 config PPC_BOOK3E_MMU 482 487 def_bool y 483 - depends on FSL_BOOKE || PPC_BOOK3E 488 + depends on PPC_85xx || PPC_BOOK3E 484 489 485 490 config PPC_HAVE_PMU_SUPPORT 486 491 bool ··· 503 508 select SMP 504 509 505 510 config SMP 506 - depends on PPC_BOOK3S || PPC_BOOK3E || FSL_BOOKE || PPC_47x 511 + depends on PPC_BOOK3S || PPC_BOOK3E || PPC_85xx || PPC_47x 507 512 select GENERIC_IRQ_MIGRATION 508 513 bool "Symmetric multi-processing support" if !FORCE_SMP 509 514 help