Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182122
b: refs/heads/master
c: 5772f6d
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Feb 27, 2010
1 parent b371a04 commit 7398477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: f2c194a00516f8ea4340975c25276fd0dfd47c31
refs/heads/master: 5772f6deb6214a94248e5429869e99e8b7b9cf25
14 changes: 7 additions & 7 deletions trunk/arch/mips/sibyte/sb1250/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,34 +72,34 @@ static struct irq_chip sb1250_irq_type = {
/* Store the CPU id (not the logical number) */
int sb1250_irq_owner[SB1250_NR_IRQS];

static DEFINE_SPINLOCK(sb1250_imr_lock);
static DEFINE_RAW_SPINLOCK(sb1250_imr_lock);

void sb1250_mask_irq(int cpu, int irq)
{
unsigned long flags;
u64 cur_ints;

spin_lock_irqsave(&sb1250_imr_lock, flags);
raw_spin_lock_irqsave(&sb1250_imr_lock, flags);
cur_ints = ____raw_readq(IOADDR(A_IMR_MAPPER(cpu) +
R_IMR_INTERRUPT_MASK));
cur_ints |= (((u64) 1) << irq);
____raw_writeq(cur_ints, IOADDR(A_IMR_MAPPER(cpu) +
R_IMR_INTERRUPT_MASK));
spin_unlock_irqrestore(&sb1250_imr_lock, flags);
raw_spin_unlock_irqrestore(&sb1250_imr_lock, flags);
}

void sb1250_unmask_irq(int cpu, int irq)
{
unsigned long flags;
u64 cur_ints;

spin_lock_irqsave(&sb1250_imr_lock, flags);
raw_spin_lock_irqsave(&sb1250_imr_lock, flags);
cur_ints = ____raw_readq(IOADDR(A_IMR_MAPPER(cpu) +
R_IMR_INTERRUPT_MASK));
cur_ints &= ~(((u64) 1) << irq);
____raw_writeq(cur_ints, IOADDR(A_IMR_MAPPER(cpu) +
R_IMR_INTERRUPT_MASK));
spin_unlock_irqrestore(&sb1250_imr_lock, flags);
raw_spin_unlock_irqrestore(&sb1250_imr_lock, flags);
}

#ifdef CONFIG_SMP
Expand All @@ -115,7 +115,7 @@ static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
cpu = cpu_logical_map(i);

/* Protect against other affinity changers and IMR manipulation */
spin_lock_irqsave(&sb1250_imr_lock, flags);
raw_spin_lock_irqsave(&sb1250_imr_lock, flags);

/* Swizzle each CPU's IMR (but leave the IP selection alone) */
old_cpu = sb1250_irq_owner[irq];
Expand All @@ -137,7 +137,7 @@ static int sb1250_set_affinity(unsigned int irq, const struct cpumask *mask)
____raw_writeq(cur_ints, IOADDR(A_IMR_MAPPER(cpu) +
R_IMR_INTERRUPT_MASK));
}
spin_unlock_irqrestore(&sb1250_imr_lock, flags);
raw_spin_unlock_irqrestore(&sb1250_imr_lock, flags);

return 0;
}
Expand Down

0 comments on commit 7398477

Please sign in to comment.