Skip to content

Commit

Permalink
MIPS: Fix build error for non-malta VSMP kernel
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Anoop P A <anoop.pa@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/2039/
Signed-off-by: John Crispin <blogic@openwrt.org>
  • Loading branch information
Anoop P A authored and John Crispin committed Aug 22, 2012
1 parent 62cedc4 commit 1c59924
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/mips/kernel/smp-mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,15 @@ 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 */
if (gic_present)
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);
}
Expand Down

0 comments on commit 1c59924

Please sign in to comment.