diff options
author | Scott Wood <scottwood@freescale.com> | 2013-09-27 00:18:18 (GMT) |
---|---|---|
committer | J. German Rivera <German.Rivera@freescale.com> | 2013-10-31 18:36:34 (GMT) |
commit | ace0975ae06aab2bfa145d9bc87a207b1bbd7c80 (patch) | |
tree | d10caa1986947b9a2fd93b5da16cef8f7d81fe76 | |
parent | 5849bd78544ecccc7978a1ce97522fe38e44d15a (diff) | |
download | linux-fsl-qoriq-ace0975ae06aab2bfa145d9bc87a207b1bbd7c80.tar.xz |
powerpc/mpic: Disable preemption when calling mpic_processor_id()
Otherwise, we get a debug traceback due to the use of
smp_processor_id() (or get_paca()) inside hard_smp_processor_id().
mpic_host_map() is just looking for a default CPU, so it doesn't matter
if we migrate after getting the CPU ID.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/sysdev/mpic.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c index c8e41c0..f1976d2 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c @@ -1071,8 +1071,14 @@ static int mpic_host_map(struct irq_domain *h, unsigned int virq, * is done here. */ if (!mpic_is_ipi(mpic, hw) && (mpic->flags & MPIC_NO_RESET)) { + int cpu; + + preempt_disable(); + cpu = mpic_processor_id(mpic); + preempt_enable(); + mpic_set_vector(virq, hw); - mpic_set_destination(virq, mpic_processor_id(mpic)); + mpic_set_destination(virq, cpu); mpic_irq_set_priority(virq, 8); } |