[PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-03 Thread Andrew Donnellan
cxl_pci_enable_device_hook() is called when attempting to enable an AFU sitting on a vPHB. At present, the state of the underlying CXL card's PCI channel is only checked when it calls cxl_afu_check_and_enable() at the very end, after it has already set DMA options and initialised a default context.

Re: [PATCH v2] powerpc/powernv/pci-ioda: fix 32-bit TCE table init in kdump kernel

2015-09-03 Thread Alexey Kardashevskiy
On 09/03/2015 07:58 PM, Michael Ellerman wrote: On Wed, 2015-09-02 at 08:39 -0700, Nishanth Aravamudan wrote: On 02.09.2015 [19:00:31 +1000], Alexey Kardashevskiy wrote: On 09/02/2015 11:11 AM, Nishanth Aravamudan wrote: diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/pl

[[PATCH v6 09/10] powerpc/perf/hv-24x7: Use PMU_TXN_READ interface

2015-09-03 Thread Sukadev Bhattiprolu
The 24x7 counters in Powerpc allow monitoring a large number of counters simultaneously. They also allow reading several counters in a single HCALL so we can get a more consistent snapshot of the system. Use the PMU's transaction interface to monitor and read several event counters at once. The id

[[PATCH v6 10/10] perf: Drop PERF_EVENT_TXN

2015-09-03 Thread Sukadev Bhattiprolu
We currently use PERF_EVENT_TXN flag to determine if we are in the middle of a transaction. If in a transaction, we defer the schedulability checks from pmu->add() operation to the pmu->commit() operation. Now that we have "transaction types" (PERF_PMU_TXN_ADD, PERF_PMU_TXN_READ) we can use the ty

[[PATCH v6 05/10] perf: Add group reads to perf_event_read()

2015-09-03 Thread Sukadev Bhattiprolu
From: Peter Zijlstra Enable perf_event_read() to update entire groups at once, this will be useful for read transactions. Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Michael Ellerman Cc: Sukadev Bhattiprolu Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/201507230

[[PATCH v6 08/10] Define PERF_PMU_TXN_READ interface

2015-09-03 Thread Sukadev Bhattiprolu
Define a new PERF_PMU_TXN_READ interface to read a group of counters at once. pmu->start_txn()// Initialize before first event for each event in group pmu->read(event); // Queue each event to be read rc = pmu->commit_txn() //

[[PATCH v6 07/10] perf: Add return value for perf_event_read().

2015-09-03 Thread Sukadev Bhattiprolu
When we implement the ability to read several counters at once (using the PERF_PMU_TXN_READ transaction interface), perf_event_read() can fail when the 'group' parameter is true (eg: trying to read too many events at once). For now, have perf_event_read() return an integer. Ignore the return value

[[PATCH v6 06/10] perf: Invert perf_read_group() loops

2015-09-03 Thread Sukadev Bhattiprolu
From: Peter Zijlstra In order to enable the use of perf_event_read(.group = true), we need to invert the sibling-child loop nesting of perf_read_group(). Currently we iterate the child list for each sibling, this precludes using group reads. Flip things around so we iterate each group for each c

[[PATCH v6 04/10] perf: Rename perf_event_read_{one, group}, perf_read_hw

2015-09-03 Thread Sukadev Bhattiprolu
From: "Peter Zijlstra (Intel)" In order to free up the perf_event_read_group() name: s/perf_event_read_\(one\|group\)/perf_read_\1/g s/perf_read_hw/__perf_read/g Signed-off-by: Peter Zijlstra (Intel) --- kernel/events/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletion

[[PATCH v6 03/10] perf: Split perf_event_read() and perf_event_count()

2015-09-03 Thread Sukadev Bhattiprolu
perf_event_read() does two things: - call the PMU to read/update the counter value, and - compute the total count of the event and its children Not all callers need both. perf_event_reset() for instance needs the first piece but doesn't need the second. Similarly, when we impleme

[[PATCH v6 02/10] perf: Add a flags parameter to pmu txn interfaces

2015-09-03 Thread Sukadev Bhattiprolu
Currently, the PMU interface allows reading only one counter at a time. But some PMUs like the 24x7 counters in Power, support reading several counters at once. To leveage this functionality, extend the transaction interface to support a "transaction type". The first type, PERF_PMU_TXN_ADD, refers

[PATCH v6 0/10] perf: Implement group-read of events using txn interface

2015-09-03 Thread Sukadev Bhattiprolu
Unlike normal hardware PMCs, the 24x7 counters in Power8 are stored in memory and accessed via a hypervisor call (HCALL). A major aspect of the HCALL is that it allows retireving _several_ counters at once (unlike regular PMCs, which are read one at a time). By reading several counters at once, we

[[PATCH v6 01/10] sparc/perf: Remove unnecessary assignment

2015-09-03 Thread Sukadev Bhattiprolu
In ->commit_txn() 'cpuc' is already initialized when it is declared, so we can remove the duplicate assignment. Signed-off-by: Sukadev Bhattiprolu --- arch/sparc/kernel/perf_event.c |1 - 1 file changed, 1 deletion(-) diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_even

Re: [PATCH v3 4/4] arm64: dts: Drop linux,pci-probe-only from the Seattle DTS

2015-09-03 Thread Suthikulpanit, Suravee
Hi Marc On 9/3/2015 7:16 PM, Marc Zyngier wrote: The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without

Re: [PATCH v2 2/2] powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case

2015-09-03 Thread Bjorn Helgaas
[+cc Fam, Yinghai, Yijing, Eric (reviewers of MST's original series), Dave] Hi Guilherme, On Wed, Aug 19, 2015 at 03:54:10PM -0300, Guilherme G. Piccoli wrote: > Changes since v2: > * Added "Fixes" line > * Improved commit reference by using 12 first chars of SHA > > >8--8< > > Since

Re: [PATCH v2] powerpc/powernv/pci-ioda: fix 32-bit TCE table init in kdump kernel

2015-09-03 Thread Nishanth Aravamudan
On 03.09.2015 [19:58:53 +1000], Michael Ellerman wrote: > On Wed, 2015-09-02 at 08:39 -0700, Nishanth Aravamudan wrote: > > On 02.09.2015 [19:00:31 +1000], Alexey Kardashevskiy wrote: > > > On 09/02/2015 11:11 AM, Nishanth Aravamudan wrote: > > > >diff --git a/arch/powerpc/platforms/powernv/pci-iod

Re: [PATCH v3 1/4] of/pci: Add of_pci_check_probe_only to parse "linux, pci-probe-only"

2015-09-03 Thread Rob Herring
On Thu, Sep 3, 2015 at 7:16 AM, Marc Zyngier wrote: > Both pci-host-generic and Pseries parse the "linux,pci-probe-only" > property to engage the PCI_PROBE_ONLY mode, and both have a subtle > bug that can be triggered if the property has no parameter. > > Provide a generic, safe implementation tha

[PATCH v3 4/4] arm64: dts: Drop linux, pci-probe-only from the Seattle DTS

2015-09-03 Thread Marc Zyngier
The linux,pci-probe-only property mandates an argument to indicate whether or not to engage the "probe-only" mode, but the Seattle DTS just provides a naked property, which is illegal. Also, it turns out that the board is perfectly happy without probe-only, so let's drop this altogether. Signed-o

[PATCH v3 3/4] powerpc: PCI: Fix lookup of linux, pci-probe-only property

2015-09-03 Thread Marc Zyngier
When find_and_init_phbs() looks for the probe-only property, it seems to trust the firmware to be correctly written, and assumes that there is a parameter to the property. It is conceivable that the firmware could not be that perfect, and it could expose this property naked (at least one arm64 pla

[PATCH v3 2/4] PCI: pci-host-generic: Fix lookup of linux, pci-probe-only property

2015-09-03 Thread Marc Zyngier
When pci-host-generic looks for the probe-only property, it seems to trust the DT to be correctly written, and assumes that there is a parameter to the property. Unfortunately, this is not always the case, and some firmware expose this property naked. The driver ends up making a decision based on

[PATCH v3 0/4] PCI: arm64/powerpc: Fix parsing of linux, pci-probe-only

2015-09-03 Thread Marc Zyngier
The pci-host-generic driver parses the linux,pci-probe-only property, and assumes that it will have a boolean parameter. Turns out that the Seattle DTS file has a naked "linux,pci-probe-only" property, which leads to the driver dereferencing some unsuspecting memory location. Nothing really bad ha

[PATCH v3 1/4] of/pci: Add of_pci_check_probe_only to parse "linux, pci-probe-only"

2015-09-03 Thread Marc Zyngier
Both pci-host-generic and Pseries parse the "linux,pci-probe-only" property to engage the PCI_PROBE_ONLY mode, and both have a subtle bug that can be triggered if the property has no parameter. Provide a generic, safe implementation that can be used by both. Signed-off-by: Marc Zyngier --- driv

[PATCH 06/12] ASoC: fsl-asoc-card: Fix module autoload for OF platform driver

2015-09-03 Thread Luis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt --- sound/soc/fsl/fsl-asoc-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fs

Re: [RFC 3/5] powerpc: atomic: implement atomic{,64}_{add,sub}_return_* variants

2015-09-03 Thread Will Deacon
On Wed, Sep 02, 2015 at 04:36:09PM +0100, Pranith Kumar wrote: > On Wed, Sep 2, 2015 at 11:23 AM, Pranith Kumar wrote: > > On 09/02/2015 05:59 AM, Will Deacon wrote: > >> I just thought it was worth making this point, because it is prohibited > >> in SC and I don't want people to think that our RE

Re: [PATCH v2] powerpc/powernv/pci-ioda: fix 32-bit TCE table init in kdump kernel

2015-09-03 Thread Michael Ellerman
On Wed, 2015-09-02 at 08:39 -0700, Nishanth Aravamudan wrote: > On 02.09.2015 [19:00:31 +1000], Alexey Kardashevskiy wrote: > > On 09/02/2015 11:11 AM, Nishanth Aravamudan wrote: > > >diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c > > >b/arch/powerpc/platforms/powernv/pci-ioda.c > > >index

Re: [PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600

2015-09-03 Thread Michael Ellerman
On Thu, 2015-09-03 at 11:27 +0200, Christophe Leroy wrote: > On PPC832x, perf record/report reports martian addresses > > 2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send > 2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb > 1.62% perf_reseau4 [kernel.kallsyms]

[PATCH] powerpc/book3s32: Only select PPC_HAVE_PMU on e600

2015-09-03 Thread Christophe Leroy
On PPC832x, perf record/report reports martian addresses 2.62% perf_reseau4 libpthread-2.18.so [.] __libc_send 2.56% perf_reseau4 [kernel.kallsyms] [k] __ip_make_skb 1.62% perf_reseau4 [kernel.kallsyms] [k] __ip_append_data.isra.39 1.55% perf_reseau4 [kernel.kallsy

Re: [PATCH v2 1/4] of/pci: Add of_pci_check_probe_only to parse "linux, pci-probe-only"

2015-09-03 Thread Marc Zyngier
On 02/09/15 23:23, Bjorn Helgaas wrote: > On Fri, Aug 14, 2015 at 04:08:10PM -0500, Rob Herring wrote: >> On Fri, Aug 14, 2015 at 11:19 AM, Marc Zyngier wrote: >>> Both pci-host-generic and Pseries parse the "linux,pci-probe-only" >>> to engage the PCI_PROBE_ONLY mode, and both have a subtle bug t

[PATCH] powerpc/mm: Add virt_to_pfn and use this instead of opencoding

2015-09-03 Thread Aneesh Kumar K.V
This add helper virt_to_pfn and remove the opencoded usage of the same. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/page.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index 71294a6e976