diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 13:20:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 13:20:54 -0400 |
commit | b6844e8f64920cdee620157252169ba63afb0c89 (patch) | |
tree | 339a447f4d1b6b2a447d10d24de227ddfbd4cc65 /arch/arm/common/gic.c | |
parent | 2f175074e6811974ee77ddeb026f4d21aa3eca4d (diff) | |
parent | 3ad55155b222f2a901405dea20ff7c68828ecd92 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (237 commits)
ARM: 7004/1: fix traps.h compile warnings
ARM: 6998/2: kernel: use proper memory barriers for bitops
ARM: 6997/1: ep93xx: increase NR_BANKS to 16 for support of 128MB RAM
ARM: Fix build errors caused by adding generic macros
ARM: CPU hotplug: ensure we migrate all IRQs off a downed CPU
ARM: CPU hotplug: pass in proper affinity mask on IRQ migration
ARM: GIC: avoid routing interrupts to offline CPUs
ARM: CPU hotplug: fix abuse of irqdesc->node
ARM: 6981/2: mmci: adjust calculation of f_min
ARM: 7000/1: LPAE: Use long long printk format for displaying the pud
ARM: 6999/1: head, zImage: Always Enter the kernel in ARM state
ARM: btc: avoid invalidating the branch target cache on kernel TLB maintanence
ARM: ARM_DMA_ZONE_SIZE is no more
ARM: mach-shark: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
ARM: mach-sa1100: move ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
ARM: mach-realview: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
ARM: mach-pxa: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
ARM: mach-ixp4xx: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
ARM: mach-h720x: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
ARM: mach-davinci: move from ARM_DMA_ZONE_SIZE to mdesc->dma_zone_size
...
Diffstat (limited to 'arch/arm/common/gic.c')
-rw-r--r-- | arch/arm/common/gic.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 4ddd0a6ac7ff..7bdd91766d65 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -179,22 +179,21 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, | |||
179 | { | 179 | { |
180 | void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3); | 180 | void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3); |
181 | unsigned int shift = (d->irq % 4) * 8; | 181 | unsigned int shift = (d->irq % 4) * 8; |
182 | unsigned int cpu = cpumask_first(mask_val); | 182 | unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask); |
183 | u32 val, mask, bit; | 183 | u32 val, mask, bit; |
184 | 184 | ||
185 | if (cpu >= 8) | 185 | if (cpu >= 8 || cpu >= nr_cpu_ids) |
186 | return -EINVAL; | 186 | return -EINVAL; |
187 | 187 | ||
188 | mask = 0xff << shift; | 188 | mask = 0xff << shift; |
189 | bit = 1 << (cpu + shift); | 189 | bit = 1 << (cpu + shift); |
190 | 190 | ||
191 | spin_lock(&irq_controller_lock); | 191 | spin_lock(&irq_controller_lock); |
192 | d->node = cpu; | ||
193 | val = readl_relaxed(reg) & ~mask; | 192 | val = readl_relaxed(reg) & ~mask; |
194 | writel_relaxed(val | bit, reg); | 193 | writel_relaxed(val | bit, reg); |
195 | spin_unlock(&irq_controller_lock); | 194 | spin_unlock(&irq_controller_lock); |
196 | 195 | ||
197 | return 0; | 196 | return IRQ_SET_MASK_OK; |
198 | } | 197 | } |
199 | #endif | 198 | #endif |
200 | 199 | ||