exynos9611: import P610XXU1ATF2 kernel source
changes made:
find -type f -exec dos2unix {} \;
Change-Id: Id07164679b6e3b0115e36e3cd2186672f950fa44
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 651d726..ae34a1e 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -329,17 +329,35 @@
u32 val, mask, bit;
unsigned long flags;
- if (!force)
- cpu = cpumask_any_and(mask_val, cpu_online_mask);
- else
- cpu = cpumask_first(mask_val);
-
- if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
- return -EINVAL;
-
gic_lock_irqsave(flags);
+ if (unlikely(d->common->state_use_accessors & IRQD_GIC_MULTI_TARGET)) {
+ struct cpumask temp_mask;
+
+ bit = 0;
+ if (!cpumask_and(&temp_mask, mask_val, cpu_online_mask))
+ goto err_out;
+#ifndef CONFIG_SCHED_HMP
+ if (!cpumask_and(&temp_mask, &temp_mask, cpu_coregroup_mask(0)))
+ goto err_out;
+#endif
+ for_each_cpu(cpu, &temp_mask) {
+ if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
+ goto err_out;
+ bit |= gic_cpu_map[cpu];
+ }
+ bit <<= shift;
+ } else {
+ if (!force)
+ cpu = cpumask_any_and(mask_val, cpu_online_mask);
+ else
+ cpu = cpumask_first(mask_val);
+
+ if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
+ goto err_out;
+
+ bit = gic_cpu_map[cpu] << shift;
+ }
mask = 0xff << shift;
- bit = gic_cpu_map[cpu] << shift;
val = readl_relaxed(reg) & ~mask;
writel_relaxed(val | bit, reg);
gic_unlock_irqrestore(flags);
@@ -347,6 +365,9 @@
irq_data_update_effective_affinity(d, cpumask_of(cpu));
return IRQ_SET_MASK_OK_DONE;
+err_out:
+ gic_unlock_irqrestore(flags);
+ return -EINVAL;
}
#endif
@@ -360,6 +381,8 @@
irqstat = readl_relaxed(cpu_base + GIC_CPU_INTACK);
irqnr = irqstat & GICC_IAR_INT_ID_MASK;
+ dmb(ish);
+
if (likely(irqnr > 15 && irqnr < 1020)) {
if (static_key_true(&supports_deactivate))
writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI);
@@ -416,6 +439,9 @@
}
static const struct irq_chip gic_chip = {
+ .name = "GIC",
+ .irq_disable = gic_mask_irq,
+ .irq_enable = gic_unmask_irq,
.irq_mask = gic_mask_irq,
.irq_unmask = gic_unmask_irq,
.irq_eoi = gic_eoi_irq,