Re: [PATCH v1 00/22] powerpc/eeh: Enhance converting EEH dev

2013-05-14 Thread Benjamin Herrenschmidt
On Wed, 2013-05-15 at 13:30 +0800, Gavin Shan wrote: > >There is an error injection framework we can use nowadays, or maybe you can > >put this in tools/powerpc ? > > > > Ben, we don't have error injection framework yet. I have one source file > "eeh-debug.c" > which exports P7IOC registers throu

Re: [PATCH] powerpc: Update currituck pci/usb fixup for new board revision

2013-05-14 Thread Tony Breeds
On Thu, May 09, 2013 at 10:42:13AM +1000, Alistair Popple wrote: > The currituck board uses a different IRQ for the pci usb host > controller depending on the board revision. This patch adds support > for newer board revisions by retrieving the board revision from the > FPGA and mapping the appropr

Re: [PATCH v1 00/22] powerpc/eeh: Enhance converting EEH dev

2013-05-14 Thread Gavin Shan
On Wed, May 15, 2013 at 01:57:44PM +1000, Benjamin Herrenschmidt wrote: >On Wed, 2013-05-15 at 11:34 +0800, Gavin Shan wrote: >> e don't have existing utility (e.g. errinjct) to test the patchset. In order >> to conduct the test, you need copy over the eeh-debug.c to PowerNV platform >> directory a

Re: [PATCH v1 00/22] powerpc/eeh: Enhance converting EEH dev

2013-05-14 Thread Benjamin Herrenschmidt
On Wed, 2013-05-15 at 11:34 +0800, Gavin Shan wrote: > e don't have existing utility (e.g. errinjct) to test the patchset. In order > to conduct the test, you need copy over the eeh-debug.c to PowerNV platform > directory and change the makefile accordingly. Please contact me to get the > eeh-debug

[PATCH 19/22] powerpc/eeh: Initialization for PowerNV

2013-05-14 Thread Gavin Shan
The patch initializes EEH for PowerNV platform. Because the OPAL APIs requires HUB ID, we need trace that through struct pnv_phb. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/pci-ioda.c | 17 ++--- arch/powerpc/platforms/powernv/pci-p5ioc2.c |6 -- 2 files

[PATCH 20/22] powerpc/eeh: Enable EEH check for config access

2013-05-14 Thread Gavin Shan
The patch enables EEH check and let EEH core to process the EEH errors for PowerNV platform while accessing config space. Originally, the implementation already had mechanism to check EEH errors and tried to recover from them. However, we never let EEH core to handle the EEH errors. Signed-off-by:

[PATCH 21/22] powerpc/eeh: Process interrupts caused by EEH

2013-05-14 Thread Gavin Shan
On PowerNV platform, the EEH event is produced either by detect on accessing config or I/O registers, or by interrupts dedicated for EEH report. The patch adds support to process the interrupts dedicated for EEH report. Firstly, the kernel thread will be waken up to process incoming interrupt. The

[PATCH 22/22] powerpc/eeh: Connect EEH error interrupt handle

2013-05-14 Thread Gavin Shan
The EEH error interrupts should have been exported by firmware through device tree. The OS already installed the interrupt handler (opal_interrupt()) for them. The patch checks if we have any existing EEH errors and wakes the kernel thread up to process that if possible. Signed-off-by: Gavin Shan

[PATCH 18/22] powerpc/eeh: PowerNV EEH backends

2013-05-14 Thread Gavin Shan
The patch adds EEH backends for PowerNV platform. It's notable that part of those EEH backends call to the I/O chip dependent backends. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/Makefile |2 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 380 ++

[PATCH 17/22] powerpc/eeh: I/O chip PE log and bridge setup

2013-05-14 Thread Gavin Shan
The patch adds backends to retrieve error log and configure p2p bridges for the indicated PE. Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/eeh-ioda.c | 57 - 1 files changed, 55 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/power

[PATCH 14/22] powerpc/eeh: I/O chip EEH enable option

2013-05-14 Thread Gavin Shan
The patch adds the backend to enable or disable EEH functionality for the specified PE. The backend is also used to enable MMIO or DMA path for the problematic PE. It's notable that all PEs on PowerNV platform support EEH functionality by default, and we disallow to disable EEH for the specific PE.

[PATCH 15/22] powerpc/eeh: I/O chip EEH state retrieval

2013-05-14 Thread Gavin Shan
The patch adds I/O chip backend to retrieve the state for the indicated PE. While the PE state is temperarily unavailable, we return the default wait time (1000ms). Signed-off-by: Gavin Shan --- arch/powerpc/platforms/powernv/eeh-ioda.c | 104 - 1 files changed, 103

[PATCH 13/22] powerpc/eeh: I/O chip post initialization

2013-05-14 Thread Gavin Shan
The post initialization (struct eeh_ops::post_init) is called after the EEH probe is done. On the other hand, the EEH core post initialization is designed to call platform and then I/O chip backend on PowerNV platform. The patch adds the backend for I/O chip to notify the platform the specific PHB

[PATCH 16/22] powerpc/eeh: I/O chip PE reset

2013-05-14 Thread Gavin Shan
The patch adds the I/O chip backend to do PE reset. For now, we focus on PCI bus dependent PE. If PHB PE has been put into error state, the PHB will take complete reset. Besides, the root bridge will take fundamental or hot reset accordingly if the indicated PE locates at the toppest of PCI hierarc

[PATCH 12/22] powerpc/eeh: EEH backend for P7IOC

2013-05-14 Thread Gavin Shan
For EEH on PowerNV platform, the overall architecture is a bit different from that on pSeries platform. In order to support multiple I/O chips in future, we split EEH to 3 layers for PowerNV platform: EEH core, platform layer, I/O layer. It would give EEH implementation on PowerNV much more flexibi

[PATCH 11/22] powerpc/eeh: Sync OPAL API with firmware

2013-05-14 Thread Gavin Shan
The patch synchronizes OPAL APIs between kernel and firmware. Signed-off-by: Gavin Shan --- arch/powerpc/include/asm/opal.h| 110 +++ arch/powerpc/platforms/powernv/opal-wrappers.S |2 + 2 files changed, 93 insertions(+), 19 deletions(-) diff --git a/arc

[PATCH 09/22] powerpc/eeh: Delay EEH probe during hotplug

2013-05-14 Thread Gavin Shan
While doing EEH recovery, the PCI devices of the problematic PE should be removed and then added to the system again. During the so-called hotplug event, the PCI devices of the problematic PE will be probed through early/late phase. We would delay EEH probe on late point for PowerNV platform since

[PATCH 10/22] powerpc/eeh: Differentiate EEH events

2013-05-14 Thread Gavin Shan
The EEH event is usually produced because of 0xFF's returned from PCI config or I/O registers. PowerNV platform also can produce EEH event through interrupts. The patch differentiates the EEH events produced for different cases in order to process them differently in future. Signed-off-by: Gavin S

[PATCH 08/22] powerpc/eeh: Refactor eeh_reset_pe_once()

2013-05-14 Thread Gavin Shan
The patch changes the criteria used to judge if the PE has been resetted successfully. We needn't the PE status is exactly equal to the combo: (EEH_STATE_MMIO_ACTIVE | EEH_STATE_DMA_ACTIVE). Signed-off-by: Gavin Shan --- arch/powerpc/platforms/pseries/eeh.c |4 ++-- 1 files changed, 2 insert

[PATCH 02/22] powerpc/eeh: Function to tranverse PCI devices

2013-05-14 Thread Gavin Shan
For EEH on PowerNV platform, the PCI devices will be probed to check if they support EEH functionality. Different from the case of EEH for pSeries platform, we will probe real PCI device instead of device tree node for EEH capability on PowerNV platform. The patch introduces function eeh_pci_dev_t

[PATCH 06/22] powerpc/eeh: Make eeh_init() public

2013-05-14 Thread Gavin Shan
For EEH on PowerNV platform, we will do EEH probe based on the real PCI devices. The PCI devices are available after PCI probe. So we have to call eeh_init() explicitly on PowerNV platform after PCI probe. The patch also does EEH probe for PowerNV platform in eeh_init(). Signed-off-by: Gavin Shan

[PATCH 07/22] powerpc/eeh: EEH post initialization operation

2013-05-14 Thread Gavin Shan
The patch adds new EEH operation post_init. It's used to notify the platform that EEH core has completed the EEH probe. By that, PowerNV platform starts to use the services supplied by EEH functionality. Signed-off-by: Gavin Shan --- arch/powerpc/include/asm/eeh.h |1 + arch/powerpc/pl

[PATCH 03/22] powerpc/eeh: Make eeh_phb_pe_get() public

2013-05-14 Thread Gavin Shan
While processing EEH event interrupt from P7IOC, we need function to retrieve the PE according to the indicated PCI host controller (struct pci_controller). The patch makes function eeh_phb_pe_get() public so that other source files can call it for that purpose. Signed-off-by: Gavin Shan --- arc

[PATCH 05/22] powerpc/eeh: Trace PCI bus from PE

2013-05-14 Thread Gavin Shan
There're several types of PEs can be supported for now: PHB, Bus and Device dependent PE. For PCI bus dependent PE, tracing the corresponding PCI bus from PE (struct eeh_pe) would make the code more efficient. The patch also enables the retrieval of PCI bus based on the PCI device dependent PE. Si

[PATCH v1 00/22] powerpc/eeh: Enhance converting EEH dev

2013-05-14 Thread Gavin Shan
Initially, the series of patches is built based on 3.10.RC1 and the patchset doesn't intend to enable EEH functionality for PHB3 for now. The series of patches intends to support EEH for PowerNV platform. The EEH core already supports multiple probe methods: device tree nodes and PCI devices. For

[PATCH 04/22] powerpc/eeh: Make eeh_pe_get() public

2013-05-14 Thread Gavin Shan
While processing EEH event interrupt from P7IOC, we need function to retrieve the PE according to the indicated EEH device. The patch makes function eeh_pe_get() public so that other source files can call it for that purpose. Also, the patch fixes referring to wrong BDF (Bus/Device/Function) addres

[PATCH 01/22] powerpc/eeh: Enhance converting EEH dev

2013-05-14 Thread Gavin Shan
Under some special circumstances, the EEH device doesn't have the associated device tree node or PCI device. The patch enhances those functions converting EEH device to device tree node or PCI device accordingly to avoid unnecessary system crash. Signed-off-by: Gavin Shan --- arch/powerpc/includ

Re: [RFC PATCH v2, part 2 09/18] PCI, PPC: use hotplug-safe iterators to walk PCI buses

2013-05-14 Thread Benjamin Herrenschmidt
On Wed, 2013-05-15 at 00:51 +0800, Jiang Liu wrote: > Enhance PPC architecture specific code to use hotplug-safe iterators > to walk PCI buses. I was about to ack it but then I saw: > diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c > index 51a133a..a41c6dd 100644 > --- a/

Re: [PATCH v5, part4 31/41] mm/ppc: prepare for removing num_physpages and simplify mem_init()

2013-05-14 Thread Benjamin Herrenschmidt
On Wed, 2013-05-08 at 23:51 +0800, Jiang Liu wrote: > Prepare for removing num_physpages and simplify mem_init(). No objection, I haven't had a chance to actually build/boot test though. BTW. A recommended way of doing so which is pretty easy even if you don't have access to powerpc hardware nowa

Re: [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-05-14 Thread Gu Zheng
On 05/14/2013 01:23 AM, Yinghai Lu wrote: > On Mon, May 13, 2013 at 9:08 AM, Jiang Liu wrote: >> From: Gu Zheng >> diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c >> index 4f0bc0a..bc075a3 100644 >> --- a/drivers/pci/probe.c >> +++ b/drivers/pci/probe.c >> @@ -1131,6 +1131,7 @@ static voi

Re: [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-05-14 Thread Yinghai Lu
On Tue, May 14, 2013 at 9:57 AM, Liu Jiang wrote: > On Tue 14 May 2013 11:10:33 PM CST, Yinghai Lu wrote: >> >> On Tue, May 14, 2013 at 7:59 AM, Liu Jiang wrote: >>> >>> On 05/14/2013 04:26 PM, Gu Zheng wrote: >>> I suggest to use pci_release_dev() instead because it also needs to >>> releas

Re: [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-05-14 Thread Liu Jiang
On Tue 14 May 2013 11:10:33 PM CST, Yinghai Lu wrote: On Tue, May 14, 2013 at 7:59 AM, Liu Jiang wrote: On 05/14/2013 04:26 PM, Gu Zheng wrote: I suggest to use pci_release_dev() instead because it also needs to release OF related resources. I will update it in next version. diff --git a/

[RFC PATCH v2, part 2 09/18] PCI, PPC: use hotplug-safe iterators to walk PCI buses

2013-05-14 Thread Jiang Liu
Enhance PPC architecture specific code to use hotplug-safe iterators to walk PCI buses. Signed-off-by: Jiang Liu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Bjorn Helgaas Cc: Gavin Shan Cc: Greg Kroah-Hartman Cc: Grant Likely Cc: Bill Pemberton Cc: Yinghai Lu Cc: linuxppc-dev@lists.ozla

Re: [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-05-14 Thread Yinghai Lu
On Tue, May 14, 2013 at 7:59 AM, Liu Jiang wrote: > On 05/14/2013 04:26 PM, Gu Zheng wrote: > I suggest to use pci_release_dev() instead because it also needs to > release OF related resources. > I will update it in next version. > > diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c > ind

Re: [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead

2013-05-14 Thread Liu Jiang
On 05/14/2013 04:26 PM, Gu Zheng wrote: On 05/14/2013 01:23 AM, Yinghai Lu wrote: On Mon, May 13, 2013 at 9:08 AM, Jiang Liu wrote: From: Gu Zheng diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 4f0bc0a..bc075a3 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1131

[PATCH v1 2/2] powerpc/mpc512x: initialize board restart earlier

2013-05-14 Thread Gerhard Sittig
move the MPC512x restart initialization from the shared init routine to the shared init_early routine recent problems in the proc(5) filesystem initialization led to the situation where the platform's restart routine was invoked yet the registers required for software reset were not yet available,

[PATCH v1 1/2] powerpc/mpc512x: move common code to shared.c file

2013-05-14 Thread Gerhard Sittig
- implement all of the init, init early, and setup arch routines in the shared source file for the MPC512x PowerPC platform, and make all MPC512x based boards (ADS, PDM, generic) use those common routines - remove declarations from header files for routines which aren't referenced from extern

[PATCH v1 0/2] powerpc/mpc512x: improve common platform code

2013-05-14 Thread Gerhard Sittig
the first change concentrates specific details in the shared routines, and passes all board support for the ADS, PDM, and generic boards through the common MPC512x code (specifically the init, init early, and setup arch routines) the second change slightly modifies behaviour in that it moves the r

[git pull] Please pull powerpc.git merge branch

2013-05-14 Thread Benjamin Herrenschmidt
Hi Linus ! Here are some more powerpc fixes to apply to 3.10. This is mostly bug fixes (some of them regressions, some of them I deemed worth merging now) along with some patches from Li Zhong hooking up the new context tracking stuff (for the new full NO_HZ) Cheers, Ben. The following changes s

RE: [PATCH v3 1/4] powerpc/mpic: add irq_set_wake support

2013-05-14 Thread Wang Dongsheng-B40534
Thanks ben. :) - dongsheng. > -Original Message- > From: Benjamin Herrenschmidt [mailto:b...@kernel.crashing.org] > Sent: Monday, May 13, 2013 1:00 PM > To: Wang Dongsheng-B40534 > Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421; > ga...@kernel.crashing.org > Subject: Re: [PATCH v3 1

RE: [PATCH] powerpc/mpc85xx: fix non-bootcpu cannot up after hibernation resume

2013-05-14 Thread Wang Dongsheng-B40534
I send to a wrong email address "Anton Vorontsov " Add Anton Vorontsov to this email. Thanks all. > -Original Message- > From: Wang Dongsheng-B40534 > Sent: Tuesday, May 14, 2013 4:06 PM > To: avoront...@ru.mvista.com > Cc: pau...@samba.org; r...@sisk.pl; b...@kernel.crashing.org; > joh

[PATCH] powerpc/mpc85xx: fix non-bootcpu cannot up after hibernation resume

2013-05-14 Thread Wang Dongsheng
This problem belongs to the core synchronization issues. The cpu1 already updated spin_table values, but bootcore cannot get this value in time. After bootcpu hibiernation restore the pages. we are now running with the kernel data of the old kernel fully restored. if we reset the non-bootcpus that

[PATCH] powerpc: Set show_unhandled_signals to 1 by default

2013-05-14 Thread Benjamin Herrenschmidt
Just like other architectures Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/kernel/signal.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/signal.c b/arch/powerpc/kernel/signal.c index d63b502..577a8aa 100644 --- a/arch/powerpc/kernel/signal.c