public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Liu hua <sdu.liu@huawei.com>
Cc: "tglx@linutronix.de" <tglx@linutronix.de>,
	"jason@lakedaemon.net" <jason@lakedaemon.net>,
	"nicolas.pitre@linaro.org" <nicolas.pitre@linaro.org>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"ebiederm@xmission.com" <ebiederm@xmission.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"wangnan0@huawei.com" <wangnan0@huawei.com>,
	"liuxueliu.liu@huawei.com" <liuxueliu.liu@huawei.com>,
	"peifeiyue@huawei.com" <peifeiyue@huawei.com>,
	"liusdu@126.com" <liusdu@126.com>,
	Marc Zyngier <Marc.Zyngier@arm.com>
Subject: Re: [RFC PATCH 0/2] irqchip: GIC: check and clear GIC interupt active status
Date: Mon, 14 Jul 2014 10:57:47 +0100	[thread overview]
Message-ID: <20140714095747.GB1779@arm.com> (raw)
In-Reply-To: <53C34CF2.5050209@huawei.com>

On Mon, Jul 14, 2014 at 04:22:26AM +0100, Liu hua wrote:
> On 2014/7/11 20:35, Will Deacon wrote:
> > On Fri, Jul 11, 2014 at 07:46:15AM +0100, Liu Hua wrote:
> >> So guys, Do you know a better way to do that? 
> > What happens if, in the crash kernel, you disable the CPU interfaces
> > (GICC_CTLR.ENABLE) then disable the distributor (GICD_CTLR.ENABLE) before
> > enabling everything again in the reverse order? Is that enough to cause the
> > GIC to drop any active states? It's not clear to me from a quick look at
> > the TRM.
> > 
> 
> I did what you said at the beginning of "gic_dist_init". The active states
> remained (panic in local timer interrupt (PPI))and the kernel failed to boot,
> Did I do that at wrong place?
> 
> -------------------
> diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
> index b6b0a81..94d6352 100644
> --- a/drivers/irqchip/irq-gic.c
> +++ b/drivers/irqchip/irq-gic.c
> @@ -454,6 +455,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic)
>         void __iomem *base = gic_data_dist_base(gic);
>         void __iomem *cpu_base = gic_data_cpu_base(gic);
> 
> + writel_relaxed(0, base + GIC_CPU_CTRL);
>         writel_relaxed(0, base + GIC_DIST_CTRL);
> 
>         /*
> ------------------------
> 
> As shown in GIC Architecture Specification manual,I think that the GICC_CTLR.ENABLE
> and GICD_CTLR.ENABLE only control the delivering of the interrupt, not the active
> states.
> 
> As GIC manual says "For every read of a valid Interrupt ID from the GICC_IAR, the
> connected processor must perform a matching write to the GICC_EOIR". So we should
> find a way to drop the active states when booting, if we do not remain these active
> states by design.

Understood, my suggestion above was a speculative effort to see what the
hardware would do. Something along the lines of what you've done in your
patch makes sense to me, but we'll need to wait for Marc's input (he's on
holiday at the moment).

Will

      reply	other threads:[~2014-07-14  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-11  6:46 [RFC PATCH 0/2] irqchip: GIC: check and clear GIC interupt active status Liu Hua
2014-07-11  6:46 ` [RFC PATCH 1/2] irqchip: GIC: introduce ICPIDR2 register interface Liu Hua
2014-07-11  6:46 ` [RFC PATCH 2/2] irqchip: GIC: introduce method to deactive interupts Liu Hua
2014-07-11 12:35 ` [RFC PATCH 0/2] irqchip: GIC: check and clear GIC interupt active status Will Deacon
2014-07-14  3:22   ` Liu hua
2014-07-14  9:57     ` Will Deacon [this message]

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=20140714095747.GB1779@arm.com \
    --to=will.deacon@arm.com \
    --cc=Marc.Zyngier@arm.com \
    --cc=ebiederm@xmission.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=liusdu@126.com \
    --cc=liuxueliu.liu@huawei.com \
    --cc=nicolas.pitre@linaro.org \
    --cc=peifeiyue@huawei.com \
    --cc=sdu.liu@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=wangnan0@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