diff options
Diffstat (limited to 'arch/arm/common/gic.c')
-rw-r--r-- | arch/arm/common/gic.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 3227ca952a12..666b278e56d7 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -180,7 +180,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, | |||
180 | return -EINVAL; | 180 | return -EINVAL; |
181 | 181 | ||
182 | mask = 0xff << shift; | 182 | mask = 0xff << shift; |
183 | bit = 1 << (cpu + shift); | 183 | bit = 1 << (cpu_logical_map(cpu) + shift); |
184 | 184 | ||
185 | spin_lock(&irq_controller_lock); | 185 | spin_lock(&irq_controller_lock); |
186 | val = readl_relaxed(reg) & ~mask; | 186 | val = readl_relaxed(reg) & ~mask; |
@@ -259,9 +259,15 @@ static void __init gic_dist_init(struct gic_chip_data *gic, | |||
259 | unsigned int irq_start) | 259 | unsigned int irq_start) |
260 | { | 260 | { |
261 | unsigned int gic_irqs, irq_limit, i; | 261 | unsigned int gic_irqs, irq_limit, i; |
262 | u32 cpumask; | ||
262 | void __iomem *base = gic->dist_base; | 263 | void __iomem *base = gic->dist_base; |
263 | u32 cpumask = 1 << smp_processor_id(); | 264 | u32 cpu = 0; |
264 | 265 | ||
266 | #ifdef CONFIG_SMP | ||
267 | cpu = cpu_logical_map(smp_processor_id()); | ||
268 | #endif | ||
269 | |||
270 | cpumask = 1 << cpu; | ||
265 | cpumask |= cpumask << 8; | 271 | cpumask |= cpumask << 8; |
266 | cpumask |= cpumask << 16; | 272 | cpumask |= cpumask << 16; |
267 | 273 | ||
@@ -382,7 +388,12 @@ void __cpuinit gic_enable_ppi(unsigned int irq) | |||
382 | #ifdef CONFIG_SMP | 388 | #ifdef CONFIG_SMP |
383 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) | 389 | void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) |
384 | { | 390 | { |
385 | unsigned long map = *cpus_addr(*mask); | 391 | int cpu; |
392 | unsigned long map = 0; | ||
393 | |||
394 | /* Convert our logical CPU mask into a physical one. */ | ||
395 | for_each_cpu(cpu, mask) | ||
396 | map |= 1 << cpu_logical_map(cpu); | ||
386 | 397 | ||
387 | /* | 398 | /* |
388 | * Ensure that stores to Normal memory are visible to the | 399 | * Ensure that stores to Normal memory are visible to the |