Skip to content

Commit 7bf5f05

Browse files
committed
powerpc: Replace CONFIG_4xx with CONFIG_44x
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
1 parent 002b27a commit 7bf5f05

10 files changed

Lines changed: 13 additions & 19 deletions

File tree

arch/powerpc/Kconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ source "kernel/Kconfig.hz"
490490

491491
config MATH_EMULATION
492492
bool "Math emulation"
493-
depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
493+
depends on 44x || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
494494
select PPC_FPU_REGS
495495
help
496496
Some PowerPC chips designed for embedded applications do not have
@@ -1108,9 +1108,6 @@ config PPC4xx_CPM
11081108
It also enables support for two different idle states (idle-wait
11091109
and idle-doze).
11101110

1111-
config 4xx_SOC
1112-
bool
1113-
11141111
config FSL_LBC
11151112
bool "Freescale Local Bus support"
11161113
help

arch/powerpc/include/asm/cacheflush.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static inline void invalidate_dcache_range(unsigned long start,
121121
mb(); /* sync */
122122
}
123123

124-
#ifdef CONFIG_4xx
124+
#ifdef CONFIG_44x
125125
static inline void flush_instruction_cache(void)
126126
{
127127
iccci((void *)KERNELBASE);

arch/powerpc/include/asm/ppc_asm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ END_FTR_SECTION_NESTED(CPU_FTR_CELL_TB_BUG, CPU_FTR_CELL_TB_BUG, 96)
482482
* and they must be used.
483483
*/
484484

485-
#if !defined(CONFIG_4xx) && !defined(CONFIG_PPC_8xx)
485+
#if !defined(CONFIG_44x) && !defined(CONFIG_PPC_8xx)
486486
#define tlbia \
487487
li r4,1024; \
488488
mtctr r4; \

arch/powerpc/kernel/entry_32.S

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ start_kernel_thread:
211211

212212
.globl fast_exception_return
213213
fast_exception_return:
214-
#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
214+
#ifndef CONFIG_BOOKE
215215
andi. r10,r9,MSR_RI /* check for recoverable interrupt */
216216
beq 3f /* if not, we've got problems */
217217
#endif
@@ -365,7 +365,7 @@ ALT_FTR_SECTION_END_IFCLR(CPU_FTR_STCX_CHECKS_ADDRESS)
365365
rfi
366366
_ASM_NOKPROBE_SYMBOL(interrupt_return)
367367

368-
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
368+
#ifdef CONFIG_BOOKE
369369

370370
/*
371371
* Returning from a critical interrupt in user mode doesn't need
@@ -444,7 +444,6 @@ _ASM_NOKPROBE_SYMBOL(interrupt_return)
444444
#define RESTORE_MMU_REGS
445445
#endif
446446

447-
#ifdef CONFIG_BOOKE
448447
.globl ret_from_crit_exc
449448
ret_from_crit_exc:
450449
RESTORE_xSRR(SRR0,SRR1);
@@ -469,4 +468,3 @@ ret_from_mcheck_exc:
469468
RET_FROM_EXC_LEVEL(SPRN_MCSRR0, SPRN_MCSRR1, PPC_RFMCI)
470469
_ASM_NOKPROBE_SYMBOL(ret_from_mcheck_exc)
471470
#endif /* CONFIG_BOOKE */
472-
#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */

arch/powerpc/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1573,7 +1573,7 @@ static void __show_regs(struct pt_regs *regs)
15731573
if (trap == INTERRUPT_MACHINE_CHECK ||
15741574
trap == INTERRUPT_DATA_STORAGE ||
15751575
trap == INTERRUPT_ALIGNMENT) {
1576-
if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
1576+
if (IS_ENABLED(CONFIG_BOOKE))
15771577
pr_cont("DEAR: "REG" ESR: "REG" ", regs->dear, regs->esr);
15781578
else
15791579
pr_cont("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr);

arch/powerpc/mm/fault.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,13 +368,13 @@ static void sanity_check_fault(bool is_write, bool is_user,
368368
* Define the correct "is_write" bit in error_code based
369369
* on the processor family
370370
*/
371-
#if (defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
371+
#ifdef CONFIG_BOOKE
372372
#define page_fault_is_write(__err) ((__err) & ESR_DST)
373373
#else
374374
#define page_fault_is_write(__err) ((__err) & DSISR_ISSTORE)
375375
#endif
376376

377-
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
377+
#ifdef CONFIG_BOOKE
378378
#define page_fault_is_bad(__err) (0)
379379
#elif defined(CONFIG_PPC_8xx)
380380
#define page_fault_is_bad(__err) ((__err) & DSISR_NOEXEC_OR_G)

arch/powerpc/mm/ptdump/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
obj-y += ptdump.o
44

5-
obj-$(CONFIG_4xx) += shared.o
5+
obj-$(CONFIG_44x) += shared.o
66
obj-$(CONFIG_PPC_8xx) += 8xx.o
77
obj-$(CONFIG_PPC_E500) += shared.o
88
obj-$(CONFIG_PPC_BOOK3S_32) += shared.o

arch/powerpc/platforms/4xx/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
obj-y += uic.o machine_check.o
3-
obj-$(CONFIG_4xx_SOC) += soc.o
3+
obj-$(CONFIG_44x) += soc.o
44
obj-$(CONFIG_PCI) += pci.o
55
obj-$(CONFIG_PPC4xx_HSTA_MSI) += hsta_msi.o
66
obj-$(CONFIG_PPC4xx_CPM) += cpm.o

arch/powerpc/platforms/Kconfig.cputype

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ config 44x
4747
bool "AMCC 44x, 46x or 47x"
4848
select PPC_DCR_NATIVE
4949
select PPC_UDBG_16550
50-
select 4xx_SOC
5150
select HAVE_PCI
5251
select PHYS_64BIT
5352
select PPC_KUEP
@@ -564,7 +563,7 @@ config NR_CPUS
564563

565564
config NOT_COHERENT_CACHE
566565
bool
567-
depends on 4xx || PPC_8xx || PPC_MPC512x || \
566+
depends on 44x || PPC_8xx || PPC_MPC512x || \
568567
GAMECUBE_COMMON || AMIGAONE
569568
select ARCH_HAS_DMA_PREP_COHERENT
570569
select ARCH_HAS_SYNC_DMA_FOR_DEVICE

arch/powerpc/sysdev/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
config PPC4xx_PCI_EXPRESS
77
bool
8-
depends on PCI && 4xx
8+
depends on PCI && 44x
99

1010
config PPC4xx_HSTA_MSI
1111
bool
1212
depends on PCI_MSI
13-
depends on PCI && 4xx
13+
depends on PCI && 44x
1414

1515
config PPC_MSI_BITMAP
1616
bool

0 commit comments

Comments
 (0)