Re: [PATCH v8 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-05-07 Thread Andrew Murray
On Sun, May 05, 2013 at 03:41:49AM +0100, Benjamin Herrenschmidt wrote: > On Mon, 2013-04-22 at 11:41 +0100, Andrew Murray wrote: > > The pci_process_bridge_OF_ranges function, used to parse the "ranges" > > property of a PCI host device, is found in both Microblaze and

[PATCH v9 1/3] of/pci: Provide support for parsing PCI DT ranges property

2013-05-07 Thread Andrew Murray
single range (as was the case with powerpc and microblaze). Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau Signed-off-by: Thomas Petazzoni Reviewed-by: Rob Herring Tested-by: Thomas Petazzoni Tested-by: Linus Walleij Tested-by: Jingoo Han Acked-by: Grant Likely --- drivers/

[PATCH v9 0/3] of/pci: Provide common support for PCI DT parsing

2013-05-07 Thread Andrew Murray
werPC, x86_64, MIPS and Microblaze. Compared to the v8 sent by Andrew Murray, the following changes have been made (please note that the MIPS patch is unchanged from v8): * Remove the unification of pci_process_bridge_OF_ranges between PowerPC and Microblaze. Feedback from Bjorn and Benjamin (

[PATCH v9 2/3] of/pci: mips: convert to common of_pci_range_parser

2013-05-07 Thread Andrew Murray
This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau Signed-off-by: Gabor Juhos Reviewed-by: Rob Herring Reviewed-by: Grant Likely Tested-by: Linus Walleij --- arch/mips/pci/pci.c | 50

[PATCH v9 3/3] of/pci: microblaze: convert to common of_pci_range_parser

2013-05-07 Thread Andrew Murray
This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau --- arch/microblaze/pci/pci-common.c | 106 ++ 1 files changed, 38 insertions(+), 68 deletions(-) diff

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Andrew Murray
d out in drivers/of/pci.c and drivers/pci/pci-of.c but found there were good (and static) implementations in drivers/of/address.c which can be reused (e.g. of_bus_pci_get_flags, bus->count_cells). I'm not just ready to post it - but can do before early next week if you can wait. Andrew Murray ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] pci: Provide support for parsing PCI DT ranges property

2012-12-12 Thread Andrew Murray
request the obtained resources and pass them on (e.g. pci_add_resource_offset). Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau --- drivers/of/address.c | 53 +++- include/linux/of_address.h |7 + 2 files changed, 59 insertions

Re: pci and pcie device-tree binding - range No cells

2012-12-12 Thread Andrew Murray
On Wed, Dec 12, 2012 at 01:34:24PM +, Thierry Reding wrote: > On Wed, Dec 12, 2012 at 12:19:12PM +0000, Andrew Murray wrote: > > I've been working on a relatively architecture agnostic PCI host bridge > > driver > > and also wanted to avoid duplicating more gener

Re: [PATCH] pci: Provide support for parsing PCI DT ranges property

2012-12-13 Thread Andrew Murray
; > @@ -48,6 +50,11 @@ static inline const u32 *of_get_address(struct > > device_node *dev, int index, > > { > > return NULL; > > } > > +const __be32 *of_pci_process_ranges(struct device_node *node, > > There should be a blank line to separate the a

Re: [PATCH] pci: Provide support for parsing PCI DT ranges property

2012-12-13 Thread Andrew Murray
On Thu, Dec 13, 2012 at 10:03:18AM +, Thierry Reding wrote: > On Thu, Dec 13, 2012 at 09:45:43AM +0000, Andrew Murray wrote: > > On Thu, Dec 13, 2012 at 09:13:33AM +, Thierry Reding wrote: > > > Hi Andrew, > > > > > > I don't like iterator inte

Re: [PATCH] pci: Provide support for parsing PCI DT ranges property

2013-01-14 Thread Andrew Murray
On Thu, Dec 20, 2012 at 08:25:00AM +, Thierry Reding wrote: > On Wed, Dec 12, 2012 at 04:37:50PM +0000, Andrew Murray wrote: > [...] > > diff --git a/drivers/of/address.c b/drivers/of/address.c > [...] > > + start = of_get_property(node, "ranges", &a

Re: [PATCH] pci: Provide support for parsing PCI DT ranges property

2013-01-14 Thread Andrew Murray
On Sat, Dec 15, 2012 at 01:06:41AM +, Grant Likely wrote: > On Wed, Dec 12, 2012 at 4:37 PM, Andrew Murray wrote: > > DT bindings for PCI host bridges often use the ranges property to describe > > memory and IO ranges - this binding tends to be the same across > >

[PATCH v7 0/3] of/pci: Provide common support for PCI DT parsing

2013-04-16 Thread Andrew Murray
m device trees. I've included the Reviewed-by and Tested-by's received from v5/v6 in this patchset, earlier versions of this patchset (v3) have been tested-by: Thierry Reding Jingoo Han I've tested that this patchset builds and runs on ARM and that it builds on PowerPC and x86_

[PATCH v7 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-04-16 Thread Andrew Murray
The pci_process_bridge_OF_ranges function, used to parse the "ranges" property of a PCI host device, is found in both Microblaze and PowerPC architectures. These implementations are nearly identical. This patch moves this common code to a common place. Signed-off-by: Andrew Murray Sig

[PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-16 Thread Andrew Murray
le range (as was the case with powerpc and microblaze). Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau Signed-off-by: Thomas Petazzoni Reviewed-by: Rob Herring Tested-by: Thomas Petazzoni Tested-by: Linus Walleij --- drivers/of/address.c | 67 ++

[PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-16 Thread Andrew Murray
This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau Reviewed-by: Rob Herring --- arch/mips/pci/pci.c | 50 -- 1 files changed, 16 insertions

Re: [PATCH v7 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-04-16 Thread Andrew Murray
On Tue, Apr 16, 2013 at 11:18:26AM +0100, Andrew Murray wrote: > The pci_process_bridge_OF_ranges function, used to parse the "ranges" > property of a PCI host device, is found in both Microblaze and PowerPC > architectures. These implementations are nearly identical. This

Re: [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-18 Thread Andrew Murray
On Wed, Apr 17, 2013 at 04:42:48PM +0100, Linus Walleij wrote: > On Tue, Apr 16, 2013 at 12:18 PM, Andrew Murray wrote: > > > This patch converts the pci_load_of_ranges function to use the new common > > of_pci_range_parser. > > > > Signed-off-by: Andrew Murray

Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-18 Thread Andrew Murray
On Thu, Apr 18, 2013 at 02:44:01PM +0100, Grant Likely wrote: > On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray > wrote: > > This patch factors out common implementation patterns to reduce overall > > kernel > > code and provide a means for host bridge drivers t

Re: [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-18 Thread Andrew Murray
On Thu, Apr 18, 2013 at 02:45:35PM +0100, Grant Likely wrote: > On Tue, 16 Apr 2013 11:18:28 +0100, Andrew Murray > wrote: > > This patch converts the pci_load_of_ranges function to use the new common > > of_pci_range_parser. > > > > Signed-off-by: Andrew Murray

Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-18 Thread Andrew Murray
On Thu, Apr 18, 2013 at 04:29:54PM +0100, Grant Likely wrote: > On Thu, Apr 18, 2013 at 3:24 PM, Andrew Murray wrote: > > On Thu, Apr 18, 2013 at 02:44:01PM +0100, Grant Likely wrote: > >> On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray > >> wrote: > >> &

[PATCH v8 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-22 Thread Andrew Murray
This patch converts the pci_load_of_ranges function to use the new common of_pci_range_parser. Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau Signed-off-by: Gabor Juhos Reviewed-by: Rob Herring Reviewed-by: Grant Likely Tested-by: Linus Walleij --- arch/mips/pci/pci.c | 51

[PATCH v8 0/3] of/pci: Provide common support for PCI DT parsing

2013-04-22 Thread Andrew Murray
PC, x86_64 and MIPS. Compared to the v7 sent by Andrew Murray, the following changes have been made (please note that the first patch is unchanged from v7): * Rename of_pci_range_parser to of_pci_range_parser_init and of_pci_process_ranges to of_pci_range_parser_one as suggested by Grant

[PATCH v8 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-22 Thread Andrew Murray
single range (as was the case with powerpc and microblaze). Signed-off-by: Andrew Murray Signed-off-by: Liviu Dudau Signed-off-by: Thomas Petazzoni Reviewed-by: Rob Herring Tested-by: Thomas Petazzoni Tested-by: Linus Walleij Acked-by: Grant Likely --- drivers/

[PATCH v8 1/3] of/pci: Unify pci_process_bridge_OF_ranges from Microblaze and PowerPC

2013-04-22 Thread Andrew Murray
The pci_process_bridge_OF_ranges function, used to parse the "ranges" property of a PCI host device, is found in both Microblaze and PowerPC architectures. These implementations are nearly identical. This patch moves this common code to a common place. Signed-off-by: Andrew Murray Sig

Re: [PATCH v7 3/3] of/pci: mips: convert to common of_pci_range_parser

2013-04-22 Thread Andrew Murray
I've also included Gabor's fixes to this patchset (and his sign-off). If you include this new patchset in your branch the drivers that depend on it will need to be updated to reflect the new naming of functions as suggested by Grant. Thanks, Andrew Murray _

Re: [PATCH v7 2/3] of/pci: Provide support for parsing PCI DT ranges property

2013-04-22 Thread Andrew Murray
On Thu, Apr 18, 2013 at 02:44:01PM +0100, Grant Likely wrote: > On Tue, 16 Apr 2013 11:18:27 +0100, Andrew Murray > wrote: > > Acked-by: Grant Likely > > But comments below... > I've updated the patchset (now v8) to reflect your fee

[RFC PATCH 0/3] Unify definations of struct pci_controller

2013-04-25 Thread Andrew Murray
rchitectures such as pcibios_alloc|free_controller and pcibios_setup_phb_resources type functions. Andrew Murray (3): powerpc: Move struct pci_controller to asm-generic microblaze: Use asm-generic version of pci_controller pci: Use common definations of INDIRECT_TYPE_* arch/microblaze/include/asm

[RFC PATCH 1/3] powerpc: Move struct pci_controller to asm-generic

2013-04-25 Thread Andrew Murray
This patch moves struct pci_controller into asm-generic to allow for use by other architectures thus reducing code duplication in the kernel. Signed-off-by: Andrew Murray --- arch/powerpc/include/asm/pci-bridge.h | 87 +--- include/asm-generic/pci-bridge.h

[RFC PATCH 2/3] microblaze: Use asm-generic version of pci_controller

2013-04-25 Thread Andrew Murray
This patch removes struct pci_controller from Microblaze and instead uses struct pci_controller from asm-generic. Signed-off-by: Andrew Murray --- arch/microblaze/include/asm/pci-bridge.h | 75 ++ include/asm-generic/pci-bridge.h |2 +- 2 files changed

[RFC PATCH 3/3] pci: Use common definations of INDIRECT_TYPE_*

2013-04-25 Thread Andrew Murray
This patch unifies similar definations of INDIRECT_TYPE_* between PowerPC and Microblaze. Signed-off-by: Andrew Murray --- arch/microblaze/include/asm/pci-bridge.h | 23 --- arch/powerpc/include/asm/pci-bridge.h| 23 --- arch/powerpc/sysdev

[PATCH] powerpc/pci: Use of_pci_range_parser helper in pci_process_bridge_OF_ranges

2014-02-24 Thread Andrew Murray
This patch updates the implementation of pci_process_bridge_OF_ranges to use the of_pci_range_parser helpers. Signed-off-by: Andrew Murray --- I've verified that this builds, however I have no hardware to test this. --- arch/powerpc/kernel/pci-common.c

Re: [PATCH] powerpc/pci: Use of_pci_range_parser helper in pci_process_bridge_OF_ranges

2014-02-25 Thread Andrew Murray
On 25 February 2014 13:25, Benjamin Herrenschmidt wrote: > On Tue, 2014-02-25 at 06:32 +0000, Andrew Murray wrote: >> This patch updates the implementation of pci_process_bridge_OF_ranges to use >> the of_pci_range_parser helpers. >> >> Signed-off-by: Andrew Murray &

[PATCH v1 0/7] PCI: dt: Remove magic numbers for legacy PCI IRQ interrupts

2019-11-04 Thread Andrew Murray
Based on v5.4-rc5, compile tested Signed-off-by: Andrew Murray Andrew Murray (7): PCI: dt: Add legacy PCI IRQ defines arm64: dts: Use IRQ flags for legacy PCI IRQ interrupts arm: dts: Use IRQ flags for legacy PCI IRQ interrupts xtensa: dts: Use IRQ flags for legacy PCI IRQ inter

[PATCH v1 5/7] powerpc: dts: fsl: Use IRQ flags for legacy PCI IRQ interrupts

2019-11-04 Thread Andrew Murray
Replace magic numbers used to describe legacy PCI IRQ interrupts with #define. Signed-off-by: Andrew Murray --- arch/powerpc/boot/dts/fsl/b4420qds.dts| 4 +- arch/powerpc/boot/dts/fsl/b4420si-post.dtsi | 2 +- arch/powerpc/boot/dts/fsl/b4860qds.dts| 4 +- arch/powerpc

[PATCH v1 6/7] powerpc: dts: Use IRQ flags for legacy PCI IRQ interrupts

2019-11-04 Thread Andrew Murray
Replace magic numbers used to describe legacy PCI IRQ interrupts with #define. Signed-off-by: Andrew Murray --- arch/powerpc/boot/dts/bluestone.dts | 12 +++-- arch/powerpc/boot/dts/charon.dts | 12 +++-- arch/powerpc/boot/dts/digsy_mtc.dts | 12 +++-- arch/powerpc/boot/dts

Re: [PATCH v6 1/3] dt-bindings: pci: layerscape-pci: add compatible strings "fsl,ls1028a-pcie"

2019-11-05 Thread Andrew Murray
On Mon, Sep 02, 2019 at 11:43:17AM +0800, Xiaowei Bao wrote: > Add the PCIe compatible string for LS1028A > > Signed-off-by: Xiaowei Bao > Signed-off-by: Hou Zhiqiang > Reviewed-by: Rob Herring > --- Reviewed-by: Andrew Murray > v2: > - No change. > v3: > - N

Re: [PATCH v6 3/3] PCI: layerscape: Add LS1028a support

2019-11-05 Thread Andrew Murray
= &ls1043_drvdata }, > { .compatible = "fsl,ls1046a-pcie", .data = &ls1046_drvdata }, > { .compatible = "fsl,ls2080a-pcie", .data = &ls2080_drvdata }, Reviewed-by: Andrew Murray > -- > 2.9.5 >

[PATCH 00/10] perf/core: Generalise event exclusion checking

2018-11-16 Thread Andrew Murray
capabilities on registration. All drivers touched by this patchset have been compile tested. [1] https://lore.kernel.org/patchwork/patch/325116/ ~ Andrew Murray (10): perf/core: Add macro to test for event exclusion flags

[PATCH 02/10] arm: perf/core: generalise event exclusion checking with perf macro

2018-11-16 Thread Andrew Murray
Replace checking of perf event exclusion flags with perf macro. Signed-off-by: Andrew Murray --- arch/arm/mach-imx/mmdc.c | 8 +--- arch/arm/mm/cache-l2x0-pmu.c | 7 +-- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/arch/arm/mach-imx/mmdc.c b/arch/arm/mach-imx

[PATCH 01/10] perf/core: Add macro to test for event exclusion flags

2018-11-16 Thread Andrew Murray
Add a macro that tests if any of the perf event exclusion flags are set on a given event. Signed-off-by: Andrew Murray --- include/linux/perf_event.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 53c500f..89ee7fa

[PATCH 03/10] arm: perf: add additional validation to set_event_filter

2018-11-16 Thread Andrew Murray
The armv7pmu driver doesn't support host/guest mode exclusion so let's report this when set_event_filter is called with these exclusion flags set. Signed-off-by: Andrew Murray --- arch/arm/kernel/perf_event_v7.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/kernel/per

[PATCH 04/10] powerpc: perf/core: generalise event exclusion checking with perf macro

2018-11-16 Thread Andrew Murray
Replace checking of perf event exclusion flags with perf macro. Signed-off-by: Andrew Murray --- arch/powerpc/perf/hv-24x7.c | 7 +-- arch/powerpc/perf/hv-gpci.c | 7 +-- arch/powerpc/perf/imc-pmu.c | 14 ++ 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a

[PATCH 05/10] powerpc/pmu/fsl: add additional validation to event_init

2018-11-16 Thread Andrew Murray
The fsl PMU driver doesn't support host/guest mode exclusion so let's report this when event_init is called with these exclusion flags set. Signed-off-by: Andrew Murray --- arch/powerpc/perf/core-fsl-emb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/perf/core-f

[PATCH 06/10] alpha: perf/core: generalise event exclusion checking with perf macro

2018-11-16 Thread Andrew Murray
Replace checking of perf event exclusion flags with perf macro. This is a functional change as __hw_perf_event_init will now indicate that it doesn't support exclude_host and exclude_guest event flags. Signed-off-by: Andrew Murray --- arch/alpha/kernel/perf_event.c | 4 +--- 1 file chang

[PATCH 07/10] x86: perf/core: generalise event exclusion checking with perf macro

2018-11-16 Thread Andrew Murray
/uncore.c Signed-off-by: Andrew Murray --- arch/x86/events/amd/ibs.c | 11 +-- arch/x86/events/amd/iommu.c| 3 +-- arch/x86/events/amd/power.c| 8 +--- arch/x86/events/amd/uncore.c | 3 +-- arch/x86/events/intel/cstate.c | 7 +-- arch/x86/events

[PATCH 08/10] perf/core: Remove unused perf_flags

2018-11-16 Thread Andrew Murray
Now that perf_flags is not used we remove it. Signed-off-by: Andrew Murray --- include/uapi/linux/perf_event.h | 2 -- tools/include/uapi/linux/perf_event.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[PATCH 09/10] drivers/perf: perf/core: generalise event exclusion checking with perf macro

2018-11-16 Thread Andrew Murray
these files: - drivers/perf/xgene_pmu.c Signed-off-by: Andrew Murray --- drivers/perf/arm-cci.c | 7 +-- drivers/perf/arm-ccn.c | 5 + drivers/perf/arm_dsu_pmu.c | 7 +-- drivers/perf/arm_pmu.c | 9 + drivers

[PATCH 10/10] perf/doc: update design.txt for exclude_{host|guest} flags

2018-11-16 Thread Andrew Murray
Update design.txt to reflect the presence of the exclude_host and exclude_guest perf flags. Signed-off-by: Andrew Murray --- tools/perf/design.txt | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a28dca2..7de7d83 100644 --- a/tools/perf

Re: [PATCH 10/10] perf/doc: update design.txt for exclude_{host|guest} flags

2018-11-20 Thread Andrew Murray
On Tue, Nov 20, 2018 at 10:31:36PM +1100, Michael Ellerman wrote: > Andrew Murray writes: > > > Update design.txt to reflect the presence of the exclude_host > > and exclude_guest perf flags. > > > > Signed-off-by: Andrew Murray > > --- > > tools/perf/

Re: [PATCH 00/10] perf/core: Generalise event exclusion checking

2018-11-22 Thread Andrew Murray
On Mon, Nov 19, 2018 at 02:08:00PM +0100, Peter Zijlstra wrote: > On Fri, Nov 16, 2018 at 10:24:03AM +0000, Andrew Murray wrote: > > Many PMU drivers do not have the capability to exclude counting events > > that occur in specific contexts such as idle, kernel, guest, etc. Th

Re: [PATCH 00/10] perf/core: Generalise event exclusion checking

2018-11-22 Thread Andrew Murray
On Thu, Nov 22, 2018 at 01:26:37PM +0100, Peter Zijlstra wrote: > On Thu, Nov 22, 2018 at 12:21:43PM +0000, Andrew Murray wrote: > > On Mon, Nov 19, 2018 at 02:08:00PM +0100, Peter Zijlstra wrote: > > > > diff --git a/kernel/events/core.c b/kernel/events/core.c >

Re: [PATCH 09/10] drivers/perf: perf/core: generalise event exclusion checking with perf macro

2018-11-23 Thread Andrew Murray
On Mon, Nov 19, 2018 at 04:03:52PM +, Mark Rutland wrote: > On Fri, Nov 16, 2018 at 10:24:12AM +0000, Andrew Murray wrote: > > Replace checking of perf event exclusion flags with perf macro. > > > > This is a functional change as exclude_host and exclude_guest are added

Re: [PATCH 01/10] perf/core: Add macro to test for event exclusion flags

2018-11-23 Thread Andrew Murray
On Tue, Nov 20, 2018 at 10:28:34PM +1100, Michael Ellerman wrote: > Andrew Murray writes: > > > Add a macro that tests if any of the perf event exclusion flags > > are set on a given event. > > > > Signed-off-by: Andrew Murray > > --- > > include/li

[PATCH v2 00/20] perf/core: Generalise event exclusion checking

2018-11-26 Thread Andrew Murray
mit log to reflect it's a function Andrew Murray (20): perf/doc: update design.txt for exclude_{host|guest} flags perf/core: add function to test for event exclusion flags perf/core: add PERF_PMU_CAP_EXCLUDE for exclusion capable PMUs perf/hw_breakpoint: perf/core: advertise PMU exclu

[PATCH v2 01/20] perf/doc: update design.txt for exclude_{host|guest} flags

2018-11-26 Thread Andrew Murray
Update design.txt to reflect the presence of the exclude_host and exclude_guest perf flags. Signed-off-by: Andrew Murray --- tools/perf/design.txt | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a28dca2..5b2b23b 100644 --- a/tools/perf

[PATCH v2 02/20] perf/core: add function to test for event exclusion flags

2018-11-26 Thread Andrew Murray
Add a function that tests if any of the perf event exclusion flags are set on a given event. Signed-off-by: Andrew Murray --- include/linux/perf_event.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 53c500f..b2e806f

[PATCH v2 03/20] perf/core: add PERF_PMU_CAP_EXCLUDE for exclusion capable PMUs

2018-11-26 Thread Andrew Murray
inconsistent. Let's instead allow PMU drivers to advertise their ability to exclude based on context via a new capability: PERF_PMU_CAP_EXCLUDE. This allows the perf core to reject requests for exclusion events where there is no support in the PMU. Signed-off-by: Andrew Murray --- include/

[PATCH v2 04/20] perf/hw_breakpoint: perf/core: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
The breakpoint PMU has the capability to exclude kernel contexts, let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability so that perf doesn't prevent us from handling events with any exclusion flags set. Signed-off-by: Andrew Murray --- kernel/events/hw_breakpoint.c | 2

[PATCH v2 05/20] alpha: perf/core: remove unnecessary checks for exclusion

2018-11-26 Thread Andrew Murray
Signed-off-by: Andrew Murray --- arch/alpha/kernel/perf_event.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index 5613aa37..5c17077 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha/kernel/perf_event.c @@ -630,12 +

[PATCH v2 06/20] arc: perf/core: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
The ARC PMU has the capability to exclude events based on context. Let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't prevent us from handling events where any exclusion flags are set. Signed-off-by: Andrew Murray --- arch/arc/kernel/perf_e

[PATCH v2 07/20] arm: perf: conditionally advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
flags are set. Signed-off-by: Andrew Murray --- drivers/perf/arm_pmu.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 7f01f6f..4409035 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -3

[PATCH v2 08/20] arm: perf/core: remove unnecessary checks for exclusion

2018-11-26 Thread Andrew Murray
For drivers that do not support context exclusion we do not advertise the PERF_PMU_CAP_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew M

[PATCH v2 09/20] drivers/perf: perf/core: remove unnecessary checks for exclusion

2018-11-26 Thread Andrew Murray
For drivers that do not support context exclusion we do not advertise the PERF_PMU_CAP_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew M

[PATCH v2 10/20] drivers/perf: perf/core: remove unnecessary checks for exclusion

2018-11-26 Thread Andrew Murray
g the perf_event_open system call with fallback event attributes that do not fail. Signed-off-by: Andrew Murray --- drivers/perf/qcom_l2_pmu.c | 8 drivers/perf/qcom_l3_pmu.c | 7 --- drivers/perf/xgene_pmu.c | 5 - 3 files changed, 20 deletions(-) diff --git a/drivers/perf/qcom_l2_

[PATCH v2 11/20] drivers/perf: perf/core: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
The arm_pse PMU has the capability to exclude events based on context. Let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't prevent us from handling events where any exclusion flags are set. Signed-off-by: Andrew Murray --- drivers/perf/arm

[PATCH v2 12/20] mips: perf/core: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
The MIPS PMU has the capability to exclude events based on context. Let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't prevent us from handling events where any exclusion flags are set. Signed-off-by: Andrew Murray --- arch/m

[PATCH v2 13/20] powerpc: perf/core: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
For PowerPC PMUs that have the capability to exclude events based on context. Let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't prevent us from handling events where any exclusion flags are set. Signed-off-by: Andrew Murray --- arch/po

[PATCH v2 14/20] powerpc: perf/core: remove unnecessary checks for exclusion

2018-11-26 Thread Andrew Murray
For PowerPC PMUs that do not support context exclusion we do not advertise the PERF_PMU_CAP_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew M

[PATCH v2 15/20] s390: perf/events: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
The s390 cpum_cf and cpum_sf PMUs have the capability to exclude events based on context. Let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't prevent us from handling events where any exclusion flags are set. Signed-off-by: Andrew Murray ---

[PATCH v2 17/20] x86: perf/core: remove unnecessary checks for exclusion

2018-11-26 Thread Andrew Murray
For drivers that do not support context exclusion we do not advertise the PERF_PMU_CAP_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's remove the now unnecessary check for exclusion flags. Signed-off-by: Andrew M

[PATCH v2 16/20] sparc: perf/core: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
The SPARC PMU has the capability to exclude events based on context - let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't prevent us from handling events where any exclusion flags are set. Signed-off-by: Andrew Murray --- arch/sp

[PATCH v2 18/20] x86: perf/core remove unnecessary checks for exclusion

2018-11-26 Thread Andrew Murray
iommu and amd/uncore will now also indicate that they do not support exclude_{hv|idle} and intel/uncore that it does not support exclude_{guest|host}. Signed-off-by: Andrew Murray --- arch/x86/events/amd/iommu.c| 5 - arch/x86/events/amd/uncore.c | 5 - arch/x86/events/intel/uncore.

[PATCH v2 19/20] x86: perf/core: advertise PMU exclusion capability

2018-11-26 Thread Andrew Murray
For PMUs that have the capability to exclude events based on context. Let's advertise that we support the PERF_PMU_CAP_EXCLUDE capability to ensure that perf doesn't prevent us from handling events where any exclusion flags are set. Signed-off-by: Andrew Murray --- arch/x86/eve

[PATCH v2 20/20] perf/core: remove unused perf_flags

2018-11-26 Thread Andrew Murray
Now that perf_flags is not used we remove it. Signed-off-by: Andrew Murray --- include/uapi/linux/perf_event.h | 2 -- tools/include/uapi/linux/perf_event.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

Re: [PATCH v2 03/20] perf/core: add PERF_PMU_CAP_EXCLUDE for exclusion capable PMUs

2018-11-26 Thread Andrew Murray
On Mon, Nov 26, 2018 at 02:10:24PM +, Robin Murphy wrote: > Hi Andrew, > > On 26/11/2018 11:12, Andrew Murray wrote: > > Many PMU drivers do not have the capability to exclude counting events > > that occur in specific contexts such as idle, kernel, guest, etc. These >

[PATCH v3 00/12] perf/core: Generalise event exclusion checking

2018-12-06 Thread Andrew Murray
- Rename event_has_exclude_flags to event_has_any_exclude_flag and update commit log to reflect it's a function Andrew Murray (12): perf/doc: update design.txt for exclude_{host|guest} flags perf/core: add function to test for event exclusion flags perf/core: add PERF_PMU_CAP_NO_EXCLUD

[PATCH v3 01/12] perf/doc: update design.txt for exclude_{host|guest} flags

2018-12-06 Thread Andrew Murray
Update design.txt to reflect the presence of the exclude_host and exclude_guest perf flags. Signed-off-by: Andrew Murray --- tools/perf/design.txt | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a28dca2..0453ba2 100644 --- a/tools/perf

[PATCH v3 02/12] perf/core: add function to test for event exclusion flags

2018-12-06 Thread Andrew Murray
Add a function that tests if any of the perf event exclusion flags are set on a given event. Signed-off-by: Andrew Murray --- include/linux/perf_event.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 53c500f..b2e806f

[PATCH v3 03/12] perf/core: add PERF_PMU_CAP_NO_EXCLUDE for exclusion incapable PMUs

2018-12-06 Thread Andrew Murray
inconsistent. Let's instead allow PMU drivers to advertise their inability to exclude based on context via a new capability: PERF_PMU_CAP_NO_EXCLUDE. This allows the perf core to reject requests for exclusion events where there is no support in the PMU. Signed-off-by: Andrew Murray --- include/

[PATCH v3 04/12] alpha: perf/core: use PERF_PMU_CAP_NO_EXCLUDE

2018-12-06 Thread Andrew Murray
lity. Signed-off-by: Andrew Murray --- arch/alpha/kernel/perf_event.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/alpha/kernel/perf_event.c b/arch/alpha/kernel/perf_event.c index 5613aa37..4341ccf 100644 --- a/arch/alpha/kernel/perf_event.c +++ b/arch/alpha

[PATCH v3 05/12] arm: perf: conditionally use PERF_PMU_CAP_NO_EXCLUDE

2018-12-06 Thread Andrew Murray
set. Signed-off-by: Andrew Murray --- drivers/perf/arm_pmu.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 7f01f6f..ea69067 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -357,13 +357,6

[PATCH v3 06/12] arm: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: And

[PATCH v3 07/12] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: And

[PATCH v3 08/12] drivers/perf: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
trying the perf_event_open system call with fallback event attributes that do not fail. Signed-off-by: Andrew Murray --- drivers/perf/qcom_l2_pmu.c | 9 + drivers/perf/qcom_l3_pmu.c | 8 +--- drivers/perf/xgene_pmu.c | 6 +- 3 files changed, 3 insertions(+), 20 deletions(-) di

[PATCH v3 09/12] powerpc: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For PowerPC PMUs that do not support context exclusion let's advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-

[PATCH v3 10/12] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
For drivers that do not support context exclusion let's advertise the PERF_PMU_CAP_NOEXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Let's also remove the now unnecessary check for exclusion flags. Signed-off-by: And

[PATCH v3 11/12] x86: perf/core: use PERF_PMU_CAP_NO_EXCLUDE for exclude incapable PMUs

2018-12-06 Thread Andrew Murray
s that amd/iommu and amd/uncore will now also indicate that they do not support exclude_{hv|idle} and intel/uncore that it does not support exclude_{guest|host}. Signed-off-by: Andrew Murray --- arch/x86/events/amd/iommu.c| 6 +- arch/x86/events/amd/uncore.c | 7 ++- arch/x86/ev

[PATCH v3 12/12] perf/core: remove unused perf_flags

2018-12-06 Thread Andrew Murray
Now that perf_flags is not used we remove it. Signed-off-by: Andrew Murray --- include/uapi/linux/perf_event.h | 2 -- tools/include/uapi/linux/perf_event.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

Re: [PATCH v3 00/12] perf/core: Generalise event exclusion checking

2018-12-10 Thread Andrew Murray
On Fri, Dec 07, 2018 at 05:25:17PM +, Will Deacon wrote: > On Thu, Dec 06, 2018 at 04:47:17PM +0000, Andrew Murray wrote: > > Many PMU drivers do not have the capability to exclude counting events > > that occur in specific contexts such as idle, kernel, guest, etc. These >

Re: [PATCH 10/10] perf/doc: update design.txt for exclude_{host|guest} flags

2018-12-11 Thread Andrew Murray
On Tue, Dec 11, 2018 at 10:06:53PM +1100, Michael Ellerman wrote: > [ Reviving old thread. ] > > Andrew Murray writes: > > On Tue, Nov 20, 2018 at 10:31:36PM +1100, Michael Ellerman wrote: > >> Andrew Murray writes: > >> > >> > Update design.tx

Re: [PATCH 10/10] perf/doc: update design.txt for exclude_{host|guest} flags

2018-12-12 Thread Andrew Murray
On Wed, Dec 12, 2018 at 09:07:42AM +0100, Christoffer Dall wrote: > On Tue, Dec 11, 2018 at 01:59:03PM +0000, Andrew Murray wrote: > > On Tue, Dec 11, 2018 at 10:06:53PM +1100, Michael Ellerman wrote: > > > [ Reviving old thread. ] > > > > > > Andrew Murray

Re: [PATCH 01/10] PCI: designware-ep: Add multiple PFs support for DWC

2019-08-15 Thread Andrew Murray
cie_prog_outbound_atu_unroll(struct > dw_pcie *pci, int index, > dev_err(pci->dev, "Outbound iATU is not being enabled\n"); > } > > +void dw_pcie_prog_ep_outbound_atu(struct dw_pcie *pci, u8 func_no, int index, > + int type, u

Re: [PATCH 02/10] PCI: designware-ep: Add the doorbell mode of MSI-X in EP mode

2019-08-15 Thread Andrew Murray
0x948 > +#define PCIE_MSIX_DOORBELL_PF_SHIFT 24 > +#define PCIE_MSIX_DOORBELL_VF_SHIFT 16 > +#define PCIE_MSIX_DOORBELL_VF_ACTIVE BIT(15) The _VF defines are not used, I'd suggest removing them. Thanks, Andrew Murray > + > /* > * iATU Unroll-specific register

Re: [PATCH 05/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-08-15 Thread Andrew Murray
s_pcie_ep_probe(struct > platform_device *pdev) > pci->ops = &ls_pcie_ep_ops; > pcie->pci = pci; > > + ls_epc->linkup_notifier = false, > + ls_epc->msi_capable = true, > + ls_epc->msix_capable = true, As [msi,msix]_capable is shortly set from ls_pcie_ep_init - is there any reason to set them here (to potentially incorrect values)? Thanks, Andrew Murray > + ls_epc->bar_fixed_64bit = (1 << BAR_2) | (1 << BAR_4), > + > + pcie->ls_epc = ls_epc; > + > platform_set_drvdata(pdev, pcie); > > ret = ls_add_pcie_ep(pcie, pdev); > -- > 2.9.5 >

Re: [PATCH 01/10] PCI: designware-ep: Add multiple PFs support for DWC

2019-08-16 Thread Andrew Murray
On Fri, Aug 16, 2019 at 02:55:41AM +, Xiaowei Bao wrote: > > > > -Original Message- > > From: Andrew Murray > > Sent: 2019年8月15日 19:32 > > To: Xiaowei Bao > > Cc: jingooh...@gmail.com; gustavo.pimen...@synopsys.com; > > bhelg...@google.com

Re: [PATCH 02/10] PCI: designware-ep: Add the doorbell mode of MSI-X in EP mode

2019-08-16 Thread Andrew Murray
On Fri, Aug 16, 2019 at 02:58:31AM +, Xiaowei Bao wrote: > > > > -Original Message- > > From: Andrew Murray > > Sent: 2019年8月15日 19:54 > > To: Xiaowei Bao > > Cc: jingooh...@gmail.com; gustavo.pimen...@synopsys.com; > > bhelg...@google.com

Re: [PATCH 05/10] PCI: layerscape: Modify the way of getting capability with different PEX

2019-08-16 Thread Andrew Murray
On Fri, Aug 16, 2019 at 03:00:00AM +, Xiaowei Bao wrote: > > > > -Original Message- > > From: Andrew Murray > > Sent: 2019年8月15日 20:51 > > To: Xiaowei Bao > > Cc: jingooh...@gmail.com; gustavo.pimen...@synopsys.com; > > bhelg...@google.com

Re: [PATCH 01/10] PCI: designware-ep: Add multiple PFs support for DWC

2019-08-16 Thread Andrew Murray
On Fri, Aug 16, 2019 at 11:00:01AM +, Xiaowei Bao wrote: > > > > -Original Message- > > From: Andrew Murray > > Sent: 2019年8月16日 17:45 > > To: Xiaowei Bao > > Cc: jingooh...@gmail.com; gustavo.pimen...@synopsys.com; > > mark.rutl...@arm.

[PATCH v4 01/13] perf/doc: update design.txt for exclude_{host|guest} flags

2019-01-07 Thread Andrew Murray
Update design.txt to reflect the presence of the exclude_host and exclude_guest perf flags. Signed-off-by: Andrew Murray --- tools/perf/design.txt | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/design.txt b/tools/perf/design.txt index a28dca2..0453ba2 100644 --- a/tools/perf

  1   2   >