Skip to contentSkip to conversation

Fix build error for non-malta VSMP kernel.

PATCH New Anoop P.A 1 participant 1 message Jan 25, 2011 MIPS

lore
Share & tools
lore

Anoop P.A

author
#0 lore raw

PATCH 1/1 Fix build error for non-malta VSMP kernel.

From: Anoop P A <[email protected]>

VSMP kernel build for non-malta platforms fails with following error

LD init/built-in.o
LD .tmp_vmlinux1
arch/mips/built-in.o: In function `vsmp_init_secondary':
smp-mt.c:(.cpuinit.text+0x23cc): undefined reference to gic_present' smp-mt.c:(.cpuinit.text+0x23d0): undefined reference to gic_present'
make: *** [.tmp_vmlinux1] Error 1

gic_present variable is declared only if IRQ_GIC is selected.

---
 arch/mips/kernel/smp-mt.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/mips/kernel/smp-mt.c +2 -0
index c0e8141..54235b5 100644
@@ -151,6 +151,7 @@ static void vsmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
 
 static void __cpuinit vsmp_init_secondary(void)
 {
+#ifdef CONFIG_IRQ_GIC
 	extern int gic_present;
 
 	/* This is Malta specific: IPI,performance and timer interrupts */
@@ -158,6 +159,7 @@ static void __cpuinit vsmp_init_secondary(void)
 		change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 |
 					 STATUSF_IP6 | STATUSF_IP7);
 	else
+#endif
 		change_c0_status(ST0_IM, STATUSF_IP0 | STATUSF_IP1 |
 					 STATUSF_IP6 | STATUSF_IP7);
 }
Signature · 1 line
1.7.0.4