diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-03-13 18:52:13 -0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-03-13 18:56:15 -0400 |
commit | 957ecd7dc835d40d110e8c8f460d1956420f86b1 (patch) | |
tree | 385285c2f3213813b442228e36a56eb65f798106 /arch/avr32/kernel/traps.c | |
parent | bafe68034e3ef5e9f512bd0468001caf34981c41 (diff) |
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>
Diffstat (limited to 'arch/avr32/kernel/traps.c')
-rw-r--r-- | arch/avr32/kernel/traps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/avr32/kernel/traps.c b/arch/avr32/kernel/traps.c index cf6f686d9b0b..b835c4c01368 100644 --- a/arch/avr32/kernel/traps.c +++ b/arch/avr32/kernel/traps.c | |||
@@ -178,6 +178,7 @@ static int do_cop_absent(u32 insn) | |||
178 | return 0; | 178 | return 0; |
179 | } | 179 | } |
180 | 180 | ||
181 | #ifdef CONFIG_BUG | ||
181 | int is_valid_bugaddr(unsigned long pc) | 182 | int is_valid_bugaddr(unsigned long pc) |
182 | { | 183 | { |
183 | unsigned short opcode; | 184 | unsigned short opcode; |
@@ -189,6 +190,7 @@ int is_valid_bugaddr(unsigned long pc) | |||
189 | 190 | ||
190 | return opcode == AVR32_BUG_OPCODE; | 191 | return opcode == AVR32_BUG_OPCODE; |
191 | } | 192 | } |
193 | #endif | ||
192 | 194 | ||
193 | asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs) | 195 | asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs) |
194 | { | 196 | { |
@@ -197,6 +199,7 @@ asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs) | |||
197 | void __user *pc; | 199 | void __user *pc; |
198 | long code; | 200 | long code; |
199 | 201 | ||
202 | #ifdef CONFIG_BUG | ||
200 | if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) { | 203 | if (!user_mode(regs) && (ecr == ECR_ILLEGAL_OPCODE)) { |
201 | enum bug_trap_type type; | 204 | enum bug_trap_type type; |
202 | 205 | ||
@@ -211,6 +214,7 @@ asmlinkage void do_illegal_opcode(unsigned long ecr, struct pt_regs *regs) | |||
211 | die("Kernel BUG", regs, SIGKILL); | 214 | die("Kernel BUG", regs, SIGKILL); |
212 | } | 215 | } |
213 | } | 216 | } |
217 | #endif | ||
214 | 218 | ||
215 | local_irq_enable(); | 219 | local_irq_enable(); |
216 | 220 | ||