public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: stable <stable@vger.kernel.org>
Subject: Re: [PATCH] irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis
Date: Mon, 19 Mar 2018 08:37:07 +0100	[thread overview]
Message-ID: <20180319073707.GB4530@kroah.com> (raw)
In-Reply-To: <CAKv+Gu9PX8wOW3HNW=YJmp2maxawbEUMa3Hm6Y4y9H2x=3PY5g@mail.gmail.com>

On Mon, Mar 19, 2018 at 03:28:40PM +0800, Ard Biesheuvel wrote:
> On 19 March 2018 at 15:27, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> > Commit 4f2c7583e33e upstream.
> >
> > When struct its_device instances are created, the nr_ites member
> > will be set to a power of 2 that equals or exceeds the requested
> > number of MSIs passed to the msi_prepare() callback. At the same
> > time, the LPI map is allocated to be some multiple of 32 in size,
> > where the allocated size may be less than the requested size
> > depending on whether a contiguous range of sufficient size is
> > available in the global LPI bitmap.
> >
> > This may result in the situation where the nr_ites < nr_lpis, and
> > since nr_ites is what we program into the hardware when we map the
> > device, the additional LPIs will be non-functional.
> >
> > For bog standard hardware, this does not really matter. However,
> > in cases where ITS device IDs are shared between different PCIe
> > devices, we may end up allocating these additional LPIs without
> > taking into account that they don't actually work.
> >
> > So let's make nr_ites at least 32. This ensures that all allocated
> > LPIs are 'live', and that its_alloc_device_irq() will fail when
> > attempts are made to allocate MSIs beyond what was allocated in
> > the first place.
> >
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > [maz: updated comment]
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> > [ardb: trivial tweak of unrelated context]
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > ---
> 
> Please apply to v4.9

What about 4.14.y and 4.15.y?  Why only add it to one really old tree,
you don't want people updating to a newer kernel and have a regression,
right?

thanks,

greg k-h

  reply	other threads:[~2018-03-19  7:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-19  7:27 [PATCH] irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis Ard Biesheuvel
2018-03-19  7:28 ` Ard Biesheuvel
2018-03-19  7:37   ` Greg KH [this message]
2018-03-19  7:37     ` Greg KH
2018-03-19  7:47       ` Ard Biesheuvel
2018-03-19 13:35         ` Greg KH

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=20180319073707.GB4530@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox