aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-05-23 02:53:23 -0400
committerPaul Mackerras <paulus@samba.org>2008-05-23 02:53:23 -0400
commitacf464817d5e7be9fb67aec4027dbee0ac9be17a (patch)
tree39fd061c0a91a11d3ae4ff19b7fe179325e39bbf /arch/powerpc/sysdev
parent80d267f9aee6f1b5df602b5a19fb7b4923f17db2 (diff)
parent8962cadbe7cbc4ed0fff94f56ebab505a10afd2e (diff)
Merge branch 'merge' into powerpc-next
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r--arch/powerpc/sysdev/mpic.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 466e2183e86c..f99f81abbd5c 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1334,6 +1334,9 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1334 unsigned long flags; 1334 unsigned long flags;
1335 u32 reg; 1335 u32 reg;
1336 1336
1337 if (!mpic)
1338 return;
1339
1337 spin_lock_irqsave(&mpic_lock, flags); 1340 spin_lock_irqsave(&mpic_lock, flags);
1338 if (is_ipi) { 1341 if (is_ipi) {
1339 reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) & 1342 reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) &
@@ -1349,23 +1352,6 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
1349 spin_unlock_irqrestore(&mpic_lock, flags); 1352 spin_unlock_irqrestore(&mpic_lock, flags);
1350} 1353}
1351 1354
1352unsigned int mpic_irq_get_priority(unsigned int irq)
1353{
1354 unsigned int is_ipi;
1355 struct mpic *mpic = mpic_find(irq, &is_ipi);
1356 unsigned int src = mpic_irq_to_hw(irq);
1357 unsigned long flags;
1358 u32 reg;
1359
1360 spin_lock_irqsave(&mpic_lock, flags);
1361 if (is_ipi)
1362 reg = mpic_ipi_read(src = mpic->ipi_vecs[0]);
1363 else
1364 reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
1365 spin_unlock_irqrestore(&mpic_lock, flags);
1366 return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT;
1367}
1368
1369void mpic_setup_this_cpu(void) 1355void mpic_setup_this_cpu(void)
1370{ 1356{
1371#ifdef CONFIG_SMP 1357#ifdef CONFIG_SMP