[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdZ9NgATS-C0EqLVcxNf1CejwsRMV+NCCVhqrKQ=3c346A@mail.gmail.com>
Date: Sat, 14 May 2022 18:26:38 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Marc Zyngier <maz@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-arm-msm@...r.kernel.org, kernel-team@...roid.com,
Daniel Palmer <daniel@...ngy.jp>,
Romain Perier <romain.perier@...il.com>,
Bartosz Golaszewski <brgl@...ev.pl>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Robert Richter <rric@...nel.org>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>
Subject: Re: [PATCH] gpio: Remove dynamic allocation from populate_parent_alloc_arg()
On Sat, May 14, 2022 at 12:36 PM Marc Zyngier <maz@...nel.org> wrote:
> On Fri, 13 May 2022 22:24:40 +0100,
> Linus Walleij <linus.walleij@...aro.org> wrote:
> >
> > On Thu, May 12, 2022 at 6:23 PM Marc Zyngier <maz@...nel.org> wrote:
> >
> > > The gpiolib is unique in the way it uses intermediate fwspecs
> > > when feeding an interrupt specifier to the parent domain, as it
> > > relies on the populate_parent_alloc_arg() callback to perform
> > > a dynamic allocation.
> > >
> > > THis is pretty inefficient (we free the structure almost immediately),
> > > and the only reason this isn't a stack allocation is that our
> > > ThunderX friend uses MSIs rather than a FW-constructed structure.
> > >
> > > Let's solve it by providing a new type composed of the union
> > > of a struct irq_fwspec and a msi_info_t, which satisfies both
> > > requirements. This allows us to use a stack allocation, and we
> > > can move the handful of users to this new scheme.
> > >
> > > Also perform some additional cleanup, such as getting rid of the
> > > stub versions of the irq_domain_translate_*cell helpers, which
> > > are never used when CONFIG_IRQ_DOMAIN_HIERARCHY isn't selected.
> > >
> > > Tested on a Tegra186.
> > >
> > > Signed-off-by: Marc Zyngier <maz@...nel.org>
> > > Cc: Daniel Palmer <daniel@...ngy.jp>
> > > Cc: Romain Perier <romain.perier@...il.com>
> > > Cc: Linus Walleij <linus.walleij@...aro.org>
> > > Cc: Bartosz Golaszewski <brgl@...ev.pl>
> > > Cc: Thierry Reding <thierry.reding@...il.com>
> > > Cc: Jonathan Hunter <jonathanh@...dia.com>
> > > Cc: Robert Richter <rric@...nel.org>
> > > Cc: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>
> > > Cc: Andy Gross <agross@...nel.org>
> > > Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
> >
> > This looks very appetizing to me but:
> >
> > drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 15 ++++-----
> >
> > This seems to have some changes to
> > ->populate_parent_alloc_arg not even in linux-next,
> > so I get confused, what are the prerequisites? (Probably
> > something I already reviewed, but...)
>
> Odd. This patch is on top of irqchip-next, which is itself already in
> -next (you got me worried and I just pulled everything to check).
I confused it with pinctrl-ssbi-gpio.c. Simple beginners mistake.
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Yours,
Linus Walleij
Powered by blists - more mailing lists