提交 cf8d9432 编写于 作者: M Mike Frysinger

Blackfin: only build irqpanic.c when needed

The irq_panic function is only used when CONFIG_DEBUG_ICACHE_CHECK is
enabled, so move the conditional build to the Makefile rather than
wrapping all of the contents of the file.
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
上级 abea0bc3
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
obj-y := \ obj-y := \
cache.o cache-c.o entry.o head.o \ cache.o cache-c.o entry.o head.o \
interrupt.o irqpanic.o arch_checks.o ints-priority.o interrupt.o arch_checks.o ints-priority.o
obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o
obj-$(CONFIG_PM) += pm.o dpmc_modes.o obj-$(CONFIG_PM) += pm.o dpmc_modes.o
...@@ -12,3 +12,4 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq.o ...@@ -12,3 +12,4 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq.o
obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o
obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o
obj-$(CONFIG_DEBUG_ICACHE_CHECK) += irqpanic.o
...@@ -30,21 +30,17 @@ ...@@ -30,21 +30,17 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/traps.h>
#include <asm/blackfin.h> #include <asm/blackfin.h>
#ifdef CONFIG_DEBUG_ICACHE_CHECK
#define L1_ICACHE_START 0xffa10000 #define L1_ICACHE_START 0xffa10000
#define L1_ICACHE_END 0xffa13fff #define L1_ICACHE_END 0xffa13fff
void irq_panic(int reason, struct pt_regs *regs) __attribute__ ((l1_text));
#endif
/* /*
* irq_panic - calls panic with string setup * irq_panic - calls panic with string setup
*/ */
__attribute__ ((l1_text))
asmlinkage void irq_panic(int reason, struct pt_regs *regs) asmlinkage void irq_panic(int reason, struct pt_regs *regs)
{ {
#ifdef CONFIG_DEBUG_ICACHE_CHECK
unsigned int cmd, tag, ca, cache_hi, cache_lo, *pa; unsigned int cmd, tag, ca, cache_hi, cache_lo, *pa;
unsigned short i, j, die; unsigned short i, j, die;
unsigned int bad[10][6]; unsigned int bad[10][6];
...@@ -126,9 +122,6 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs) ...@@ -126,9 +122,6 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs)
bad[j][3], bad[j][4], bad[j][5]); bad[j][3], bad[j][4], bad[j][5]);
} }
panic("icache coherency error"); panic("icache coherency error");
} else { } else
printk(KERN_EMERG "icache checked, and OK\n"); printk(KERN_EMERG "icache checked, and OK\n");
}
#endif
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册