aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-06-13 10:14:24 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-18 21:40:49 -0400
commitcf8d943260528b669c9f0fa6fb4f1c17cab0ecda (patch)
tree51fe7ff834db26fac9d455cb464f890ed0dfb8dc /arch/blackfin
parentabea0bc3d990e5d80f6112985cecee68922a08a3 (diff)
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: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/mach-common/Makefile3
-rw-r--r--arch/blackfin/mach-common/irqpanic.c11
2 files changed, 4 insertions, 10 deletions
diff --git a/arch/blackfin/mach-common/Makefile b/arch/blackfin/mach-common/Makefile
index 1f3228ed713f..dd8b2dc97f56 100644
--- a/arch/blackfin/mach-common/Makefile
+++ b/arch/blackfin/mach-common/Makefile
@@ -4,7 +4,7 @@
4 4
5obj-y := \ 5obj-y := \
6 cache.o cache-c.o entry.o head.o \ 6 cache.o cache-c.o entry.o head.o \
7 interrupt.o irqpanic.o arch_checks.o ints-priority.o 7 interrupt.o arch_checks.o ints-priority.o
8 8
9obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o 9obj-$(CONFIG_BFIN_ICACHE_LOCK) += lock.o
10obj-$(CONFIG_PM) += pm.o dpmc_modes.o 10obj-$(CONFIG_PM) += pm.o dpmc_modes.o
@@ -12,3 +12,4 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq.o
12obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o 12obj-$(CONFIG_CPU_VOLTAGE) += dpmc.o
13obj-$(CONFIG_SMP) += smp.o 13obj-$(CONFIG_SMP) += smp.o
14obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o 14obj-$(CONFIG_BFIN_KERNEL_CLOCK) += clocks-init.o
15obj-$(CONFIG_DEBUG_ICACHE_CHECK) += irqpanic.o
diff --git a/arch/blackfin/mach-common/irqpanic.c b/arch/blackfin/mach-common/irqpanic.c
index 05004df0f78b..883e3241b17e 100644
--- a/arch/blackfin/mach-common/irqpanic.c
+++ b/arch/blackfin/mach-common/irqpanic.c
@@ -30,21 +30,17 @@
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/kernel_stat.h> 31#include <linux/kernel_stat.h>
32#include <linux/sched.h> 32#include <linux/sched.h>
33#include <asm/traps.h>
34#include <asm/blackfin.h> 33#include <asm/blackfin.h>
35 34
36#ifdef CONFIG_DEBUG_ICACHE_CHECK
37#define L1_ICACHE_START 0xffa10000 35#define L1_ICACHE_START 0xffa10000
38#define L1_ICACHE_END 0xffa13fff 36#define L1_ICACHE_END 0xffa13fff
39void irq_panic(int reason, struct pt_regs *regs) __attribute__ ((l1_text));
40#endif
41 37
42/* 38/*
43 * irq_panic - calls panic with string setup 39 * irq_panic - calls panic with string setup
44 */ 40 */
41__attribute__ ((l1_text))
45asmlinkage void irq_panic(int reason, struct pt_regs *regs) 42asmlinkage void irq_panic(int reason, struct pt_regs *regs)
46{ 43{
47#ifdef CONFIG_DEBUG_ICACHE_CHECK
48 unsigned int cmd, tag, ca, cache_hi, cache_lo, *pa; 44 unsigned int cmd, tag, ca, cache_hi, cache_lo, *pa;
49 unsigned short i, j, die; 45 unsigned short i, j, die;
50 unsigned int bad[10][6]; 46 unsigned int bad[10][6];
@@ -126,9 +122,6 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs)
126 bad[j][3], bad[j][4], bad[j][5]); 122 bad[j][3], bad[j][4], bad[j][5]);
127 } 123 }
128 panic("icache coherency error"); 124 panic("icache coherency error");
129 } else { 125 } else
130 printk(KERN_EMERG "icache checked, and OK\n"); 126 printk(KERN_EMERG "icache checked, and OK\n");
131 }
132#endif
133
134} 127}