Skip to content

Commit 51423a9

Browse files
chleroympe
authored andcommitted
powerpc/traps: merge unrecoverable_exception() and nonrecoverable_exception()
PPC32 uses nonrecoverable_exception() while PPC64 uses unrecoverable_exception(). Both functions are doing almost the same thing. This patch removes nonrecoverable_exception() Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent b9ef7b4 commit 51423a9

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

arch/powerpc/include/asm/asm-prototypes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ void program_check_exception(struct pt_regs *regs);
6363
void alignment_exception(struct pt_regs *regs);
6464
void slb_miss_bad_addr(struct pt_regs *regs);
6565
void StackOverflow(struct pt_regs *regs);
66-
void nonrecoverable_exception(struct pt_regs *regs);
6766
void kernel_fp_unavailable_exception(struct pt_regs *regs);
6867
void altivec_unavailable_exception(struct pt_regs *regs);
6968
void vsx_unavailable_exception(struct pt_regs *regs);

arch/powerpc/kernel/entry_32.S

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
794794
lis r10,MSR_KERNEL@h
795795
ori r10,r10,MSR_KERNEL@l
796796
bl transfer_to_handler_full
797-
.long nonrecoverable_exception
797+
.long unrecoverable_exception
798798
.long ret_from_except
799799
#endif
800800

@@ -1297,7 +1297,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_601)
12971297
rlwinm r3,r3,0,0,30
12981298
stw r3,_TRAP(r1)
12991299
4: addi r3,r1,STACK_FRAME_OVERHEAD
1300-
bl nonrecoverable_exception
1300+
bl unrecoverable_exception
13011301
/* shouldn't return */
13021302
b 4b
13031303

arch/powerpc/kernel/traps.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,14 +1547,6 @@ void StackOverflow(struct pt_regs *regs)
15471547
panic("kernel stack overflow");
15481548
}
15491549

1550-
void nonrecoverable_exception(struct pt_regs *regs)
1551-
{
1552-
printk(KERN_ERR "Non-recoverable exception at PC=%lx MSR=%lx\n",
1553-
regs->nip, regs->msr);
1554-
debugger(regs);
1555-
die("nonrecoverable exception", regs, SIGKILL);
1556-
}
1557-
15581550
void kernel_fp_unavailable_exception(struct pt_regs *regs)
15591551
{
15601552
enum ctx_state prev_state = exception_enter();
@@ -2090,8 +2082,8 @@ void SPEFloatingPointRoundException(struct pt_regs *regs)
20902082
*/
20912083
void unrecoverable_exception(struct pt_regs *regs)
20922084
{
2093-
printk(KERN_EMERG "Unrecoverable exception %lx at %lx\n",
2094-
regs->trap, regs->nip);
2085+
pr_emerg("Unrecoverable exception %lx at %lx (msr=%lx)\n",
2086+
regs->trap, regs->nip, regs->msr);
20952087
die("Unrecoverable exception", regs, SIGABRT);
20962088
}
20972089
NOKPROBE_SYMBOL(unrecoverable_exception);

0 commit comments

Comments
 (0)