Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1451420

Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver

From Rich Felker <dalias@libc.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver
Date 2016-07-27 19:10 +0200
Message-ID <rZAvf-2cU-9@gated-at.bofh.it> (permalink)
References <rZpJv-3HB-13@gated-at.bofh.it> <rZpJv-3HB-19@gated-at.bofh.it> <rZu6t-6ul-1@gated-at.bofh.it> <rZwL0-8gP-39@gated-at.bofh.it> <rZx4l-8nH-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jul 27, 2016 at 02:27:54PM +0100, Mark Rutland wrote:
> On Wed, Jul 27, 2016 at 09:08:21AM -0400, Rich Felker wrote:
> > On Wed, Jul 27, 2016 at 11:15:38AM +0100, Mark Rutland wrote:
> > > On Wed, Jul 27, 2016 at 05:35:09AM +0000, Rich Felker wrote:
> > > > For simplicity, there is no aic1-specific logic in the driver beyond
> > > > setting the priority register, which is necessary for interrupts to
> > > > work at all. Eventually aic1 will likely be phased out, but it's
> > > > currently in use in deployments and all released bitstream binaries.
> > > 
> > > [...]
> > > 
> > > > +	if (!of_device_is_compatible(node, "jcore,aic2")) {
> > > 
> > > If this is only meant to run for AIC1, it would be better to check for
> > > the "jcore,aic1" compatible string explicitly.
> > > 
> > > While that shouldn't matter much currently, it better matches the intent
> > > described in the commit message, and avoids surprises and/or churn in
> > > future if you have AIC3+.
> > 
> > My intent in doing this was to support a DT that might claim an aic2
> > is aic1-compatible as a fallback "compatible" property. The hardware
> > is designed such that this works (ignoring the spurious writes to
> > unused prio registers) as long as the DT still has the right irq
> > numbers for attached devices.
> 
> Ok.
> 
> If the HW ignores it, what's the cost of those one-off spurious writes?
> If it's not noticeable, you could allow the kernel to perform them
> regardless.

Indeed, it essentially costs nothing. My motivation was more just to
document that it's not needed/used for aic2.

> Otherwise, please add a comment above the check, explaining why we do
> the check this way around.

Since the intent is documenting this might be the best approach.

Rich

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/2] J-Core interrupt controller support Rich Felker <dalias@libc.org> - 2016-07-27 07:40 +0200
  [PATCH v4 2/2] irqchip: add J-Core AIC driver Rich Felker <dalias@libc.org> - 2016-07-27 07:40 +0200
    Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Mark Rutland <mark.rutland@arm.com> - 2016-07-27 12:20 +0200
      Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Rich Felker <dalias@libc.org> - 2016-07-27 15:10 +0200
        Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Mark Rutland <mark.rutland@arm.com> - 2016-07-27 15:30 +0200
          Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Rich Felker <dalias@libc.org> - 2016-07-27 19:10 +0200
    Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Mark Rutland <mark.rutland@arm.com> - 2016-07-27 12:20 +0200
      Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Rich Felker <dalias@libc.org> - 2016-07-27 15:10 +0200
        Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Mark Rutland <mark.rutland@arm.com> - 2016-07-27 15:30 +0200
          Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Rich Felker <dalias@libc.org> - 2016-07-27 19:10 +0200
            Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Mark Rutland <mark.rutland@arm.com> - 2016-07-27 19:40 +0200
              Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Rich Felker <dalias@libc.org> - 2016-07-28 01:10 +0200
                Re: [PATCH v4 2/2] irqchip: add J-Core AIC driver Mark Rutland <mark.rutland@arm.com> - 2016-07-28 16:10 +0200

csiph-web