[lkml]   [2019]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ITS restore/save state when HCC == 0
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
that already exist in the tables, and that is UNPRED territory.

Behavior is unpredictable if there are interrupts that are mapped to
specified collection and the collection is currently mapped to a

> --- 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))
> 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


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

 \ /
  Last update: 2019-12-02 14:23    [W:0.051 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site