[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875z21zwy2.wl-maz@kernel.org>
Date: Mon, 08 Mar 2021 11:50:13 +0000
From: Marc Zyngier <maz@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Hector Martin <marcan@...can.st>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
Rob Herring <robh@...nel.org>, Arnd Bergmann <arnd@...nel.org>,
Olof Johansson <olof@...om.net>,
Krzysztof Kozlowski <krzk@...nel.org>,
Mark Kettenis <mark.kettenis@...all.nl>,
Tony Lindgren <tony@...mide.com>,
Mohamed Mediouni <mohamed.mediouni@...amail.com>,
Stan Skowronek <stan@...ellium.com>,
Alexander Graf <graf@...zon.com>,
Will Deacon <will@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Mark Rutland <mark.rutland@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Corbet <corbet@....net>,
Catalin Marinas <catalin.marinas@....com>,
Christoph Hellwig <hch@...radead.org>,
"David S. Miller" <davem@...emloft.net>,
devicetree <devicetree@...r.kernel.org>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
Linux Documentation List <linux-doc@...r.kernel.org>,
Linux Samsung SOC <linux-samsung-soc@...r.kernel.org>,
Linux-Arch <linux-arch@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFT PATCH v3 16/27] irqchip/apple-aic: Add support for the Apple Interrupt Controller
On Fri, 05 Mar 2021 15:05:08 +0000,
Andy Shevchenko <andy.shevchenko@...il.com> wrote:
[...]
> > +#define TIMER_FIRING(x) \
> > + (((x) & (ARCH_TIMER_CTRL_ENABLE | ARCH_TIMER_CTRL_IT_MASK | \
> > + ARCH_TIMER_CTRL_IT_STAT)) == \
> > + (ARCH_TIMER_CTRL_ENABLE | ARCH_TIMER_CTRL_IT_STAT))
>
> It's a bit hard to read. Perhaps
>
> #define FOO_MASK (_ENABLE | _STAT)
> #define _FIRING ... (FOO_MASK | _MASK == FOO_MASK)
The expression above is a direct translation of the architecture
reference manual, and I'd rather not have that hidden behind a bunch
of obscure macros.
[...]
> > + irqc->hw_domain = irq_domain_create_linear(of_node_to_fwnode(node),
> > + irqc->nr_hw + AIC_NR_FIQ,
> > + &aic_irq_domain_ops, irqc);
>
> If you are sure it will be always OF-only, why not to use
> irq_domain_add_linear()?
The OF-only API is deprecated, and there is no point in using it for
*new* code, specially when things like IPI allocation require the use
of the modern API. For arm64 root controllers, that's the way to go.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists