Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97216
b: refs/heads/master
c: 06a901c
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed May 23, 2008
1 parent f4d1157 commit 82ec870
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1e8d50d5a4bc7e40b119bf513804188ce2933d0
refs/heads/master: 06a901c5621f85e07e00ac4816c7ca95620ee74a
20 changes: 3 additions & 17 deletions trunk/arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1331,6 +1331,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]) &
Expand All @@ -1346,23 +1349,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
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/asm-powerpc/mpic.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,11 @@ extern void mpic_init(struct mpic *mpic);
*/


/* Change/Read the priority of an interrupt. Default is 8 for irqs and
/* Change the priority of an interrupt. Default is 8 for irqs and
* 10 for IPIs. You can call this on both IPIs and IRQ numbers, but the
* IPI number is then the offset'ed (linux irq number mapped to the IPI)
*/
extern void mpic_irq_set_priority(unsigned int irq, unsigned int pri);
extern unsigned int mpic_irq_get_priority(unsigned int irq);

/* Setup a non-boot CPU */
extern void mpic_setup_this_cpu(void);
Expand Down

0 comments on commit 82ec870

Please sign in to comment.