Re: [PATCH] powerpc: warn users of smt-snooze-delay that the API isn't there anymore

2014-02-24 Thread Deepthi Dharwar
On 02/22/2014 05:44 AM, Cody P Schafer wrote: > /sys/devices/system/cpu/cpu*/smt-snooze-delay was converted into a NOP > in commit 3fa8cad82b94d0bed002571bd246f2299ffc876b, and now does > nothing. Add a pr_warn() to convince any users that they should stop > using it. > > The commit message from t

[PATCH 5/5] powerpc/powernv: Refactor PHB diag-data dump

2014-02-24 Thread Gavin Shan
As Ben suggested, the patch prints PHB diag-data with multiple fields in one line and omits the line if the fields of that line are all zero. With the patch applied, the PHB3 diag-data dump looks like: PHB3 PHB#3 Diag-data (Version: 1) brdgCtl: 0002 RootSts: 000f 0040 b08

[PATCH 4/5] powerpc/powernv: Dump PHB diag-data immediately

2014-02-24 Thread Gavin Shan
The PHB diag-data is useful to help locating the root cause for frozen PE or fenced PHB. However, EEH core enables IO path by clearing part of HW registers before collecting it and eventually we got broken PHB diag-data. The patch intends to fix it by dumping the PHB diag-data immediately when fro

[PATCH 3/5] powerpc/powernv: Move PNV_EEH_STATE_ENABLED around

2014-02-24 Thread Gavin Shan
The flag PNV_EEH_STATE_ENABLED is put into pnv_phb::eeh_state, which is protected by CONFIG_EEH. We needn't that. Instead, we can have pnv_phb::flags and maintain all flags there, which is the purpose of the patch. The patch also renames PNV_EEH_STATE_ENABLED to PNV_PHB_FLAG_EEH. Signed-off-by: Ga

[PATCH 2/5] powerpc/powernv: Remove PNV_EEH_STATE_REMOVED

2014-02-24 Thread Gavin Shan
The PHB state PNV_EEH_STATE_REMOVED maintained in pnv_phb isn't so useful any more and it's duplicated to EEH_PE_ISOLATED. The patch replaces PNV_EEH_STATE_REMOVED with EEH_PE_ISOLATED. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/eeh-ioda.c | 56 -

[PATCH v3 0/5] EEH improvement

2014-02-24 Thread Gavin Shan
The series of patches intends to improve reliability of EEH on PowerNV platform. First all, we have had multiple duplicate states (flags) for PHB and PE, so we remove those duplicate states to simplify the code. Besides, we had corrupted PHB diag-data for case of frozen PE. In order to solve the pr

[PATCH 1/5] powerpc/eeh: Remove EEH_PE_PHB_DEAD

2014-02-24 Thread Gavin Shan
The PE state (for eeh_pe instance) EEH_PE_PHB_DEAD is duplicate to EEH_PE_ISOLATED. Originally, those PHBs (PHB PE) with EEH_PE_PHB_DEAD would be removed from the system. However, it's safe to replace that with EEH_PE_ISOLATED. The patch also clear EEH_PE_RECOVERING after fenced PHB has been handl

Re: [PATCH v2 0/9] EEH improvement

2014-02-24 Thread Gavin Shan
On Tue, Feb 25, 2014 at 01:37:41PM +0800, Gavin Shan wrote: >The series of patches intends to improve reliability of EEH on PowerNV >platform. First all, we have had multiple duplicate states (flags) for >PHB and PE, so we remove those duplicate states to simplify the code. >Besides, we had corrupt

[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 | 88 +-

Re: [PATCH 7/7] powerpc: Added PCI MSI support using the HSTA module

2014-02-24 Thread Alistair Popple
On Sat, 22 Feb 2014 07:41:26 Benjamin Herrenschmidt wrote: > On Fri, 2014-02-21 at 15:33 +0100, Arnd Bergmann wrote: [...] > > Should we (provided it's possible in HW) create two ranges instead ? One > covering RAM and one covering MSIs ? To avoid stray DMAs whacking random > HW registers in the

[PATCH 5/9] powerpc/eeh: Introduce eeh_ops->event()

2014-02-24 Thread Gavin Shan
The patch introduces eeh_ops->event() so that we can pass various events to underly platform. One reason to have that is to allocate or free PHB diag-data for individual PEs on PowerNV platform in future when EEH core to create or destroy PE instances. Signed-off-by: Gavin Shan --- arch/powerpc/

[PATCH 9/9] powerpc/powernv: Refactor PHB diag-data dump

2014-02-24 Thread Gavin Shan
As Ben suggested, the patch prints PHB diag-data with multiple fields in one line and omits the line if the fields of that line are all zero. With the patch applied, the PHB3 diag-data dump looks like: PHB3 PHB#3 Diag-data (Version: 1) brdgCtl: 0002 RootSts: 000f 0040 b08

[PATCH 8/9] powerpc/powernv: Add /proc/powerpc/eeh_inf_err

2014-02-24 Thread Gavin Shan
The patch adds /proc/powerpc/eeh_inf_err to count the INF errors happened on PHBs as Ben suggested. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/eeh-ioda.c | 51 + arch/powerpc/platforms/powernv/pci.h |1 + 2 files changed, 52 insertions(+)

[PATCH 6/9] powerpc/powernv: Support eeh_ops->event()

2014-02-24 Thread Gavin Shan
The patch implements the backend for eeh_ops->event() on PowerNV platform so that we can allocate or destroy PHB diag-data buffer, which is attached to eeh_pe::data. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/eeh-powernv.c | 42 +- arch/powerpc/platfor

[PATCH 7/9] powerpc/powernv: Cache PHB diag-data

2014-02-24 Thread Gavin Shan
The PHB diag-data is useful to help locating the root cause for frozen PE or fenced PHB. However, EEH core enables IO path by clearing part of HW registers before collecting it and eventually we got broken PHB diag-data. The patch intends to fix it by caching the PHB diag-data in advance to eeh_pe

[PATCH 1/9] powerpc/eeh: Remove EEH_PE_PHB_DEAD

2014-02-24 Thread Gavin Shan
The PE state (for eeh_pe instance) EEH_PE_PHB_DEAD is duplicate to EEH_PE_ISOLATED. Originally, those PHBs (PHB PE) with EEH_PE_PHB_DEAD would be removed from the system. However, it's safe to replace that with EEH_PE_ISOLATED. The patch also clear EEH_PE_RECOVERING after fenced PHB has been handl

[PATCH 3/9] powerpc/powernv: Move PNV_EEH_STATE_ENABLED around

2014-02-24 Thread Gavin Shan
The flag PNV_EEH_STATE_ENABLED is put into pnv_phb::eeh_state, which is protected by CONFIG_EEH. We needn't that. Instead, we can have pnv_phb::flags and maintain all flags there, which is the purpose of the patch. The patch also renames PNV_EEH_STATE_ENABLED to PNV_PHB_FLAG_EEH. Signed-off-by: Ga

[PATCH 2/9] powerpc/powernv: Remove PNV_EEH_STATE_REMOVED

2014-02-24 Thread Gavin Shan
The PHB state PNV_EEH_STATE_REMOVED maintained in pnv_phb isn't so useful any more and it's duplicated to EEH_PE_ISOLATED. The patch replaces PNV_EEH_STATE_REMOVED with EEH_PE_ISOLATED. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/eeh-ioda.c | 56 -

[PATCH v2 0/9] EEH improvement

2014-02-24 Thread Gavin Shan
The series of patches intends to improve reliability of EEH on PowerNV platform. First all, we have had multiple duplicate states (flags) for PHB and PE, so we remove those duplicate states to simplify the code. Besides, we had corrupted PHB diag-data for case of frozen PE. In order to solve the pr

[PATCH 4/9] powerpc/eeh: Introduce eeh_pe_free()

2014-02-24 Thread Gavin Shan
The patch introduces eeh_pe_free() to replace original kfree(pe) so that we could have more checks there and calls to platform interface supplied by eeh_ops in future. Signed-off-by: Gavin Shan --- arch/powerpc/kernel/eeh_pe.c | 25 +++-- 1 file changed, 23 insertions(+), 2

Re: [PATCH] powerpc/powernv: Read opal error log and export it through sysfs interface.

2014-02-24 Thread Mahesh Jagannath Salgaonkar
On 02/21/2014 05:41 AM, Stewart Smith wrote: > Mahesh J Salgaonkar writes: > > This patch adds support to read error logs from OPAL and export them > > to userspace through sysfs interface /sys/firmware/opa/opal-elog. Hi Stewart, Thanks for the review. This code definitely needs improvement.

Re: [PATCH] powerpc: warn users of smt-snooze-delay that the API isn't there anymore

2014-02-24 Thread Madhavan Srinivasan
On Saturday 22 February 2014 05:44 AM, Cody P Schafer wrote: > /sys/devices/system/cpu/cpu*/smt-snooze-delay was converted into a NOP > in commit 3fa8cad82b94d0bed002571bd246f2299ffc876b, and now does > nothing. Add a pr_warn() to convince any users that they should stop > using it. > > The commit

Re: [PATCH v2 10/11] powerpc/perf: add kconfig option for hypervisor provided counters

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:14 UTC, Cody P Schafer wrote: > Signed-off-by: Cody P Schafer > --- > arch/powerpc/perf/Makefile | 2 ++ > arch/powerpc/platforms/Kconfig.cputype | 6 ++ > 2 files changed, 8 insertions(+) > > diff --git a/arch/powerpc/perf/Makefile b/arch/powerpc/perf

Re: [PATCH v2 09/11] powerpc/perf: add support for the hv 24x7 interface

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:13 UTC, Cody P Schafer wrote: > This provides a basic interface between hv_24x7 and perf. Similar to > the one provided for gpci, it lacks transaction support and does not > list any events. > > Signed-off-by: Cody P Schafer > --- > arch/powerpc/perf/hv-24x7.c | 491

Re: [PATCH v2 08/11] powerpc/perf: add support for the hv gpci (get performance counter info) interface

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:12 UTC, Cody P Schafer wrote: > This provides a basic link between perf and hv_gpci. Notably, it does > not yet support transactions and does not list any events (they can > still be manually composed). Can you explain how the HV_CAPS stuff ends up looking. I'm not aga

Re: [PATCH v2 05/11] powerpc: add hv_gpci interface header

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:09 UTC, Cody P Schafer wrote: > "H_GetPerformanceCounterInfo" (refered to as hv_gpci or just gpci from > here on) is an interface to retrieve specific performance counters and > other data from the hypervisor. All outputs have a fixed format (and > are represented as str

Re: [PATCH v2 07/11] powerpc: add a shared interface to get gpci version and capabilities

2014-02-24 Thread Michael Ellerman
[PATCH v2 07/11] powerpc: add a shared interface to get gpci version and capabilities All the patches that touch perf should be "powerpc/perf: foo" On Fri, 2014-14-02 at 22:02:11 UTC, Cody P Schafer wrote: > ... I realise this is a fairly small patch but a changelog is still nice. You could for

Re: [PATCH v2 04/11] powerpc: add hvcalls for 24x7 and gpci (get performance counter info)

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:08 UTC, Cody P Schafer wrote: > Signed-off-by: Cody P Schafer > --- > arch/powerpc/include/asm/hvcall.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/arch/powerpc/include/asm/hvcall.h > b/arch/powerpc/include/asm/hvcall.h > index d8b600b..652f7e4 1006

Re: [PATCH v2 03/11] sysfs: create bin_attributes under the requested group

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:07 UTC, Cody P Schafer wrote: > bin_attributes created/updated in create_files() (such as those listed > via (struct device).attribute_groups) were not placed under the > specified group, and instead appeared in the base kobj directory. > > Fix this by making bin_attrib

Re: [PATCH v2 02/11] perf core: export swevent hrtimer helpers

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:06 UTC, Cody P Schafer wrote: > Export the swevent hrtimer helpers currently only used in events/core.c > to allow the addition of architecture specific sw-like pmus. Peter, Ingo, can we get your ACK on this please? cheers > Signed-off-by: Cody P Schafer > --- > in

Re: [PATCH v2 01/11] perf: add PMU_RANGE_ATTR() helper for use by sw-like pmus

2014-02-24 Thread Michael Ellerman
On Fri, 2014-14-02 at 22:02:05 UTC, Cody P Schafer wrote: > Add PMU_RANGE_ATTR() and PMU_RANGE_RESV() (for reserved areas) which > generate functions to extract the relevent bits from > event->attr.config{,1,2} for use by sw-like pmus where the > 'config{,1,2}' values don't map directly to hardware

Re: [PATCH 1/3] mm: return NUMA_NO_NODE in local_memory_node if zonelists are not setup

2014-02-24 Thread Nishanth Aravamudan
On 24.02.2014 [13:43:31 -0600], Christoph Lameter wrote: > On Fri, 21 Feb 2014, Nishanth Aravamudan wrote: > > > I added two calls to local_memory_node(), I *think* both are necessary, > > but am willing to be corrected. > > > > One is in map_cpu_to_node() and one is in start_secondary(). The > >

[PATCH] powerpc/powernv Platform dump interface

2014-02-24 Thread Stewart Smith
This enables support for userspace to fetch and initiate FSP and Platform dumps from the service processor (via firmware) through sysfs. Based on original patch from Vasant Hegde Flow: - We register for OPAL notification events. - OPAL sends new dump available notification. - We make infor

Re: [PATCH] powerpc/crashdump : fix page frame number check in copy_oldmem_page

2014-02-24 Thread Michael Ellerman
On Mon, 2014-02-24 at 17:30 +0100, Laurent Dufour wrote: > In copy_oldmem_page, the current check using max_pfn and min_low_pfn to > decide if the page is backed or not, is not valid when the memory layout is > not continuous. > > This happens when running as a QEMU/KVM guest, where RTAS is mapped

Re: [PATCH] ppc476: Enable a linker work around for IBM errata #46

2014-02-24 Thread Alistair Popple
On Mon, 24 Feb 2014 08:35:06 Josh Boyer wrote: > On Mon, Feb 24, 2014 at 2:00 AM, Alistair Popple wrote: > > This patch adds an option to enable a work around for an icache bug on > > 476 that can cause execution of stale instructions when falling > > through pages (IBM errata #46). It requires a

Re: [PATCH] watchdog: mpc8xxx_wdt: MPC8xx is HW enabled

2014-02-24 Thread Wim Van Sebroeck
Hi Christophe, > MPC8xx watchdog is enabled at startup by HW. > If the bootloader disables it, it cannot be reenabled. > > Signed-off-by: Christophe Leroy > > diff -ur a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c > --- a/drivers/watchdog/mpc8xxx_wdt.c 2013-05-11 22:57:46.0

Re: [RFC PATCH 2/3] topology: support node_numa_mem() for determining the fallback node

2014-02-24 Thread Christoph Lameter
On Mon, 24 Feb 2014, Joonsoo Kim wrote: > > It will not common get there because of the tracking. Instead a per cpu > > object will be used. > > > get_partial_node() always fails even if there are some partial slab on > > > memoryless node's neareast node. > > > > Correct and that leads to a page

Re: [PATCH 1/3] mm: return NUMA_NO_NODE in local_memory_node if zonelists are not setup

2014-02-24 Thread Christoph Lameter
On Fri, 21 Feb 2014, Nishanth Aravamudan wrote: > I added two calls to local_memory_node(), I *think* both are necessary, > but am willing to be corrected. > > One is in map_cpu_to_node() and one is in start_secondary(). The > start_secondary() path is fine, AFAICT, as we are up & running at that

[PATCH] powerpc/crashdump : fix page frame number check in copy_oldmem_page

2014-02-24 Thread Laurent Dufour
In copy_oldmem_page, the current check using max_pfn and min_low_pfn to decide if the page is backed or not, is not valid when the memory layout is not continuous. This happens when running as a QEMU/KVM guest, where RTAS is mapped higher in the memory. In that case max_pfn points to the end of RT

Re: [PATCH] ppc476: Enable a linker work around for IBM errata #46

2014-02-24 Thread Josh Boyer
On Mon, Feb 24, 2014 at 2:00 AM, Alistair Popple wrote: > This patch adds an option to enable a work around for an icache bug on > 476 that can cause execution of stale instructions when falling > through pages (IBM errata #46). It requires a recent version of > binutils which supports the --ppc47

Re: [PATCH RFC v8 2/5] dma: mpc512x: add support for peripheral transfers

2014-02-24 Thread Andy Shevchenko
On Mon, 2014-02-24 at 15:09 +0400, Alexander Popov wrote: > Introduce support for slave s/g transfer preparation and the associated > device control callback in the MPC512x DMA controller driver, which adds > support for data transfers between memory and peripheral I/O to the > previously supported

Re: [PATCH RFC v8 5/5] dma: mpc512x: register for device tree channel lookup

2014-02-24 Thread Andy Shevchenko
On Mon, 2014-02-24 at 15:09 +0400, Alexander Popov wrote: > From: Gerhard Sittig > > register the controller for device tree based lookup of DMA channels > (non-fatal for backwards compatibility with older device trees) and > provide the '#dma-cells' property in the shared mpc5121.dtsi file > >

Re: [patch 03/26] powerpc: eeh: Kill another abuse of irq_desc

2014-02-24 Thread Thomas Gleixner
On Mon, 24 Feb 2014, Gavin Shan wrote: > On Sun, Feb 23, 2014 at 09:40:09PM -, Thomas Gleixner wrote: > >commit 91150af3a (powerpc/eeh: Fix unbalanced enable for IRQ) is > >another brilliant example of trainwreck engineering. > > > >The patch "fixes" the issue of an unbalanced call to irq_enabl

[PATCH RFC v8 5/5] dma: mpc512x: register for device tree channel lookup

2014-02-24 Thread Alexander Popov
From: Gerhard Sittig register the controller for device tree based lookup of DMA channels (non-fatal for backwards compatibility with older device trees) and provide the '#dma-cells' property in the shared mpc5121.dtsi file Signed-off-by: Gerhard Sittig [ a13xp0p0...@gmail.com: resolve little p

[PATCH RFC v8 4/5] dma: mpc512x: add device tree binding document

2014-02-24 Thread Alexander Popov
From: Gerhard Sittig introduce a device tree binding document for the MPC512x DMA controller Signed-off-by: Gerhard Sittig [ a13xp0p0...@gmail.com: turn this into a separate patch ] --- .../devicetree/bindings/dma/mpc512x-dma.txt| 55 ++ 1 file changed, 55 insertion

[PATCH RFC v8 3/5] dma: of: Add common xlate function for matching by channel id

2014-02-24 Thread Alexander Popov
This patch adds a new common OF dma xlate callback function which will match a channel by it's id. The binding expects one integer argument which it will use to lookup the channel by the id. Unlike of_dma_simple_xlate this function is able to handle a system with multiple DMA controllers. When re

[PATCH RFC v8 2/5] dma: mpc512x: add support for peripheral transfers

2014-02-24 Thread Alexander Popov
Introduce support for slave s/g transfer preparation and the associated device control callback in the MPC512x DMA controller driver, which adds support for data transfers between memory and peripheral I/O to the previously supported mem-to-mem transfers. Signed-off-by: Alexander Popov --- drive

[PATCH RFC v8 0/5] MPC512x DMA slave s/g support, OF DMA lookup

2014-02-24 Thread Alexander Popov
2013/7/14 Gerhard Sittig : > this series > - introduces slave s/g support (that's support for DMA transfers which >involve peripherals in contrast to mem-to-mem transfers) > - adds device tree based lookup support for DMA channels > - combines floating patches and related feedback which already

[PATCH RFC v8 1/5] dma: mpc512x: reorder mpc8308 specific instructions

2014-02-24 Thread Alexander Popov
Concentrate the specific code for MPC8308 in the 'if' branch and handle MPC512x in the 'else' branch. This modification only reorders instructions but doesn't change behaviour. Signed-off-by: Alexander Popov Acked-by: Anatolij Gustschin Acked-by: Gerhard Sittig --- drivers/dma/mpc512x_dma.c |

[PATCH 3/3] dt/bindings: fsl-fec: add "per" to clock properties

2014-02-24 Thread Gerhard Sittig
a recent FEC binding document update that was motivated by i.MX development revealed that ARM and PowerPC implementations in Linux did not agree on the clock names to use for the FEC nodes update the FEC (fast ethernet controller) binding to document the "per" clock name as an obsolete alias for "

[PATCH 2/3] dts: mpc512x: adjust clock specs for FEC nodes

2014-02-24 Thread Gerhard Sittig
a recent FEC binding document update that was motivated by i.MX development revealed that ARM and PowerPC implementations in Linux did not agree on the clock names to use for the FEC nodes change clock names from "per" to "ipg" in the FEC nodes of the mpc5121.dtsi include file such that the .dts s

[PATCH 1/3] fs_enet: update clock names to comply with FEC binding

2014-02-24 Thread Gerhard Sittig
a recent FEC binding document update that was motivated by i.MX development revealed that ARM and PowerPC implementations in Linux did not agree on the clock names to use for the FEC nodes change the OF clock lookup to prefer "ipg" over "per", which improves compliance with the binding, and keeps