From: Marc Zyngier <maz@kernel.org>
To: yaohongbo <yaohongbo@huawei.com>
Cc: "Guohanjun (Hanjun Guo)" <guohanjun@huawei.com>,
Yangyingliang <yangyingliang@huawei.com>,
Linuxarm <linuxarm@huawei.com>, <linux-kernel@vger.kernel.org>
Subject: Re: ITS restore/save state when HCC == 0
Date: Mon, 02 Dec 2019 13:22:59 +0000 [thread overview]
Message-ID: <e04e35e0a14f1507ac4a3d56899adcae@www.loen.fr> (raw)
In-Reply-To: <fd89d78030914d19939a1fc1c6eb5048@huawei.com>
Hi Yaohongbo,
In the future, please refrain from sending HTML emails, they
don't render very well and force me to reformat your email
by hand.
On 2019-12-02 12:52, yaohongbo wrote:
> Hi, marc.
>
> I met a problem with GIC ITS when I try to power off gic logic in
> suspend.
>
> In hisilicon hip08, the value of GIC_TYPER.HCC is zero, so that
> ITS_FLAGS_SAVE_SUSPEND_STATE will have no chance to be set to 1.
And that's a good thing. HCC indicates that you have collections that
are backed by registers, and not memory. Which means that once the GIC
is powered off, the state is lost.
> It goes well for s4, when I simply remove the condition judgement in
> the code.
What is "s4"? Doing so means you are reprogramming the ITS with
mappings
that already exist in the tables, and that is UNPRED territory.
<quote>
Behavior is unpredictable if there are interrupts that are mapped to
the
specified collection and the collection is currently mapped to a
Redistributor
[...]
</quote>
> --- a/drivers/irqchip/irq-gic-v3-its.c
>
> +++ b/drivers/irqchip/irq-gic-v3-its.c
>
> @@ -3670,8 +3670,8 @@ static int __init its_probe_one(struct resource
> *res,
>
> ctlr |= GITS_CTLR_ImDe;
>
> writel_relaxed(ctlr, its->base + GITS_CTLR);
>
> - if (GITS_TYPER_HCC(typer))
>
> - its->flags |= ITS_FLAGS_SAVE_SUSPEND_STATE;
>
> + its->flags |= ITS_FLAGS_SAVE_SUSPEND_STATE;
>
> err = its_init_domain(handle, its);
>
> if (err)
>
> @@ -4005,3 +4005,17 @@ int __init its_init(struct fwnode_handle
> *handle, struct rdists *rdists,
>
> return 0;
>
> }
>
> Do you have any suggestion for this case?
The expectations are that across a GIC power-off, the firmware
will restore the state of the GIC (recondiguring the various
memory tables), and that this is enough for the ITS to be
functional again, having reloaded its state from memory.
Does firmware perform this on your machine? Or are there
implementation-specific issues that require the ITS to be
reprogrammed?
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next parent reply other threads:[~2019-12-02 13:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fd89d78030914d19939a1fc1c6eb5048@huawei.com>
2019-12-02 13:22 ` Marc Zyngier [this message]
2019-12-03 2:23 ` Yao HongBo
2019-12-03 15:58 ` Marc Zyngier
2019-12-04 6:13 ` Ivid Suvarna
2019-12-04 8:03 ` Marc Zyngier
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=e04e35e0a14f1507ac4a3d56899adcae@www.loen.fr \
--to=maz@kernel.org \
--cc=guohanjun@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=yangyingliang@huawei.com \
--cc=yaohongbo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®