public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Jon Hunter <jonathanh@nvidia.com>,
	Aniruddha Banerjee <aniruddhab@nvidia.com>,
	Thierry Reding <treding@nvidia.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	Alexander Van Brunt <avanbrunt@nvidia.com>
Subject: Re: [PATCH 1/1] arm64: tegra: fix PPI interrupt flag
Date: Mon, 3 Apr 2017 14:11:49 +0100	[thread overview]
Message-ID: <c1e1499e-166f-900b-aa45-773274ed73e8@arm.com> (raw)
In-Reply-To: <6c64238f-a462-9e05-2f04-e989c16553c6@nvidia.com>

On 03/04/17 13:55, Jon Hunter wrote:
> Adding Marc ...
> 
> On 03/04/17 12:19, Aniruddha Banerjee wrote:
>> The interrupt flag for PPI should not be set to any value, since the
>> register is read-only. Fix the flags for the PPI interrupts to
>> IRQ_TYPE_NONE, so that there is no write to the read-only register.
> 
> If the below matches the h/w default, does this really cause a problem?
> 
> Note, we will not attempt to write the type if it matches the current
> programmed type.
> 
> I had thought that the in DT file, the type for the PPI should align
> with the h/w default in the case where it cannot be written. However, I
> guess this is not explicitly stated anywhere I have found, but at the
> same time the binding doc for the arm,gic.txt does not list
> "IRQ_TYPE_NONE" as an option.
> 
> Marc, what are your thoughts?

My immediate answer is "Why?".

As you pointed out, we don't even try to program the GICD_ICFGR1
register if what we read from it is the right thing. Also, the GICv2
spec says in 4.3.13: "For PPIs, it is IMPLEMENTATION DEFINED whether the
most significant bit of the Int_config field is programmable.".

So NONE is always wrong (because there is no such thing in the HW), and
the DT should have a setting that matches the HW even GICD_ICFGR1 is RO
(the OS may need to know how the triggering configuration anyhow).

Aniruddha: what problem are you trying to solve here? The DT you're
touching seems just fine to me...

Thanks,

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

      reply	other threads:[~2017-04-03 13:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 11:19 [PATCH 1/1] arm64: tegra: fix PPI interrupt flag Aniruddha Banerjee
2017-04-03 12:55 ` Jon Hunter
2017-04-03 13:11   ` Marc Zyngier [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=c1e1499e-166f-900b-aa45-773274ed73e8@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=aniruddhab@nvidia.com \
    --cc=avanbrunt@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=treding@nvidia.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