mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-14 09:47:20 +00:00
avr32: Build fix for CONFIG_BUG=n
Don't include the BUG trap handling code when CONFIG_BUG is not set. This fixes allnoconfig. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
This commit is contained in:
parent
bafe68034e
commit
957ecd7dc8
@ -178,6 +178,7 @@ static int do_cop_absent(u32 insn)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_BUG
|
||||||
int is_valid_bugaddr(unsigned long pc)
|
int is_valid_bugaddr(unsigned long pc)
|
||||||
{
|
{
|
||||||
unsigned short opcode;
|
unsigned short opcode;
|
||||||
@ -189,6 +190,7 @@ int is_valid_bugaddr(unsigned long pc)
|
|||||||
|
|
||||||
return opcode == AVR32_BUG_OPCODE;
|
return opcode == AVR32_BUG_OPCODE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs)
|
asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
@ -197,6 +199,7 @@ asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs)
|
|||||||
void __user *pc;
|
void __user *pc;
|
||||||
long code;
|
long code;
|
||||||
|
|
||||||
|
#ifdef CONFIG_BUG
|
||||||
if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) {
|
if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) {
|
||||||
enum bug_trap_type type;
|
enum bug_trap_type type;
|
||||||
|
|
||||||
@ -211,6 +214,7 @@ asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs)
|
|||||||
die("Kernel BUG", regs, SIGKILL);
|
die("Kernel BUG", regs, SIGKILL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user