All of lore.kernel.org
 help / color / mirror / Atom feed
From: "François Legal" <devel@thom.fr.eu.org>
To: "Philippe Gerum" <rpm@xenomai.org>
Cc: "Julien Aube" <julien.aube@smile.fr>, xenomai@xenomai.org
Subject: Re: Switching from xenomai 3.2 IPIPE to xenomai 3.3 Dovetail
Date: Tue, 19 Nov 2024 15:36:04 +0100	[thread overview]
Message-ID: <101a-673ca280-17-7629bb00@147965553> (raw)
In-Reply-To: <87v7wjed3w.fsf@xenomai.org>

Le Mardi, Novembre 19, 2024 11:23 CET, Philippe Gerum <rpm@xenomai.org> a écrit:

> François Legal <francois.legal@thom.fr.eu.org> writes:
>
> > Le Mardi, Novembre 19, 2024 10:26 CET, Julien Aube <julien.aube@smile.fr> a écrit:
> >
> >> Hello,
> >>
> >> Reading this exchange it reminds me of a problem I had a few months ago
> >> on the same platform.
> >>
> >> Here is the thead :
> >>
> >> https://lore.kernel.org/xenomai/6814fa90-015e-91df-6941-db643e4d4229@smile.fr/#r
> >>
> >>
> >> Conclusion was that disabling the scutimer(*) on DTS level was enough to
> >> restore the correct usage and I did not found
> >> any bad behaviour after that. The product has passed all the rt-test
> >> afterward.
> >>
> >>
> >> (*)
> >> &scutimer {
> >>      /* scutimer is forced to disabled since it does not work with
> >> Xenomai */
> >>      status = "disabled";
> >> };
> >>
> >> Maybe i'm completely off the subject, but maybe it's worth having a look ?
> >>
> >> Julien
> >>
> >>
> >
> > Thanks. That fixes the problem. I'll dig into that driver to try to fix it and submit a patch then.
> >
>
> This may help:
>
> diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
> index 8377f1d030c3a..a28f6b7f7eabc 100644
> --- a/arch/arm/kernel/smp_twd.c
> +++ b/arch/arm/kernel/smp_twd.c
> @@ -181,7 +181,7 @@ static irqreturn_t twd_handler(int irq, void *dev_id)
>  {
>  	struct clock_event_device *evt = dev_id;
>
> -	if (twd_timer_ack()) {
> +	if (!clockevent_is_oob(evt) || twd_timer_ack()) {
>  		clockevents_handle_event(evt);
>  		return IRQ_HANDLED;
>  	}
>

No noticeable effect here. I tried to dig a little more into this, but I can't find anything.
What I can tell, is that the TWD interrupts triggers on both cores when hung at boot. TWD registers settings seems OK in terms of prescaler and everything. By checking with JTAG debugger, I can see that xnintr_core_clock_handler is being called in the TWD service routine (twd_handler).

I'm trying a little harder, but don't really know from which angle !

François

> --
> Philippe.


  parent reply	other threads:[~2024-11-19 14:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-18  8:50 Switching from xenomai 3.2 IPIPE to xenomai 3.3 Dovetail François Legal
2024-11-18  9:01 ` Jan Kiszka
2024-11-18 10:21   ` François Legal
2024-11-18 10:32     ` Florian Bezdeka
2024-11-18 11:18       ` François Legal
2024-11-18 11:37         ` Philippe Gerum
2024-11-18 12:06           ` Florian Bezdeka
2024-11-18 13:21             ` François Legal
2024-11-18 13:37               ` Philippe Gerum
2024-11-18 13:57                 ` Florian Bezdeka
2024-11-18 14:49                   ` Philippe Gerum
2024-11-18 15:22                     ` François Legal
2024-11-18 15:33                       ` Philippe Gerum
2024-11-19  7:26                         ` François Legal
2024-11-19  9:26                           ` Julien Aube
2024-11-19 10:06                             ` François Legal
2024-11-19 10:23                               ` Philippe Gerum
2024-11-19 14:30                                 ` Philippe Gerum
2024-11-19 14:36                                 ` François Legal [this message]
2024-11-19 14:55                                   ` Philippe Gerum
2024-11-19 16:10                                     ` Philippe Gerum
2024-11-19 17:04                                       ` François Legal
2024-11-18 13:38             ` François Legal

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=101a-673ca280-17-7629bb00@147965553 \
    --to=devel@thom.fr.eu.org \
    --cc=julien.aube@smile.fr \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.