linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Abel Vesa <abel.vesa@nxp.com>
To: Martin Kepplinger <martin.kepplinger@puri.sm>
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: cpuidle on i.MX8MQ
Date: Thu, 4 Nov 2021 13:04:31 +0200	[thread overview]
Message-ID: <YYO+P20H7thHC1yy@ryzen> (raw)
In-Reply-To: <71bf7c49bf7cb68d8b7a0177648bce37dd4f5d73.camel@puri.sm>

On 21-11-03 13:09:15, Martin Kepplinger wrote:
> Am Dienstag, dem 02.11.2021 um 11:55 +0100 schrieb Alexander Stein:
> > Hello,
> > 
> > I was hit by the errata e11171 on imx8mq on our custom board. I found
> > [1] from over 2 years ago, and the even older patchset [2].
> > Is there some final conclusion or fix regarding this errata? From
> > what
> > I understand the proposed change is apparently not acceptable in
> > mainline for several reasons. I'm wondering what's the current
> > status.

Unfortunately, there is not gonna be an upstream solution for this
errata. Long story short, the SOC is missing wakeup lines from gic
to gpc. This means the IPIs are affected. So, knowing all that,
in order to wake up a core, you need to write a bit in some register
in gpc. The SW workaround (non upstreamable) I provided does exactly
that by hijacking the gic_raise_softirq __smp_cross_call handler and
registers a wrapper over it which also calls into ATF (using SIP)
and wakes up that specific core by writing into the gpc register.

There is no other possible way to wake up a core on 8MQ.

> > As suggested at that time, the only solution (right now) is to
> > disable
> > cpuidle on imx8mq?
> > 

Yes, the vendor actually suggests that, but you can use the mentioned
hack.

> > Best regards,
> > Alexander
> > 
> > [1] https://lkml.org/lkml/2019/6/10/350
> > [2] https://lkml.org/lkml/2019/3/27/542
> > 
> 
> Hi Alexander, hi Abel,
> 
> At this point my understanding is basically the same. We carry (a
> slight variation of) the above in our tree ever since in oder to have
> the cpu-sleep sleep state. Not using it is not acceptable to us :)
> 
> Until now there's one internal API change we need to revert (bring
> back) in order for this to work. For reference, this is our current
> implementation:
> 
> https://source.puri.sm/martin.kepplinger/linux-next/-/compare/0b90c3622755e0155632d8cc25edd4eb7f875968...ce4803745a180adc8d87891d4ff8dff1c7bd5464
> 
> Abel, can you still say that, in case this solution won't apply anymore
> in the future, that you would be available to create an update?
> 

I'll try to find a workaround soon, based on the same general idea
behind the current one you guys are using. I'll do this in my own time
since the company does not allocate resources for 8MQ cpuidle support anymore.

> Can you even imagine a possibly acceptable solution for mainline to
> this? Nothing is completely set in stone with Linux :)

I believe Marc was pretty clear about not accepting such a workaround
(and, TBH, it makes perfect sense not to).

Since I don't think there is any other way that would go around the
gic driver, I believe this has hit an end when it comes to upstream support.

Sorry about that.

I'm open to any suggestions though.

> 
> thank you very much,
> 
>                                  martin
> 
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-11-04 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 10:55 cpuidle on i.MX8MQ Alexander Stein
2021-11-03 12:09 ` Martin Kepplinger
2021-11-04 11:04   ` Abel Vesa [this message]
2021-11-29 13:40     ` Martin Kepplinger
2021-12-03  8:38       ` Abel Vesa

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=YYO+P20H7thHC1yy@ryzen \
    --to=abel.vesa@nxp.com \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=martin.kepplinger@puri.sm \
    /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).