lkml.org 
[lkml]   [2017]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH RFC] irqchip: gic-v3: Support forced cpu irq affinity setting
Date
Skip check for online cpu mask when setting irq affinity of per cpu timer
during early startup of not yet online cpu.

Signed-off-by: Shaik Ameer Basha <shaik.ameer@samsung.com>
Signed-off-by: Aswani Reddy <aswani.reddy@samsung.com>
Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
drivers/irqchip/irq-gic-v3.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

Currently when non boot CPUs comes up and if setting of IRQ affinity gets called
before cpu online status gets updated, gic_mpidr_to_affinity() returns
undesirable cpu number. Using __force__ flag ignore cpu_online_mask and setup
the intended cpu affinity for the irq.

The same approch is used in gicv2
(commit: ffde1de64012c: irqchip: Gic: Support forced affinity setting)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index dbffb7a..c238c64 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -640,11 +640,16 @@ static void gic_smp_init(void)
static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
bool force)
{
- unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
+ unsigned int cpu;
void __iomem *reg;
int enabled;
u64 val;

+ if (!force)
+ cpu = cpumask_any_and(mask_val, cpu_online_mask);
+ else
+ cpu = cpumask_first(mask_val);
+
if (cpu >= nr_cpu_ids)
return -EINVAL;

--
2.7.4
\
 
 \ /
  Last update: 2017-08-08 11:12    [W:0.024 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site