|
@@ -42,6 +42,7 @@
|
|
#include <linux/irqchip/chained_irq.h>
|
|
#include <linux/irqchip/chained_irq.h>
|
|
#include <linux/irqchip/arm-gic.h>
|
|
#include <linux/irqchip/arm-gic.h>
|
|
|
|
|
|
|
|
+#include <asm/cputype.h>
|
|
#include <asm/irq.h>
|
|
#include <asm/irq.h>
|
|
#include <asm/exception.h>
|
|
#include <asm/exception.h>
|
|
#include <asm/smp_plat.h>
|
|
#include <asm/smp_plat.h>
|
|
@@ -954,7 +955,9 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
|
|
}
|
|
}
|
|
|
|
|
|
for_each_possible_cpu(cpu) {
|
|
for_each_possible_cpu(cpu) {
|
|
- unsigned long offset = percpu_offset * cpu_logical_map(cpu);
|
|
|
|
|
|
+ u32 mpidr = cpu_logical_map(cpu);
|
|
|
|
+ u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0);
|
|
|
|
+ unsigned long offset = percpu_offset * core_id;
|
|
*per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset;
|
|
*per_cpu_ptr(gic->dist_base.percpu_base, cpu) = dist_base + offset;
|
|
*per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset;
|
|
*per_cpu_ptr(gic->cpu_base.percpu_base, cpu) = cpu_base + offset;
|
|
}
|
|
}
|