Commit 047a6fd4 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc/config: Add CONFIG_BOOKE_OR_40x



We have many functionnalities common to 40x and BOOKE, it leads to
many places with #if defined(CONFIG_BOOKE) || defined(CONFIG_40x).

We are going to add a few more with KUAP for booke/40x, so create
a new symbol which is defined when either BOOKE or 40x is defined.

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/9a3dbd60924cb25c9f944d3d8205ac5a0d15e229.1634627931.git.christophe.leroy@csgroup.eu
parent 25ae981f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@

static inline void __hard_irq_enable(void)
{
	if (IS_ENABLED(CONFIG_BOOKE) || IS_ENABLED(CONFIG_40x))
	if (IS_ENABLED(CONFIG_BOOKE_OR_40x))
		wrtee(MSR_EE);
	else if (IS_ENABLED(CONFIG_PPC_8xx))
		wrtspr(SPRN_EIE);
@@ -73,7 +73,7 @@ static inline void __hard_irq_enable(void)

static inline void __hard_irq_disable(void)
{
	if (IS_ENABLED(CONFIG_BOOKE) || IS_ENABLED(CONFIG_40x))
	if (IS_ENABLED(CONFIG_BOOKE_OR_40x))
		wrtee(0);
	else if (IS_ENABLED(CONFIG_PPC_8xx))
		wrtspr(SPRN_EID);
@@ -85,7 +85,7 @@ static inline void __hard_irq_disable(void)

static inline void __hard_EE_RI_disable(void)
{
	if (IS_ENABLED(CONFIG_BOOKE) || IS_ENABLED(CONFIG_40x))
	if (IS_ENABLED(CONFIG_BOOKE_OR_40x))
		wrtee(0);
	else if (IS_ENABLED(CONFIG_PPC_8xx))
		wrtspr(SPRN_NRI);
@@ -97,7 +97,7 @@ static inline void __hard_EE_RI_disable(void)

static inline void __hard_RI_enable(void)
{
	if (IS_ENABLED(CONFIG_BOOKE) || IS_ENABLED(CONFIG_40x))
	if (IS_ENABLED(CONFIG_BOOKE_OR_40x))
		return;

	if (IS_ENABLED(CONFIG_PPC_8xx))
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ extern int distribute_irqs;

struct pt_regs;

#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
#ifdef CONFIG_BOOKE_OR_40x
/*
 * Per-cpu stacks for handling critical, debug and machine check
 * level interrupts.
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ static inline void regs_set_return_value(struct pt_regs *regs, unsigned long rc)

static inline bool cpu_has_msr_ri(void)
{
	return !IS_ENABLED(CONFIG_BOOKE) && !IS_ENABLED(CONFIG_40x);
	return !IS_ENABLED(CONFIG_BOOKE_OR_40x);
}

static inline bool regs_is_unrecoverable(struct pt_regs *regs)
+2 −2
Original line number Diff line number Diff line
@@ -18,9 +18,9 @@
#include <asm/feature-fixups.h>

/* Pickup Book E specific registers. */
#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
#ifdef CONFIG_BOOKE_OR_40x
#include <asm/reg_booke.h>
#endif /* CONFIG_BOOKE || CONFIG_40x */
#endif

#ifdef CONFIG_FSL_EMB_PERFMON
#include <asm/reg_fsl_emb.h>
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@
#endif

#ifdef CONFIG_PPC32
#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
#ifdef CONFIG_BOOKE_OR_40x
#include "head_booke.h"
#endif
#endif
Loading