From: Julien Blanc <julien.blanc@sprinte.eu>
To: "xenomai@lists.linux.dev" <xenomai@lists.linux.dev>
Subject: Re: [PATCH] Fix flexcan interrupt request not working on non SMP systems
Date: Mon, 3 Apr 2023 08:04:40 +0000 [thread overview]
Message-ID: <15a8c3a71d9b2a75611d6d759980db592a60d197.camel@sprinte.eu> (raw)
In-Reply-To: <45c60fcea46516061189dbd840c5af889b94a44c.camel@sprinte.eu>
Looks like space/tabs have been messed up, sorry for this, i'm sending it again.
Le lundi 03 avril 2023 à 07:08 +0000, Julien Blanc a écrit :
> irq_set_affinity_hint returns -EINVAL on non-SMP systems. On such
> systems, setting the irq affinity is non-sense, so just remove the
> call in xnintr_attach (resp. xnintr_detach) if CONFIG_SMP is not defined
>
> Signed-off-by: Julien Blanc <julien.blanc@sprinte.eu>
> ---
> kernel/cobalt/dovetail/intr.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/cobalt/dovetail/intr.c b/kernel/cobalt/dovetail/intr.c
> index a9459b7a8..88116c7c8 100644
> --- a/kernel/cobalt/dovetail/intr.c
> +++ b/kernel/cobalt/dovetail/intr.c
> @@ -100,9 +100,11 @@ int xnintr_attach(struct xnintr *intr, void *cookie, const cpumask_t *cpumask)
> if (cpumask_empty(effective_mask))
> return -EINVAL;
> }
> +#ifdef CONFIG_SMP
> ret = irq_set_affinity_hint(intr->irq, effective_mask);
> if (ret)
> return ret;
> +#endif
>
> return request_irq(intr->irq, xnintr_irq_handler, IRQF_OOB,
> intr->name, intr);
> @@ -112,7 +114,9 @@ EXPORT_SYMBOL_GPL(xnintr_attach);
> void xnintr_detach(struct xnintr *intr)
> {
> secondary_mode_only();
> +#ifdef CONFIG_SMP
> irq_set_affinity_hint(intr->irq, NULL);
> +#endif
> free_irq(intr->irq, intr);
> }
> EXPORT_SYMBOL_GPL(xnintr_detach);
> --
> 2.39.2
>
prev parent reply other threads:[~2023-04-03 8:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 7:08 [PATCH] Fix flexcan interrupt request not working on non SMP systems Julien Blanc
2023-04-03 8:04 ` Julien Blanc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15a8c3a71d9b2a75611d6d759980db592a60d197.camel@sprinte.eu \
--to=julien.blanc@sprinte.eu \
--cc=xenomai@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).