All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Frank van der Linden <fllinden@amazon.com>
Cc: stable@vger.kernel.org, tglx@linutronix.de
Subject: Re: [PATCH 4.14 1/2] genirq/affinity: Handle affinity setting on inactive interrupts correctly
Date: Thu, 20 Aug 2020 10:11:28 +0200	[thread overview]
Message-ID: <20200820081128.GD4049659@kroah.com> (raw)
In-Reply-To: <20200819160550.GA11709@dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com>

On Wed, Aug 19, 2020 at 04:05:51PM +0000, Frank van der Linden wrote:
> On Wed, Aug 19, 2020 at 11:55:37AM +0200, Greg KH wrote:
> > On Mon, Aug 10, 2020 at 08:11:43PM +0000, Frank van der Linden wrote:
> > > From: Thomas Gleixner <tglx@linutronix.de>
> > >
> > > commit baedb87d1b53532f81b4bd0387f83b05d4f7eb9a upstream.
> > >
> > > Setting interrupt affinity on inactive interrupts is inconsistent when
> > > hierarchical irq domains are enabled. The core code should just store the
> > > affinity and not call into the irq chip driver for inactive interrupts
> > > because the chip drivers may not be in a state to handle such requests.
> > >
> > > X86 has a hacky workaround for that but all other irq chips have not which
> > > causes problems e.g. on GIC V3 ITS.
> > >
> > > Instead of adding more ugly hacks all over the place, solve the problem in
> > > the core code. If the affinity is set on an inactive interrupt then:
> > >
> > >     - Store it in the irq descriptors affinity mask
> > >     - Update the effective affinity to reflect that so user space has
> > >       a consistent view
> > >     - Don't call into the irq chip driver
> > >
> > > This is the core equivalent of the X86 workaround and works correctly
> > > because the affinity setting is established in the irq chip when the
> > > interrupt is activated later on.
> > >
> > > Note, that this is only effective when hierarchical irq domains are enabled
> > > by the architecture. Doing it unconditionally would break legacy irq chip
> > > implementations.
> > >
> > > For hierarchial irq domains this works correctly as none of the drivers can
> > > have a dependency on affinity setting in inactive state by design.
> > >
> > > Remove the X86 workaround as it is not longer required.
> > >
> > > Fixes: 02edee152d6e ("x86/apic/vector: Ignore set_affinity call for inactive interrupts")
> > 
> > Why is this needed for 4.14.y, when this "Fixes:" tag says a commit that
> > showed up in 4.15?
> 
> The issue of set_affinity being called on inactive interrupts, and it
> not being handled correctly, was already there in 4.14. The commit in
> the Fixes: tag is the x86 workaround, which came in in 4.15, and is
> no longer needed.
> 
> So we still need the backport of the genirq changes, to fix it in 4.14.
> This is mostly for arm64 (gicv3), where this issue results in interrupts
> getting messed up.

Ok, thanks, both now queued up.

greg k-h

      reply	other threads:[~2020-08-20  8:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 20:11 [PATCH 4.14 1/2] genirq/affinity: Handle affinity setting on inactive interrupts correctly Frank van der Linden
2020-08-10 20:11 ` [PATCH 4.14 2/2] genirq/affinity: Make affinity setting if activated opt-in Frank van der Linden
2020-08-10 20:20 ` [PATCH 4.14 1/2] genirq/affinity: Handle affinity setting on inactive interrupts correctly Frank van der Linden
2020-08-10 20:54   ` Thomas Gleixner
2020-08-19  9:55 ` Greg KH
2020-08-19 16:05   ` Frank van der Linden
2020-08-20  8:11     ` Greg KH [this message]

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=20200820081128.GD4049659@kroah.com \
    --to=greg@kroah.com \
    --cc=fllinden@amazon.com \
    --cc=stable@vger.kernel.org \
    --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.