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

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] powerpc: Fix setting MPIC priority

Trying to set the priority would just disable the interrupt due to an
incorrect mask used. We rarely use that call, in fact, I think only in
the powermac code for the cmd-power key combo that triggers xmon. So it
got unnoticed for a while.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>

authored by

Benjamin Herrenschmidt and committed by
Paul Mackerras
e5356640 b286e392

+8 -5
+8 -5
arch/powerpc/sysdev/mpic.c
··· 361 361 DBG("%p: %s: enable_irq: %d (src %d)\n", mpic, mpic->name, irq, src); 362 362 363 363 mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, 364 - mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & ~MPIC_VECPRI_MASK); 364 + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) & 365 + ~MPIC_VECPRI_MASK); 365 366 366 367 /* make sure mask gets to controller before we return to user */ 367 368 do { ··· 382 381 DBG("%s: disable_irq: %d (src %d)\n", mpic->name, irq, src); 383 382 384 383 mpic_irq_write(src, MPIC_IRQ_VECTOR_PRI, 385 - mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | MPIC_VECPRI_MASK); 384 + mpic_irq_read(src, MPIC_IRQ_VECTOR_PRI) | 385 + MPIC_VECPRI_MASK); 386 386 387 387 /* make sure mask gets to controller before we return to user */ 388 388 do { ··· 737 735 738 736 spin_lock_irqsave(&mpic_lock, flags); 739 737 if (is_ipi) { 740 - reg = mpic_ipi_read(irq - mpic->ipi_offset) & MPIC_VECPRI_PRIORITY_MASK; 738 + reg = mpic_ipi_read(irq - mpic->ipi_offset) & 739 + ~MPIC_VECPRI_PRIORITY_MASK; 741 740 mpic_ipi_write(irq - mpic->ipi_offset, 742 741 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); 743 742 } else { 744 - reg = mpic_irq_read(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI) 745 - & MPIC_VECPRI_PRIORITY_MASK; 743 + reg = mpic_irq_read(irq - mpic->irq_offset,MPIC_IRQ_VECTOR_PRI) 744 + & ~MPIC_VECPRI_PRIORITY_MASK; 746 745 mpic_irq_write(irq - mpic->irq_offset, MPIC_IRQ_VECTOR_PRI, 747 746 reg | (pri << MPIC_VECPRI_PRIORITY_SHIFT)); 748 747 }