Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 258201
b: refs/heads/master
c: 5dfc54e
h: refs/heads/master
i:
  258199: e0550d3
v: v3
  • Loading branch information
Russell King committed Jul 21, 2011
1 parent 281ef69 commit d4eee4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 2ef75701d1711a1feee2a82b42a2597ddc05f88b
refs/heads/master: 5dfc54e087c15f823ee9b6541d2f0f314e69cbed
6 changes: 3 additions & 3 deletions trunk/arch/arm/common/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
{
void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
unsigned int shift = (d->irq % 4) * 8;
unsigned int cpu = cpumask_first(mask_val);
unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
u32 val, mask, bit;

if (cpu >= 8)
if (cpu >= 8 || cpu >= nr_cpu_ids)
return -EINVAL;

mask = 0xff << shift;
Expand All @@ -193,7 +193,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
writel_relaxed(val | bit, reg);
spin_unlock(&irq_controller_lock);

return 0;
return IRQ_SET_MASK_OK;
}
#endif

Expand Down

0 comments on commit d4eee4b

Please sign in to comment.