Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: Hook up hard_smp_processor_id() for INTC2 block.

We need to know the CPU ID in order to calculate the mask and ack
registers effectively. Stub this in for UP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+9 -2
+7 -2
arch/sh/kernel/cpu/irq/intc2.c
··· 13 13 #include <linux/kernel.h> 14 14 #include <linux/interrupt.h> 15 15 #include <linux/io.h> 16 + #include <asm/smp.h> 16 17 17 18 static inline struct intc2_desc *get_intc2_desc(unsigned int irq) 18 19 { ··· 25 24 { 26 25 struct intc2_data *p = get_irq_chip_data(irq); 27 26 struct intc2_desc *d = get_intc2_desc(irq); 28 - ctrl_outl(1 << p->msk_shift, d->msk_base + p->msk_offset); 27 + 28 + ctrl_outl(1 << p->msk_shift, d->msk_base + p->msk_offset + 29 + (hard_smp_processor_id() * 4)); 29 30 } 30 31 31 32 static void enable_intc2_irq(unsigned int irq) 32 33 { 33 34 struct intc2_data *p = get_irq_chip_data(irq); 34 35 struct intc2_desc *d = get_intc2_desc(irq); 35 - ctrl_outl(1 << p->msk_shift, d->mskclr_base + p->msk_offset); 36 + 37 + ctrl_outl(1 << p->msk_shift, d->mskclr_base + p->msk_offset + 38 + (hard_smp_processor_id() * 4)); 36 39 } 37 40 38 41 /*
+2
include/asm-sh/smp.h
··· 39 39 40 40 #endif /* CONFIG_SMP */ 41 41 42 + #define hard_smp_processor_id() (0) 43 + 42 44 #endif /* __ASM_SH_SMP_H */