summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mpic.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-05-23 08:53:23 +0200
committerPaul Mackerras <paulus@samba.org>2008-05-23 08:53:23 +0200
commitacf464817d5e7be9fb67aec4027dbee0ac9be17a (patch)
tree39fd061c0a91a11d3ae4ff19b7fe179325e39bbf /arch/powerpc/sysdev/mpic.c
parent[POWERPC] Remove unnecessary cast in arch_deref_entry_point() (diff)
parent[POWERPC] iSeries: Remove unused mail address (diff)
downloadlinux-acf464817d5e7be9fb67aec4027dbee0ac9be17a.tar.xz
linux-acf464817d5e7be9fb67aec4027dbee0ac9be17a.zip
Merge branch 'merge' into powerpc-next
Diffstat (limited to 'arch/powerpc/sysdev/mpic.c')
-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)
unsigned long flags;
u32 reg;
+ if (!mpic)
+ return;
+
spin_lock_irqsave(&mpic_lock, flags);
if (is_ipi) {
reg = mpic_ipi_read(src - mpic->ipi_vecs[0]) &
@@ -1349,23 +1352,6 @@ void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
spin_unlock_irqrestore(&mpic_lock, flags);
}
-unsigned int mpic_irq_get_priority(unsigned int irq)
-{
- unsigned int is_ipi;
- struct mpic *mpic = mpic_find(irq, &is_ipi);
- unsigned int src = mpic_irq_to_hw(irq);
- unsigned long flags;
- u32 reg;
-
- spin_lock_irqsave(&mpic_lock, flags);
- if (is_ipi)
- reg = mpic_ipi_read(src = mpic->ipi_vecs[0]);
- else
- reg = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI));
- spin_unlock_irqrestore(&mpic_lock, flags);
- return (reg & MPIC_VECPRI_PRIORITY_MASK) >> MPIC_VECPRI_PRIORITY_SHIFT;
-}
-
void mpic_setup_this_cpu(void)
{
#ifdef CONFIG_SMP