diff options
author | Scott Wood <scottwood@freescale.com> | 2013-09-26 20:18:18 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 01:48:58 -0400 |
commit | 32dda05f4ec2b854b594bd91590c46c5197d77e1 (patch) | |
tree | aaaf84a63f8a96ff8073a736aa357104b9f9395c /arch/powerpc/sysdev | |
parent | f036b368196263f648bede42bbbe1c1e6e834d10 (diff) |
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>
Diffstat (limited to 'arch/powerpc/sysdev')
-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 1be54faf60dd..bdcb8588e492 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c | |||
@@ -1088,8 +1088,14 @@ static int mpic_host_map(struct irq_domain *h, unsigned int virq, | |||
1088 | * is done here. | 1088 | * is done here. |
1089 | */ | 1089 | */ |
1090 | if (!mpic_is_ipi(mpic, hw) && (mpic->flags & MPIC_NO_RESET)) { | 1090 | if (!mpic_is_ipi(mpic, hw) && (mpic->flags & MPIC_NO_RESET)) { |
1091 | int cpu; | ||
1092 | |||
1093 | preempt_disable(); | ||
1094 | cpu = mpic_processor_id(mpic); | ||
1095 | preempt_enable(); | ||
1096 | |||
1091 | mpic_set_vector(virq, hw); | 1097 | mpic_set_vector(virq, hw); |
1092 | mpic_set_destination(virq, mpic_processor_id(mpic)); | 1098 | mpic_set_destination(virq, cpu); |
1093 | mpic_irq_set_priority(virq, 8); | 1099 | mpic_irq_set_priority(virq, 8); |
1094 | } | 1100 | } |
1095 | 1101 | ||