* [PATCH v2] irqchip/mips-gic: allow forced affinity
@ 2025-05-26 13:41 Markus Stockhausen
2025-06-12 13:13 ` Thomas Gleixner
0 siblings, 1 reply; 4+ messages in thread
From: Markus Stockhausen @ 2025-05-26 13:41 UTC (permalink / raw)
To: tsbogend, tglx, linux-mips, linux-kernel, s.gottschall; +Cc: Markus Stockhausen
Devices of the Realtek MIPS Otto platform use the official rtl-otto-timer
as clock event generator and cpu clocksource. It is registered for cpu
startup via cpuhp_setup_state() and forces the affinity of the clockevent
interrupts to the appropriate cpu via irq_force_affinity().
On the "smaller" devices with a vendor specific interrupt controller
(supported by irq-realtek-rtl) the registration works fine. The "larger"
RTL931x series is based on a MIPS interAptiv dual core with a MIPS GIC
controller. Interrupt routing setup is cancelled because gic_set_affinity()
does not accept the current (not yet online) cpu as a target.
Relax the checks by evaluating the force parameter that is provided for
exactly this purpose like in other drivers. With this patch affinity can
be set as follows:
- force = false: allow to set affinity to any online cpu
- force = true: allow to set affinity to any cpu
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
---
drivers/irqchip/irq-mips-gic.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-mips-gic.c b/drivers/irqchip/irq-mips-gic.c
index bca8053864b2..1c2284297354 100644
--- a/drivers/irqchip/irq-mips-gic.c
+++ b/drivers/irqchip/irq-mips-gic.c
@@ -375,9 +375,13 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *cpumask,
/*
* The GIC specifies that we can only route an interrupt to one VP(E),
* ie. CPU in Linux parlance, at a time. Therefore we always route to
- * the first online CPU in the mask.
+ * the first forced or online CPU in the mask.
*/
- cpu = cpumask_first_and(cpumask, cpu_online_mask);
+ if (force)
+ cpu = cpumask_first(cpumask);
+ else
+ cpu = cpumask_first_and(cpumask, cpu_online_mask);
+
if (cpu >= NR_CPUS)
return -EINVAL;
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] irqchip/mips-gic: allow forced affinity
2025-05-26 13:41 [PATCH v2] irqchip/mips-gic: allow forced affinity Markus Stockhausen
@ 2025-06-12 13:13 ` Thomas Gleixner
2025-06-13 5:35 ` AW: " markus.stockhausen
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2025-06-12 13:13 UTC (permalink / raw)
To: Markus Stockhausen, tsbogend, linux-mips, linux-kernel,
s.gottschall
Cc: Markus Stockhausen
On Mon, May 26 2025 at 09:41, Markus Stockhausen wrote:
>
> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
> Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
This Signed-off-by chain is broken.
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin
and the following paragraphs explain it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* AW: [PATCH v2] irqchip/mips-gic: allow forced affinity
2025-06-12 13:13 ` Thomas Gleixner
@ 2025-06-13 5:35 ` markus.stockhausen
2025-06-20 15:49 ` Thomas Gleixner
0 siblings, 1 reply; 4+ messages in thread
From: markus.stockhausen @ 2025-06-13 5:35 UTC (permalink / raw)
To: 'Thomas Gleixner', tsbogend, linux-mips, linux-kernel,
s.gottschall
> Von: Thomas Gleixner <tglx@linutronix.de>
> Gesendet: Donnerstag, 12. Juni 2025 15:14
>
> On Mon, May 26 2025 at 09:41, Markus Stockhausen wrote:
> >
> > Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
> > Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
>
> This Signed-off-by chain is broken.
>
>
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-
your-work-the-developer-s-certificate-of-origin
>
> and the following paragraphs explain it.
This is my first co-authorship. So want to make sure that I understand it
correctly.
- I developed the patched and
- Sebastian gave helpful input for it.
So it should be like this?
Co-developed-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Thanks in advance.
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: AW: [PATCH v2] irqchip/mips-gic: allow forced affinity
2025-06-13 5:35 ` AW: " markus.stockhausen
@ 2025-06-20 15:49 ` Thomas Gleixner
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2025-06-20 15:49 UTC (permalink / raw)
To: markus.stockhausen, tsbogend, linux-mips, linux-kernel,
s.gottschall
On Fri, Jun 13 2025 at 07:35, markus stockhausen wrote:
>> Von: Thomas Gleixner <tglx@linutronix.de>
>> Gesendet: Donnerstag, 12. Juni 2025 15:14
>>
>> On Mon, May 26 2025 at 09:41, Markus Stockhausen wrote:
>> >
>> > Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
>> > Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
>>
>> This Signed-off-by chain is broken.
>>
>>
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-
> your-work-the-developer-s-certificate-of-origin
>>
>> and the following paragraphs explain it.
>
> This is my first co-authorship. So want to make sure that I understand it
> correctly.
>
> - I developed the patched and
> - Sebastian gave helpful input for it.
>
> So it should be like this?
>
> Co-developed-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
> Signed-off-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
> Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Yes.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-20 15:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-26 13:41 [PATCH v2] irqchip/mips-gic: allow forced affinity Markus Stockhausen
2025-06-12 13:13 ` Thomas Gleixner
2025-06-13 5:35 ` AW: " markus.stockhausen
2025-06-20 15:49 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).