Skip to content

Commit ffde1de

Browse files
committed
irqchip: Gic: Support forced affinity setting
To support the affinity setting of per cpu timers in the early startup of a not yet online cpu, implement the force logic, which disables the cpu online check. Tagged for stable to allow a simple fix of the affected SoC clock event drivers. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Krzysztof Kozlowski <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Bartlomiej Zolnierkiewicz <[email protected]> Cc: Tomasz Figa <[email protected]>, Cc: Daniel Lezcano <[email protected]>, Cc: Kukjin Kim <[email protected]> Cc: [email protected], Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 01f8fa4 commit ffde1de

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/irqchip/irq-gic.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,14 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
246246
bool force)
247247
{
248248
void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
249-
unsigned int shift = (gic_irq(d) % 4) * 8;
250-
unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
249+
unsigned int cpu, shift = (gic_irq(d) % 4) * 8;
251250
u32 val, mask, bit;
252251

252+
if (!force)
253+
cpu = cpumask_any_and(mask_val, cpu_online_mask);
254+
else
255+
cpu = cpumask_first(mask_val);
256+
253257
if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
254258
return -EINVAL;
255259

0 commit comments

Comments
 (0)