]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
powerpc: Replace CONFIG_4xx with CONFIG_44x
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 28 Jun 2024 12:12:00 +0000 (22:12 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 28 Jun 2024 12:28:48 +0000 (22:28 +1000)
Replace 4xx usage with 44x, and replace 4xx_SOC with 44x.

Also, as pointed out by Christophe, if 44x || BOOKE can be simplified to
just test BOOKE, because 44x always selects BOOKE.

Retain the CONFIG_4xx symbol, as there are drivers that use it to mean
4xx || 44x, those will need updating before CONFIG_4xx can be removed.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240628121201.130802-6-mpe@ellerman.id.au
arch/powerpc/Kconfig
arch/powerpc/include/asm/cacheflush.h
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/kernel/entry_32.S
arch/powerpc/kernel/process.c
arch/powerpc/mm/fault.c
arch/powerpc/mm/ptdump/Makefile
arch/powerpc/platforms/4xx/Makefile
arch/powerpc/platforms/Kconfig.cputype
arch/powerpc/sysdev/Kconfig

index 16d625c71dfa0cb643d9fbe6c437af4f0c554172..f8891fbe7c16462b948bab22835c4c9e6f43211a 100644 (file)
@@ -490,7 +490,7 @@ source "kernel/Kconfig.hz"
 
 config MATH_EMULATION
        bool "Math emulation"
-       depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
+       depends on 44x || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
        select PPC_FPU_REGS
        help
          Some PowerPC chips designed for embedded applications do not have
@@ -1108,9 +1108,6 @@ config PPC4xx_CPM
          It also enables support for two different idle states (idle-wait
          and idle-doze).
 
-config 4xx_SOC
-       bool
-
 config FSL_LBC
        bool "Freescale Local Bus support"
        help
index ef7d2de33b89e5395527a030614d9641118acad4..f2656774aaa94ef17e5b46db9ba92d0a6138b3fd 100644 (file)
@@ -121,7 +121,7 @@ static inline void invalidate_dcache_range(unsigned long start,
        mb();   /* sync */
 }
 
-#ifdef CONFIG_4xx
+#ifdef CONFIG_44x
 static inline void flush_instruction_cache(void)
 {
        iccci((void *)KERNELBASE);
index 1d1018c1e4820ce62f9d0526f8860c81e1057a9e..02897f4b0dbf8143b2893c2bdb86ec669897f800 100644 (file)
@@ -482,7 +482,7 @@ END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96)
  * and they must be used.
  */
 
-#if !defined(CONFIG_4xx) && !defined(CONFIG_PPC_8xx)
+#if !defined(CONFIG_44x) && !defined(CONFIG_PPC_8xx)
 #define tlbia                                  \
        li      r4,1024;                        \
        mtctr   r4;                             \
index 1522164b10e48280bfab904cde52a6b5387b13cc..f4a8c98772491a88fa15f9bb582baa231655d11e 100644 (file)
@@ -211,7 +211,7 @@ start_kernel_thread:
 
        .globl  fast_exception_return
 fast_exception_return:
-#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
+#ifndef CONFIG_BOOKE
        andi.   r10,r9,MSR_RI           /* check for recoverable interrupt */
        beq     3f                      /* if not, we've got problems */
 #endif
@@ -365,7 +365,7 @@ ALT_FTR_SECTION_END_IFCLR(CPU_FTR_STCX_CHECKS_ADDRESS)
        rfi
 _ASM_NOKPROBE_SYMBOL(interrupt_return)
 
-#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+#ifdef CONFIG_BOOKE
 
 /*
  * Returning from a critical interrupt in user mode doesn't need
@@ -444,7 +444,6 @@ _ASM_NOKPROBE_SYMBOL(interrupt_return)
 #define RESTORE_MMU_REGS
 #endif
 
-#ifdef CONFIG_BOOKE
        .globl  ret_from_crit_exc
 ret_from_crit_exc:
        RESTORE_xSRR(SRR0,SRR1);
@@ -469,4 +468,3 @@ ret_from_mcheck_exc:
        RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, PPC_RFMCI)
 _ASM_NOKPROBE_SYMBOL(ret_from_mcheck_exc)
 #endif /* CONFIG_BOOKE */
-#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
index 0e96bd38570c03eed0661f25e5ece33bf0f11dd8..3b506d4c55f37eb3f510da46cd058b4342ba91db 100644 (file)
@@ -1573,7 +1573,7 @@ static void __show_regs(struct pt_regs *regs)
        if (trap == INTERRUPT_MACHINE_CHECK ||
            trap == INTERRUPT_DATA_STORAGE ||
            trap == INTERRUPT_ALIGNMENT) {
-               if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
+               if (IS_ENABLED(CONFIG_BOOKE))
                        pr_cont("DEAR: "REG" ESR: "REG" ", regs->dear, regs->esr);
                else
                        pr_cont("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr);
index 215690452495946a98c9afc8fa87946b7d7e18c0..81c77ddce2e30a849e5984aa0e68e3a3b8912e95 100644 (file)
@@ -368,13 +368,13 @@ static void sanity_check_fault(bool is_write, bool is_user,
  * Define the correct "is_write" bit in error_code based
  * on the processor family
  */
-#if (defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
+#ifdef CONFIG_BOOKE
 #define page_fault_is_write(__err)     ((__err) & ESR_DST)
 #else
 #define page_fault_is_write(__err)     ((__err) & DSISR_ISSTORE)
 #endif
 
-#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+#ifdef CONFIG_BOOKE
 #define page_fault_is_bad(__err)       (0)
 #elif defined(CONFIG_PPC_8xx)
 #define page_fault_is_bad(__err)       ((__err) & DSISR_NOEXEC_OR_G)
index dc896d2874f33fd3fcda1cafbd38030362640ccd..0f7a050f327e74f8e95e5320f624ca9c6d696aa0 100644 (file)
@@ -2,7 +2,7 @@
 
 obj-y  += ptdump.o
 
-obj-$(CONFIG_4xx)              += shared.o
+obj-$(CONFIG_44x)              += shared.o
 obj-$(CONFIG_PPC_8xx)          += 8xx.o
 obj-$(CONFIG_PPC_E500)         += shared.o
 obj-$(CONFIG_PPC_BOOK3S_32)    += shared.o
index 2071a0abe09befca37e8dce5250955955ad18a51..7f57c35f8dec0740716e8c4802ae01f4ea35a104 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-y                          += uic.o machine_check.o
-obj-$(CONFIG_4xx_SOC)          += soc.o
+obj-$(CONFIG_44x)              += soc.o
 obj-$(CONFIG_PCI)              += pci.o
 obj-$(CONFIG_PPC4xx_HSTA_MSI)  += hsta_msi.o
 obj-$(CONFIG_PPC4xx_CPM)       += cpm.o
index 55337628bf92b11c94e75b843348d7f4ef81b96e..1ec98688c915ea65cbb6a4ed223cf0981534ed5d 100644 (file)
@@ -47,7 +47,6 @@ config 44x
        bool "AMCC 44x, 46x or 47x"
        select PPC_DCR_NATIVE
        select PPC_UDBG_16550
-       select 4xx_SOC
        select HAVE_PCI
        select PHYS_64BIT
        select PPC_KUEP
@@ -564,7 +563,7 @@ config NR_CPUS
 
 config NOT_COHERENT_CACHE
        bool
-       depends on 4xx || PPC_8xx || PPC_MPC512x || \
+       depends on 44x || PPC_8xx || PPC_MPC512x || \
                GAMECUBE_COMMON || AMIGAONE
        select ARCH_HAS_DMA_PREP_COHERENT
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE
index 5aa92ff3622d2a0e464bf66865acfbf461791fd9..18ff2c4a814add0cc597f477e3c96f512f2383f5 100644 (file)
@@ -5,12 +5,12 @@
 
 config PPC4xx_PCI_EXPRESS
        bool
-       depends on PCI && 4xx
+       depends on PCI && 44x
 
 config PPC4xx_HSTA_MSI
        bool
        depends on PCI_MSI
-       depends on PCI && 4xx
+       depends on PCI && 44x
 
 config PPC_MSI_BITMAP
        bool