Skip to content

Commit

Permalink
powerpc/4xx: Remove CONFIG_4xx
Browse files Browse the repository at this point in the history
CONFIG_4xx was corresponding to CONFIG_40x | CONFIG_44x.

As CONFIG_40x is gone, CONFIG_4xx and CONFIG_44x are now equivalent.
And CONFIG_BOOKE is also set when CONFIG_44x is set.

Replace (CONFIG_4xx | CONFIG_BOOKE) by CONFIG_BOOKE
Replace other CONFIG_4xx by CONFIG_44x
Remove CONFIG_4xx.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
  • Loading branch information
chleroy authored and intel-lab-lkp committed Dec 9, 2020
1 parent e44bcf3 commit 4e35f2a
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 27 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ config HUGETLB_PAGE_SIZE_VARIABLE

config MATH_EMULATION
bool "Math emulation"
depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE
depends on PPC_8xx || PPC_MPC832x || BOOKE
select PPC_FPU_REGS
help
Some PowerPC chips designed for embedded applications do not have
Expand Down
1 change: 0 additions & 1 deletion arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables
# often slow when they are implemented at all
KBUILD_CFLAGS += $(call cc-option,-mno-string)

cpu-as-$(CONFIG_40x) += -Wa,-m405
cpu-as-$(CONFIG_44x) += -Wa,-m440
cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec)
cpu-as-$(CONFIG_E500) += -Wa,-me500
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/include/asm/ppc_asm.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,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; \
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ int main(void)
OFFSET(THREAD_USED_SPE, thread_struct, used_spe);
#endif /* CONFIG_SPE */
#endif /* CONFIG_PPC64 */
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
#ifdef CONFIG_BOOKE
OFFSET(THREAD_DBCR0, thread_struct, debug.dbcr0);
#endif
#ifdef CONFIG_KVM_BOOK3S_32_HANDLER
Expand Down
16 changes: 8 additions & 8 deletions arch/powerpc/kernel/entry_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ syscall_exit_cont:
lwz r3,GPR3(r1)
1:
#endif /* CONFIG_TRACE_IRQFLAGS */
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
#ifdef CONFIG_BOOKE
/* If the process has its own DBCR0 value, load it up. The internal
debug mode bit tells us that dbcr0 should be loaded. */
lwz r0,THREAD+THREAD_DBCR0(r2)
Expand Down Expand Up @@ -561,7 +561,7 @@ syscall_exit_work:
ret_from_kernel_syscall:
mfspr r9, SPRN_SRR0
mfspr r10, SPRN_SRR1
#if !defined(CONFIG_4xx) && !defined(CONFIG_BOOKE)
#ifndef CONFIG_BOOKE
LOAD_REG_IMMEDIATE(r11, MSR_KERNEL & ~(MSR_IR|MSR_DR))
mtmsr r11
#endif
Expand Down Expand Up @@ -756,7 +756,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_SPE)

.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 1f /* if not, we've got problems */
#endif
Expand All @@ -782,7 +782,7 @@ fast_exception_return:
rfi
_ASM_NOKPROBE_SYMBOL(fast_exception_return)

#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
#ifndef CONFIG_BOOKE
/* check if the exception happened in a restartable section */
1: lis r3,exc_exit_restart_end@ha
addi r3,r3,exc_exit_restart_end@l
Expand Down Expand Up @@ -844,7 +844,7 @@ user_exc_return: /* r10 contains MSR_KERNEL here */
bne do_work

restore_user:
#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
#ifdef CONFIG_BOOKE
/* Check whether this process has its own DBCR0 value. The internal
debug mode bit tells us that dbcr0 should be loaded. */
lwz r0,THREAD+THREAD_DBCR0(r2)
Expand Down Expand Up @@ -968,7 +968,7 @@ BEGIN_FTR_SECTION
END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
stwcx. r0,0,r1 /* to clear the reservation */

#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
#ifndef CONFIG_BOOKE
andi. r10,r9,MSR_RI /* check if this exception occurred */
beql nonrecoverable /* at a bad place (MSR:RI = 0) */

Expand Down Expand Up @@ -1004,7 +1004,7 @@ exc_exit_restart_end:
_ASM_NOKPROBE_SYMBOL(exc_exit_restart)
_ASM_NOKPROBE_SYMBOL(exc_exit_restart_end)

#else /* !(CONFIG_4xx || CONFIG_BOOKE) */
#else /* !CONFIG_BOOKE */
/*
* This is a bit different on 4xx/Book-E because it doesn't have
* the RI bit in the MSR.
Expand Down Expand Up @@ -1184,7 +1184,7 @@ load_dbcr0:
global_dbcr0:
.space 8*NR_CPUS
.previous
#endif /* !(CONFIG_4xx || CONFIG_BOOKE) */
#endif /* !CONFIG_BOOKE */

do_work: /* r10 contains MSR_KERNEL here */
andi. r0,r9,_TIF_NEED_RESCHED
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ static void __show_regs(struct pt_regs *regs)
if (!trap_is_syscall(regs) && cpu_has_feature(CPU_FTR_CFAR))
pr_cont("CFAR: "REG" ", regs->orig_gpr3);
if (trap == 0x200 || trap == 0x300 || trap == 0x600) {
if (IS_ENABLED(CONFIG_4xx) || IS_ENABLED(CONFIG_BOOKE))
if (IS_ENABLED(CONFIG_BOOKE))
pr_cont("DEAR: "REG" ESR: "REG" ", regs->dar, regs->dsisr);
else
pr_cont("DAR: "REG" DSISR: %08lx ", regs->dar, regs->dsisr);
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ 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)
#define page_fault_is_bad(__err) (0)
#else
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/mm/ptdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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_BOOK3E_MMU) += shared.o
obj-$(CONFIG_PPC_BOOK3S_32) += shared.o bats.o segment_regs.o
Expand Down
7 changes: 1 addition & 6 deletions arch/powerpc/platforms/Kconfig.cputype
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,6 @@ config FSL_EMB_PERF_EVENT_E500
depends on FSL_EMB_PERF_EVENT && E500
default y

config 4xx
bool
depends on 44x
default y

config BOOKE
bool
depends on E500 || 44x || PPC_BOOK3E
Expand Down Expand Up @@ -470,7 +465,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
Expand Down
3 changes: 1 addition & 2 deletions arch/powerpc/platforms/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ obj-$(CONFIG_FSL_ULI1575) += fsl_uli1575.o

obj-$(CONFIG_PPC_PMAC) += powermac/
obj-$(CONFIG_PPC_CHRP) += chrp/
obj-$(CONFIG_4xx) += 4xx/
obj-$(CONFIG_44x) += 44x/
obj-$(CONFIG_44x) += 4xx/ 44x/
obj-$(CONFIG_PPC_MPC512x) += 512x/
obj-$(CONFIG_PPC_MPC52xx) += 52xx/
obj-$(CONFIG_PPC_8xx) += 8xx/
Expand Down
6 changes: 3 additions & 3 deletions arch/powerpc/sysdev/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

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 PPC4xx_MSI
bool
depends on PCI_MSI
depends on PCI && 4xx
depends on PCI && 44x

config PPC_MSI_BITMAP
bool
Expand Down
2 changes: 1 addition & 1 deletion arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ static inline void release_output_lock(void) {}

static inline int unrecoverable_excp(struct pt_regs *regs)
{
#if defined(CONFIG_4xx) || defined(CONFIG_PPC_BOOK3E)
#if defined(CONFIG_44x) || defined(CONFIG_PPC_BOOK3E)
/* We have no MSR_RI bit on 4xx or Book3e, so we simply return false */
return 0;
#else
Expand Down

0 comments on commit 4e35f2a

Please sign in to comment.