Skip to content

Commit

Permalink
powerpc/mpic: Disable preemption when calling mpic_processor_id()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Scott Wood authored and Benjamin Herrenschmidt committed Oct 11, 2013
1 parent f036b36 commit 32dda05
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,8 +1088,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);
}

Expand Down

0 comments on commit 32dda05

Please sign in to comment.