powerpc/traps: Inline get_mc_reason()
get_mc_reason() no longer provides (if it ever really did) any meaningful abstraction, so remove it. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
0d0935b367
commit
42bff234be
|
@ -399,11 +399,6 @@ static inline int check_io_access(struct pt_regs *regs)
|
||||||
/* On 4xx, the reason for the machine check or program exception
|
/* On 4xx, the reason for the machine check or program exception
|
||||||
is in the ESR. */
|
is in the ESR. */
|
||||||
#define get_reason(regs) ((regs)->dsisr)
|
#define get_reason(regs) ((regs)->dsisr)
|
||||||
#ifndef CONFIG_FSL_BOOKE
|
|
||||||
#define get_mc_reason(regs) ((regs)->dsisr)
|
|
||||||
#else
|
|
||||||
#define get_mc_reason(regs) (mfspr(SPRN_MCSR))
|
|
||||||
#endif
|
|
||||||
#define REASON_FP ESR_FP
|
#define REASON_FP ESR_FP
|
||||||
#define REASON_ILLEGAL (ESR_PIL | ESR_PUO)
|
#define REASON_ILLEGAL (ESR_PIL | ESR_PUO)
|
||||||
#define REASON_PRIVILEGED ESR_PPR
|
#define REASON_PRIVILEGED ESR_PPR
|
||||||
|
@ -417,7 +412,6 @@ static inline int check_io_access(struct pt_regs *regs)
|
||||||
/* On non-4xx, the reason for the machine check or program
|
/* On non-4xx, the reason for the machine check or program
|
||||||
exception is in the MSR. */
|
exception is in the MSR. */
|
||||||
#define get_reason(regs) ((regs)->msr)
|
#define get_reason(regs) ((regs)->msr)
|
||||||
#define get_mc_reason(regs) ((regs)->msr)
|
|
||||||
#define REASON_TM 0x200000
|
#define REASON_TM 0x200000
|
||||||
#define REASON_FP 0x100000
|
#define REASON_FP 0x100000
|
||||||
#define REASON_ILLEGAL 0x80000
|
#define REASON_ILLEGAL 0x80000
|
||||||
|
@ -530,7 +524,7 @@ silent_out:
|
||||||
|
|
||||||
int machine_check_e500(struct pt_regs *regs)
|
int machine_check_e500(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned long reason = get_mc_reason(regs);
|
unsigned long reason = mfspr(SPRN_MCSR);
|
||||||
|
|
||||||
if (reason & MCSR_BUS_RBERR) {
|
if (reason & MCSR_BUS_RBERR) {
|
||||||
if (fsl_rio_mcheck_exception(regs))
|
if (fsl_rio_mcheck_exception(regs))
|
||||||
|
@ -577,7 +571,7 @@ int machine_check_generic(struct pt_regs *regs)
|
||||||
#elif defined(CONFIG_E200)
|
#elif defined(CONFIG_E200)
|
||||||
int machine_check_e200(struct pt_regs *regs)
|
int machine_check_e200(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned long reason = get_mc_reason(regs);
|
unsigned long reason = mfspr(SPRN_MCSR);
|
||||||
|
|
||||||
printk("Machine check in kernel mode.\n");
|
printk("Machine check in kernel mode.\n");
|
||||||
printk("Caused by (from MCSR=%lx): ", reason);
|
printk("Caused by (from MCSR=%lx): ", reason);
|
||||||
|
@ -602,7 +596,7 @@ int machine_check_e200(struct pt_regs *regs)
|
||||||
#elif defined(CONFIG_PPC_8xx)
|
#elif defined(CONFIG_PPC_8xx)
|
||||||
int machine_check_8xx(struct pt_regs *regs)
|
int machine_check_8xx(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned long reason = get_mc_reason(regs);
|
unsigned long reason = regs->msr;
|
||||||
|
|
||||||
pr_err("Machine check in kernel mode.\n");
|
pr_err("Machine check in kernel mode.\n");
|
||||||
pr_err("Caused by (from SRR1=%lx): ", reason);
|
pr_err("Caused by (from SRR1=%lx): ", reason);
|
||||||
|
@ -627,7 +621,7 @@ int machine_check_8xx(struct pt_regs *regs)
|
||||||
#else
|
#else
|
||||||
int machine_check_generic(struct pt_regs *regs)
|
int machine_check_generic(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned long reason = get_mc_reason(regs);
|
unsigned long reason = regs->msr;
|
||||||
|
|
||||||
printk("Machine check in kernel mode.\n");
|
printk("Machine check in kernel mode.\n");
|
||||||
printk("Caused by (from SRR1=%lx): ", reason);
|
printk("Caused by (from SRR1=%lx): ", reason);
|
||||||
|
|
Loading…
Reference in New Issue