Re: [PATCH 2/2] RFT: gpio: tegra186: Set affinity callback to parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 16, 2020 at 09:02:24AM +0000, Marc Zyngier wrote:
> Linus, Thierry,
> 
> On 2020-11-13 21:44, Thierry Reding wrote:
> > On Wed, Nov 11, 2020 at 03:06:28PM +0100, Linus Walleij wrote:
> > > This assigns the .irq_set_affinity to the parent callback.
> > > I assume the Tegra186 is an SMP system so this would be
> > > beneficial.
> > > 
> > > I used the pattern making the hirerarchy tolerant for missing
> > > parent as in Marc's earlier patch.
> > > 
> > > Cc: Thierry Reding <treding@xxxxxxxxxx>
> > > Cc: Vidya Sagar <vidyas@xxxxxxxxxx>
> > > Suggested-by: Marc Zyngier <maz@xxxxxxxxxx>
> > > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> > > ---
> > >  drivers/gpio/gpio-tegra186.c | 11 +++++++++++
> > >  1 file changed, 11 insertions(+)
> > > 
> > > diff --git a/drivers/gpio/gpio-tegra186.c
> > > b/drivers/gpio/gpio-tegra186.c
> > > index 9500074b1f1b..5060e81f5f49 100644
> > > --- a/drivers/gpio/gpio-tegra186.c
> > > +++ b/drivers/gpio/gpio-tegra186.c
> > > @@ -444,6 +444,16 @@ static int tegra186_irq_set_wake(struct
> > > irq_data *data, unsigned int on)
> > >  	return 0;
> > >  }
> > > 
> > > +static int tegra186_irq_set_affinity(struct irq_data *data,
> > > +				     const struct cpumask *dest,
> > > +				     bool force)
> > > +{
> > > +	if (data->parent_data)
> > > +		return irq_chip_set_affinity_parent(data, dest, force);
> > > +
> > > +	return 0;
> 
> Having come to my senses, this should definitely return an error when
> there is no parent is present (i.e. we can't claim success when the
> affinity hasn't changed).

FWIW, if I change the "return 0" to something like "return -EINVAL", I
no longer see the warning in the kernel log.

Thierry

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux