mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
0630e45c88
commit
027e56e685
|
@ -13,6 +13,7 @@
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <asm/smp.h>
|
||||||
|
|
||||||
static inline struct intc2_desc *get_intc2_desc(unsigned int irq)
|
static inline struct intc2_desc *get_intc2_desc(unsigned int irq)
|
||||||
{
|
{
|
||||||
|
@ -24,14 +25,18 @@ static void disable_intc2_irq(unsigned int irq)
|
||||||
{
|
{
|
||||||
struct intc2_data *p = get_irq_chip_data(irq);
|
struct intc2_data *p = get_irq_chip_data(irq);
|
||||||
struct intc2_desc *d = get_intc2_desc(irq);
|
struct intc2_desc *d = get_intc2_desc(irq);
|
||||||
ctrl_outl(1 << p->msk_shift, d->msk_base + p->msk_offset);
|
|
||||||
|
ctrl_outl(1 << p->msk_shift, d->msk_base + p->msk_offset +
|
||||||
|
(hard_smp_processor_id() * 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void enable_intc2_irq(unsigned int irq)
|
static void enable_intc2_irq(unsigned int irq)
|
||||||
{
|
{
|
||||||
struct intc2_data *p = get_irq_chip_data(irq);
|
struct intc2_data *p = get_irq_chip_data(irq);
|
||||||
struct intc2_desc *d = get_intc2_desc(irq);
|
struct intc2_desc *d = get_intc2_desc(irq);
|
||||||
ctrl_outl(1 << p->msk_shift, d->mskclr_base + p->msk_offset);
|
|
||||||
|
ctrl_outl(1 << p->msk_shift, d->mskclr_base + p->msk_offset +
|
||||||
|
(hard_smp_processor_id() * 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -39,4 +39,6 @@ extern struct smp_fn_call_struct smp_fn_call;
|
||||||
|
|
||||||
#endif /* CONFIG_SMP */
|
#endif /* CONFIG_SMP */
|
||||||
|
|
||||||
|
#define hard_smp_processor_id() (0)
|
||||||
|
|
||||||
#endif /* __ASM_SH_SMP_H */
|
#endif /* __ASM_SH_SMP_H */
|
||||||
|
|
Loading…
Reference in New Issue