All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: "xuqiang (M)" <xuqiang36@huawei.com>
Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, rui.xiang@huawei.com
Subject: Re: [PATCH -next] irq-chip/gic-v3-its: Fixed an issue where the ITS executes the residual commands in the queue again when the ITS wakes up from sleep mode.
Date: Mon, 09 Nov 2020 10:43:09 +0000	[thread overview]
Message-ID: <338d65dfeac0cc026c74d9e78ec6f0c1@kernel.org> (raw)
In-Reply-To: <32592d73-9800-f420-eb00-474d9ded6155@huawei.com>

On 2020-11-09 03:05, xuqiang (M) wrote:
> 在 2020/11/8 0:54, Marc Zyngier 写道:
>> [dropping Jason, whose email address has been bouncing for weeks now]
>> 
>> On 2020-11-07 10:42, Xu Qiang wrote:
>>> On my platform, ITS_FLAGS_SAVE_SUSPEND_STATE is not set,thus do 
>>> nothing
>> 
>> Which platform?
> Hisi Ascend platform
>> 
>>> in its suspend and resuse function.On the other hand,firmware stores
>>> GITS_CTRL,GITS_CBASER,GITS_CWRITER and GITS_BASER<n> in the suspend,
>>> and restores these registers in the resume. As a result, the ITS 
>>> executes
>>> the residual commands in the queue.
>> 
>> Which firmware are you using? I just had a look at the trusted 
>> firmware source
>> code, and while it definitely does something that *looks* like what 
>> you are
>> describing, it doesn't re-enable the ITS on resume.
>> 
>> So what are you running?
> 
> I am using ATF. Since ITS_FLAGS_SAVE_SUSPEND_STATE is not set,ITS
> driver of OS will
> 
> not re-enable ITS in th resume. To make ITS work properly, we changed
> the ATF code
> 
> to re-enable ITS on resume.

I don't think the words "work properly" apply here.

The kernel didn't do what you wanted, so instead of fixing the kernel, 
you
introduced a bug that results in memory corruption from the firmware.

What are you plans to fix your firmware? Because from an upstream ATF
compatibility PoV, all there is to do is to fixup the command queue and
enable the ITS.

         M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2020-11-09 10:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-07 10:42 [PATCH -next] irq-chip/gic-v3-its: Fixed an issue where the ITS executes the residual commands in the queue again when the ITS wakes up from sleep mode Xu Qiang
2020-11-07 16:54 ` Marc Zyngier
2020-11-09  3:05   ` xuqiang (M)
2020-11-09 10:43     ` Marc Zyngier [this message]
2020-11-10  9:09       ` xuqiang (M)
2020-11-17 13:37         ` xuqiang (M)
2020-11-22 12:47 ` Marc Zyngier
2020-11-23 16:45 ` [irqchip: irq/irqchip-next] irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend irqchip-bot for Xu Qiang
  -- strict thread matches above, loose matches on Subject: below --
2020-11-03  8:11 [PATCH -next] irq-chip/gic-v3-its: Fixed an issue where the ITS executes the residual commands in the queue again when the ITS wakes up from sleep mode Xu Qiang
2020-11-03 18:19 ` Marc Zyngier
2020-11-05 11:54   ` xuqiang (M)
2020-11-05 13:12     ` Marc Zyngier
2020-11-05 14:06       ` xuqiang (M)
2020-11-05 14:24         ` Marc Zyngier
2020-11-06 10:05           ` xuqiang (M)

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=338d65dfeac0cc026c74d9e78ec6f0c1@kernel.org \
    --to=maz@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rui.xiang@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=xuqiang36@huawei.com \
    /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.