linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] arm64: pmu: add support for interrupt-affinity property
Date: Thu, 5 Feb 2015 12:12:25 +0000	[thread overview]
Message-ID: <20150205121224.GG23241@arm.com> (raw)
In-Reply-To: <20150205115601.GH11344@leverpostej>

On Thu, Feb 05, 2015 at 11:56:01AM +0000, Mark Rutland wrote:
> On Mon, Jan 26, 2015 at 05:54:16PM +0000, Will Deacon wrote:
> > Historically, the PMU devicetree bindings have expected SPIs to be
> > listed in order of *logical* CPU number. This is problematic for
> > bootloaders, especially when the boot CPU (logical ID 0) isn't listed
> > first in the devicetree.
> > 
> > This patch adds a new optional property, interrupt-affinity, to the
> > PMU node which allows the interrupt affinity to be described using
> > a list of phandled to CPU nodes, with each entry in the list
> > corresponding to the SPI at the same index in the interrupts property.
> > 
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Will Deacon <will.deacon@arm.com>
> > ---
> >  Documentation/devicetree/bindings/arm/pmu.txt |  6 +++
> >  arch/arm64/include/asm/pmu.h                  |  1 +
> >  arch/arm64/kernel/perf_event.c                | 57 +++++++++++++++++++++++++--
> >  3 files changed, 60 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt
> > index 75ef91d08f3b..a9281fc48743 100644
> > --- a/Documentation/devicetree/bindings/arm/pmu.txt
> > +++ b/Documentation/devicetree/bindings/arm/pmu.txt
> > @@ -24,6 +24,12 @@ Required properties:
> >  
> >  Optional properties:
> >  
> > +- interrupt-affinity : Valid only when using SPIs, specifies a list of phandles
> > +                       to CPU nodes corresponding directly to the affinity of
> > +		       the SPIs listed in the interrupts property. If absent,
> > +		       the interrupts are assumed to be listed in logical CPU
> > +		       order.
> 
> This covers the case we care about today, but it's problematic in cases
> where the number of interrupts is not equal to the number of CPUs affine
> to that interrupt. For example:
> 
> * PPIs in big.LITTLE systems, where we may need a node per cluster, and
>   will need a way of associating a PMU node with a subset of all CPUs,
>   despite having only one interrupt.
> 
> * Muxed SPIs per-cluster (is this likely to happen?)
> 
> The former can be covered by allowing multiple entries in
> interrupt-affintiy for PPIs.

Yes, that sounds like a sensible extension in the future if we have to
support such a platform.

> I'm not sure if the latter is something we need to cater for. If we do,
> then perhaps we need an interruptN-affinity property per interrupt (though
> that's ugly and painful to deal with).

I'm not keen to handle this, so I'd rather defer it to whoever ends up
building it. Trying to design for every possibility is usually impossible
in my experience and you just end up carrying something that isn't useful.

Will

  reply	other threads:[~2015-02-05 12:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 17:54 [PATCH 1/4] arm64: dts: fix PMU IRQ ordering for Juno Will Deacon
2015-01-26 17:54 ` [PATCH 2/4] arm64: pmu: add support for interrupt-affinity property Will Deacon
2015-02-05 11:56   ` Mark Rutland
2015-02-05 12:12     ` Will Deacon [this message]
2015-02-05 12:23       ` Mark Rutland
2015-01-26 17:54 ` [PATCH 3/4] ARM: " Will Deacon
2015-01-26 17:54 ` [PATCH 4/4] arm64: dts: add interrupt-affinity property to pmu node for juno Will Deacon
2015-02-05 11:46 ` [PATCH 1/4] arm64: dts: fix PMU IRQ ordering for Juno Mark Rutland
2015-02-05 11:54   ` Will Deacon
2015-02-05 11:59     ` Mark Rutland
2015-02-05 12:09       ` Will Deacon
2015-02-05 12:20         ` Mark Rutland
2015-02-05 12:48           ` David Gibson
2015-02-05 14:33             ` Jon Loeliger
2015-02-05 15:38               ` Mark Rutland

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=20150205121224.GG23241@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).