Re: [PATCH 1/3] cobalt: Prepare for new signature of __request_percpu_irq() in 6.19
Florian Bezdeka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2026-02-16 at 12:43 +0100, Jan Kiszka wrote: > On 16.02.26 12:22, Florian Bezdeka wrote: > > On Mon, 2026-02-16 at 12:16 +0100, Jan Kiszka wrote: > > > On 16.02.26 12:15, Florian Bezdeka wrote: > > > > On Mon, 2026-02-16 at 12:11 +0100, Jan Kiszka wrote: > > > > > On 16.02.26 11:58, Florian Bezdeka wrote: > > > > > > Since 6.19 the signature of __request_percpu_irq() got one additional > > > > > > affinity parameter. > > > > > > > > > > > > A new Linux version specific wrapper cobalt_request_percpu_irq() is > > > > > > introduced to hide the signature change between different Linux > > > > > > versions. > > > > > > > > > > > > Signed-off-by: Florian Bezdeka <[email protected]> > > > > > > --- > > > > > > include/cobalt/kernel/dovetail/pipeline/irq.h | 20 ++++++++++++++++++++ > > > > > > include/cobalt/kernel/dovetail/pipeline/pipeline.h | 10 +++++----- > > > > > > include/cobalt/kernel/dovetail/pipeline/sirq.h | 8 +++----- > > > > > > kernel/cobalt/dovetail/tick.c | 8 ++++---- > > > > > > 4 files changed, 32 insertions(+), 14 deletions(-) > > > > > > > > > > > > diff --git a/include/cobalt/kernel/dovetail/pipeline/irq.h b/include/cobalt/kernel/dovetail/pipeline/irq.h > > > > > > index 55d9b8ff17cd08e5e8c09aec393a1e23736c1b76..ac780a4bb3223889ccf827b5b8cb279035a5dd7b 100644 > > > > > > --- a/include/cobalt/kernel/dovetail/pipeline/irq.h > > > > > > +++ b/include/cobalt/kernel/dovetail/pipeline/irq.h > > > > > > @@ -5,6 +5,26 @@ > > > > > > #ifndef _COBALT_KERNEL_DOVETAIL_IRQ_H > > > > > > #define _COBALT_KERNEL_DOVETAIL_IRQ_H > > > > > > > > > > > > +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 19, 0) > > > > > > +static inline int cobalt_request_percpu_irq(unsigned int irq, > > > > > > + irq_handler_t handler, > > > > > > + unsigned long flags, > > > > > > + const char *devname, > > > > > > + void __percpu *dev_id) > > > > > > +{ > > > > > > + return __request_percpu_irq(irq, handler, flags, devname, dev_id); > > > > > > +} > > > > > > +#else > > > > > > +static inline int cobalt_request_percpu_irq(unsigned int irq, > > > > > > + irq_handler_t handler, > > > > > > + unsigned long flags, > > > > > > + const char *devname, > > > > > > + void __percpu *dev_id) > > > > > > +{ > > > > > > + return __request_percpu_irq(irq, handler, flags, devname, NULL, dev_id); > > > > > > +} > > > > > > +#endif > > > > > > > > > > Please use a define for request_percpu_irq on older kernels that uses > > > > > the new signature and resolves to the old one via __request_percpu_irq > > > > > as needed. > > > > > Yes, also switch to request_percpu_irq directly because > > > > > __request_percpu_irq is going to be removed in 7.0. > > > > > > > > > > > > > request_percpu_irq() doesn't allow us to specify the flags. IRQF_OOB and > > > > IRQF_NO_THREAD would be needed. > > > > > > Then request_percpu_irq_affinity - whatever survives 7.0 already as well. > > > > > > > No flags as well. > > > > I was not aware of __request_percpu_irq() being renamed in 7.0. Will try > > to find something else, but that doesn't look promising at the moment. > > > > Ouch, indeed, trouble ahead (or extra API needed from dovetail). If this > becomes a blocker moving forward with 6.19, just re-#define > __request_percpu_irq for now. This is what this patch does, avoiding a strange function name override. Anyhow, as this way turned out to be not future prove I might have to provide an additional API in dovetail. Evl should have the same problem, so reuse seems likely.