All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: "Shenhar, Talel" <talel@amazon.com>,
	nicolas.ferre@microchip.com, jason@lakedaemon.net,
	mark.rutland@arm.com, mchehab+samsung@kernel.org,
	robh+dt@kernel.org, davem@davemloft.net,
	shawn.lin@rock-chips.com, tglx@linutronix.de,
	devicetree@vger.kernel.org, gregkh@linuxfoundation.org,
	linux-kernel@vger.kernel.org, dwmw@amazon.co.uk,
	jonnyc@amazon.com, hhhawa@amazon.com, ronenk@amazon.com,
	hanochu@amazon.com, barakw@amazon.com
Subject: Re: [PATCH v2 2/2] irqchip: al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver
Date: Thu, 06 Jun 2019 17:49:25 +1000	[thread overview]
Message-ID: <c558ca3caac6f0c24a13cd5d7599bf4e861bca62.camel@kernel.crashing.org> (raw)
In-Reply-To: <86pnnrgpmm.wl-marc.zyngier@arm.com>

On Thu, 2019-06-06 at 08:05 +0100, Marc Zyngier wrote:
> 
> > I disagree Marc. This is a rather bad error which indicates that the
> > device-tree is probably incorrect (or the HW was wired in a way that
> > cannot work).
> 
> But surely that's something you'll spot pretty quickly.

Not really. A level/edge mismatch isn't something you can spot that
quickly, but will cause lost interrupts on load. Since the kernel can
spot the error pretty much right away, I think that could even be a
pr_err :)

> Also, you get
> a splat from the irq subsystem already, telling you that things went
> wrong (see __irq_set_trigger). At that stage, you can enable debugging
> and figure it out.

Ah returning an error will cause such splat indeed.

> What I'm trying to avoid is the kernel becoming a (pretty bad)
> validation tool for DTS files.

Haha, yeah, I don't like it going out of its way to validate them but
that sort of very obvious sanity checking makes sense.

> > Basically a given FIC can either be entirely level sensitive or
> > entirely edge sensitive. This catches cases where the DT has routed
> > a mixed of both to the same FIC. Definitely worth barfing loudly
> > about rather than trying to understand subtle odd misbehaviours of
> > the device in the field.
> 
> Then, in the interest of not producing incorrect DTs, could the
> edge/level property be encoded in the FIC description itself, rather
> than in the interrupt specifiers of the individual devices? It would
> sidestep the problem altogether. You can still put the wrong one in
> the FIC node, but it then becomes even more obvious what is going
> on...

This was Talel original approach internally in fact. I told him to put
it in the specifier instead :-) The advantage in doing it that way is
that you get the right flags in the descriptor by default iirc, so the
right value in /proc/interrupts etc... And it will continue working if
a future FIC loses that limitation.

That said, if you feel strongly about it, we can revert to putting a
global property in the FIC node itself. Let us know what you want.

Cheers,
Ben.



  reply	other threads:[~2019-06-06  7:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 10:51 [PATCH v2 0/2] Amazon's Annapurna Labs Fabric Interrupt Controller Talel Shenhar
2019-06-05 10:51 ` Talel Shenhar
2019-06-05 10:52 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: Amazon's Annapurna Labs FIC Talel Shenhar
2019-06-05 10:52   ` Talel Shenhar
2019-06-05 11:08   ` Sudeep Holla
2019-06-05 15:49   ` Eduardo Valentin
2019-06-05 15:49     ` Eduardo Valentin
2019-06-06  7:23     ` Shenhar, Talel
2019-06-06  7:23       ` Shenhar, Talel
2019-06-05 10:52 ` [PATCH v2 2/2] irqchip: al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver Talel Shenhar
2019-06-05 10:52   ` Talel Shenhar
2019-06-05 12:22   ` Marc Zyngier
2019-06-05 14:38     ` Shenhar, Talel
2019-06-05 14:38       ` Shenhar, Talel
2019-06-05 15:12       ` Marc Zyngier
2019-06-05 22:06         ` Benjamin Herrenschmidt
2019-06-06  7:05           ` Marc Zyngier
2019-06-06  7:05             ` Marc Zyngier
2019-06-06  7:49             ` Benjamin Herrenschmidt [this message]
2019-06-06  7:25         ` Shenhar, Talel
2019-06-06  7:25           ` Shenhar, Talel
2019-06-05 22:02     ` Benjamin Herrenschmidt
2019-06-06  7:10       ` Marc Zyngier
2019-06-06  7:10         ` Marc Zyngier
2019-06-05 12:50   ` Greg KH
2019-06-05 14:51     ` Shenhar, Talel
2019-06-05 14:51       ` Shenhar, Talel
2019-06-05 15:40       ` Greg KH
2019-06-05 14:56     ` David Woodhouse

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=c558ca3caac6f0c24a13cd5d7599bf4e861bca62.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=barakw@amazon.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw@amazon.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hanochu@amazon.com \
    --cc=hhhawa@amazon.com \
    --cc=jason@lakedaemon.net \
    --cc=jonnyc@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=robh+dt@kernel.org \
    --cc=ronenk@amazon.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=talel@amazon.com \
    --cc=tglx@linutronix.de \
    /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.