From: Gavin Shan sha...@linux.vnet.ibm.com

2013-06-26 Thread Gavin Shan
The series of patches are follow-up in order to make EEH workable for PowerNV platform on Juno-IOC-L machine. Couple of issues have been fixed with help of Ben: - Check PCIe link after PHB complete reset - Restore config space for bridges - The EEH address cache wasn't

[PATCH 3/8] powerpc/powernv: Replace variables with flags

2013-06-26 Thread Gavin Shan
We have 2 fields in struct pnv_phb to trace the states. The patch replace the fields with one and introduces flags for that. The patch doesn't impact the logic. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/eeh-ioda.c |8 arch/powerpc

[PATCH 1/8] powerpc/eeh: Don't collect PCI-CFG data on PHB

2013-06-26 Thread Gavin Shan
When the PHB is fenced or dead, it's pointless to collect the data from PCI config space of subordinate PCI devices since it should return 0xFF's. The patch also fixes overwritten buffer while getting PCI config data. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel

[PATCH 8/8] powernv/eeh: Do hotplug on devices without EEH aware driver

2013-06-26 Thread Gavin Shan
as above. The idea was proposed by Ben. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |4 +- arch/powerpc/include/asm/pci.h |1 + arch/powerpc/kernel/eeh_driver.c | 134 +- 3 files changed, 137 insertions(+), 2

[PATCH 4/8] powerpc/eeh: Fix address catch for PowerNV

2013-06-26 Thread Gavin Shan
On the PowerNV platform, the EEH address cache isn't built correctly because we skipped the EEH devices without binding PE. The patch fixes that. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh_cache.c |2 +- arch/powerpc/platforms/powernv/pci-ioda.c

[PATCH 7/8] powerpc/powernv: Use dev-node in PCI config accessors

2013-06-26 Thread Gavin Shan
backends just reuse them. The patch also fix one potential risk: We possiblly have frozen PE during the early PCI probe time, but we haven't setup the PE mapping yet. So the errors should be counted to PE#0. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/eeh

[PATCH 5/8] powerpc/eeh: Refactor the output message

2013-06-26 Thread Gavin Shan
. Besides, some printk() are replaced with pr_warning(). Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c |9 +++-- arch/powerpc/kernel/eeh_driver.c | 23 ++- arch/powerpc/platforms/powernv/eeh-ioda.c | 25

[PATCH 6/8] powerpc/eeh: Avoid build warnings

2013-06-26 Thread Gavin Shan
(). This is often because .pnv_pci_ioda_fixup lacks a __init Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |4 ++-- arch/powerpc/kernel/eeh.c |2 +- arch/powerpc/kernel/eeh_cache.c |2 +- 3 files changed, 4 insertions(+), 4 deletions

[PATCH 2/8] powerpc/eeh: Check PCIe link after reset

2013-06-26 Thread Gavin Shan
. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh_pe.c | 157 ++ 1 files changed, 144 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c index 55943fc..016588a 100644

Re: From: Gavin Shan sha...@linux.vnet.ibm.com

2013-06-26 Thread Gavin Shan
On Thu, Jun 27, 2013 at 01:46:41PM +0800, Gavin Shan wrote: The subject went wrong. I didn't make the format correct and here's the makeup: [PATCH v4 00/8] Follow-up fixes for EEH on PowerNV The series of patches are follow-up in order to make EEH workable for PowerNV platform on Juno-IOC-L

[PATCH] powerpc/eeh: Update MAINTAINERS

2013-06-27 Thread Gavin Shan
Update MAINTAINERS to reflect recent changes. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- MAINTAINERS |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5be702c..b447392 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6146,10

Re: [PATCH] powerpc/eeh: Update MAINTAINERS

2013-06-27 Thread Gavin Shan
On Fri, Jun 28, 2013 at 12:11:29PM +1000, Benjamin Herrenschmidt wrote: On Fri, 2013-06-28 at 09:59 +0800, Gavin Shan wrote: Update MAINTAINERS to reflect recent changes. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- MAINTAINERS |4 1 files changed, 4 insertions(+), 0

[PATCH v2] powerpc/eeh: Update MAINTAINERS

2013-06-27 Thread Gavin Shan
Update MAINTAINERS to reflect recent changes. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- MAINTAINERS |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5be702c..c724a3a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6149,7

Re: [PATCH v2] powerpc/eeh: Update MAINTAINERS

2013-06-27 Thread Gavin Shan
On Fri, Jun 28, 2013 at 02:56:53PM +1000, Benjamin Herrenschmidt wrote: On Fri, 2013-06-28 at 10:25 +0800, Gavin Shan wrote: Update MAINTAINERS to reflect recent changes. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- MAINTAINERS |7 +++ 1 files changed, 7 insertions(+), 0

[PATCH v3] powerpc/eeh: Update MAINTAINERS

2013-06-27 Thread Gavin Shan
Update MAINTAINERS to reflect recent changes. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- MAINTAINERS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5be702c..78e64c9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6149,7

Re: [PATCH v3] powerpc/eeh: Update MAINTAINERS

2013-06-28 Thread Gavin Shan
On Fri, Jun 28, 2013 at 05:46:34PM +1000, Stephen Rothwell wrote: Hi Gavin, On Fri, 28 Jun 2013 13:42:23 +0800 Gavin Shan sha...@linux.vnet.ibm.com wrote: Update MAINTAINERS to reflect recent changes. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- MAINTAINERS |6 ++ 1

[PATCH] powerpc/pci: Avoid overriding MSI interrupt

2013-06-28 Thread Gavin Shan
] c00ad6f8 .kthread+0xe8/0xf0 [c00fa24b7e30] c000a05c .ret_from_kernel_thread+0x5c/0x80 Reported-by: Benjamin Herrenschmidt b...@kernel.crashing.org Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-common.c | 16 1 files changed

[PATCH v4] powerpc/eeh: Update MAINTAINERS

2013-06-28 Thread Gavin Shan
Update MAINTAINERS to reflect recent changes. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- MAINTAINERS |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 5be702c..ebeceeb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3103,6

Re: [PATCH] powerpc/pci: Avoid overriding MSI interrupt

2013-06-29 Thread Gavin Shan
On Sun, Jun 30, 2013 at 09:09:20AM +1000, Benjamin Herrenschmidt wrote: On Fri, 2013-06-28 at 21:10 +0800, Gavin Shan wrote: .../... I'm running some tests, so far it looks good. However, Gavin, when you have a chance on vpl3, try injecting errors to other adapters, for example the VGA adapter

[PATCH v1 0/8] EEH Followup Fixes (II)

2013-07-04 Thread Gavin Shan
The series of patches bases on linux-poerpc-next and intends to resolve the following problems: - On pSeries platform, the EEH doesn't work after PHB hotplug with drmgr. The root cause is that the EEH resources ( EEH devices, EEH caches) aren't released correctly. For

[PATCH 3/8] powerpc/pci: Override pcibios_stop_dev()

2013-07-04 Thread Gavin Shan
The patch overrides the weak function pcibios_stop_dev() to destroy the EEH device and cache while stopping and removing the corresponding PCI device. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-hotplug.c | 13 - 1 files changed, 12 insertions

[PATCH 2/8] powerpc/eeh: Export functions for hotplug

2013-07-04 Thread Gavin Shan
Make some functions public in order to support hotplug on either specific PCI bus or PCI device in future. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |9 + arch/powerpc/kernel/eeh.c |6 +++--- 2 files changed, 12 insertions(+), 3

[PATCH 6/8] powerpc/eeh: Tranverse EEH devices with safe mode

2013-07-04 Thread Gavin Shan
Currently, we're transversing EEH devices by list_for_each_entry(). That's not safe enough because the EEH devices might be removed from its parent PE while doing iteration. The patch replaces that with list_for_each_entry_safe(). Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch

[PATCH 7/8] powerpc/pci: Partial hotplug support

2013-07-04 Thread Gavin Shan
and the newly added devices in complete hotplug can't be enabled. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/pci-bridge.h |2 +- arch/powerpc/include/asm/pci.h|2 + arch/powerpc/kernel/pci-common.c |8 ++- arch/powerpc/kernel/pci-hotplug.c

[PATCH 8/8] powerpc/eeh: Support partial hotplug

2013-07-04 Thread Gavin Shan
from its PE, but with special flag. After the reset is done, those EEH devices with the special flag will be scanned one by one. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |6 ++- arch/powerpc/kernel/eeh.c| 22 ++-- arch/powerpc

[PATCH 5/8] powerpc/eeh: Keep PE during hotplug

2013-07-04 Thread Gavin Shan
and introduce new flag EEH_PE_KEEP to save the PE while doing hotplug during EEH error recovery. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h| 11 +-- arch/powerpc/include/asm/pci-bridge.h |1 - arch/powerpc/kernel/eeh.c | 28

[PATCH 1/8] PCI: Add pcibios_stop_dev()

2013-07-04 Thread Gavin Shan
() for the purpose. Cc: Bjorn Helgaas bhelg...@google.com Cc: linux-...@vger.kernel.org Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- drivers/pci/probe.c |4 drivers/pci/remove.c |2 ++ include/linux/pci.h |1 + 3 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers

[PATCH 4/8] PCI/hotplug: Needn't remove EEH cache again

2013-07-04 Thread Gavin Shan
Since pci_stop_and_remove_bus_device() has removed the EEH cache, we needn't do that again. Cc: Bjorn Helgaas bhelg...@google.com Cc: linux-...@vger.kernel.org Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- drivers/pci/hotplug/rpadlpar_core.c |1 - 1 files changed, 0 insertions

[PATCH 01/10] powerpc/eeh: Remove reference to PCI device

2013-07-17 Thread Gavin Shan
the reference to the PCI device in EEH core. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c |4 arch/powerpc/kernel/eeh_cache.c | 18 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc

[PATCH v2 0/10] EEH Followup Fixes (II)

2013-07-17 Thread Gavin Shan
The series of patches bases on linux-poerpc-next initially and intends to resolve the following problems: - On pSeries platform, the EEH doesn't work after PHB hotplug with drmgr. The root cause is that the EEH resources ( EEH devices, EEH caches) aren't released

[PATCH 02/10] powerpc/eeh: Export functions for hotplug

2013-07-17 Thread Gavin Shan
Make some functions public in order to support hotplug on either specific PCI bus or PCI device in future. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |9 + arch/powerpc/kernel/eeh.c |6 +++--- 2 files changed, 12 insertions(+), 3

[PATCH 04/10] PCI/hotplug: Needn't remove EEH cache again

2013-07-17 Thread Gavin Shan
Since pcibios_release_device() called by pci_stop_and_remove_bus_device() has removed the EEH cache, we needn't do that again. Acked-by: Bjorn Helgaas bhelg...@google.com Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- drivers/pci/hotplug/rpadlpar_core.c |1 - 1 files changed, 0

[PATCH 07/10] powerpc/pci: Partial hotplug support

2013-07-17 Thread Gavin Shan
and the newly added devices in complete hotplug can't be enabled. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/pci-bridge.h |2 +- arch/powerpc/include/asm/pci.h|2 + arch/powerpc/kernel/pci-common.c |8 ++- arch/powerpc/kernel/pci-hotplug.c

[PATCH 03/10] powerpc/pci: Override pcibios_release_device()

2013-07-17 Thread Gavin Shan
The patch overrides pcibios_release_device() to release EEH resources (EEH cache, unbinding EEH device) for the indicated PCI device. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-hotplug.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions

[PATCH 06/10] powerpc/eeh: Tranverse EEH devices with safe mode

2013-07-17 Thread Gavin Shan
Currently, we're transversing EEH devices by list_for_each_entry(). That's not safe enough because the EEH devices might be removed from its parent PE while doing iteration. The patch replaces that with list_for_each_entry_safe(). Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch

[PATCH 05/10] powerpc/eeh: Keep PE during hotplug

2013-07-17 Thread Gavin Shan
and introduce new flag EEH_PE_KEEP to save the PE while doing hotplug during EEH error recovery. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h| 11 +-- arch/powerpc/include/asm/pci-bridge.h |1 - arch/powerpc/kernel/eeh.c | 28

[PATCH 08/10] powerpc/eeh: Support partial hotplug

2013-07-17 Thread Gavin Shan
from its PE, but with special flag. After the reset is done, those EEH devices with the special flag will be scanned one by one. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |6 ++- arch/powerpc/kernel/eeh.c| 30 ++- arch/powerpc

[PATCH 09/10] powerpc/eeh: Don't use pci_dev during BAR restore

2013-07-17 Thread Gavin Shan
those information to EEH device in advance. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |8 +++- arch/powerpc/kernel/eeh_pe.c | 25 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 11 + arch/powerpc

[PATCH 10/10] powerpc/eeh: Fix unbalanced enable for IRQ

2013-07-17 Thread Gavin Shan
] .ret_from_kernel_thread+0x5c/0x80 Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh_driver.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 3fee021..72c4a17 100644

[PATCH 02/11] powerpc/eeh: Export functions for hotplug

2013-07-23 Thread Gavin Shan
Make some functions public in order to support hotplug on either specific PCI bus or PCI device in future. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |9 + arch/powerpc/kernel/eeh.c |6 +++--- 2 files changed, 12 insertions(+), 3

[PATCH 03/11] powerpc/pci: Override pcibios_release_device()

2013-07-23 Thread Gavin Shan
The patch overrides pcibios_release_device() to release EEH resources (EEH cache, unbinding EEH device) for the indicated PCI device. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-hotplug.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions

[PATCH 05/11] powerpc/eeh: Keep PE during hotplug

2013-07-23 Thread Gavin Shan
and introduce new flag EEH_PE_KEEP to save the PE while doing hotplug during EEH error recovery. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h| 11 +-- arch/powerpc/include/asm/pci-bridge.h |1 - arch/powerpc/kernel/eeh.c | 28

[PATCH 01/11] powerpc/eeh: Remove reference to PCI device

2013-07-23 Thread Gavin Shan
the reference to the PCI device in EEH core. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c |4 arch/powerpc/kernel/eeh_cache.c | 18 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc

[PATCH 04/11] PCI/hotplug: Needn't remove EEH cache again

2013-07-23 Thread Gavin Shan
Since pcibios_release_device() called by pci_stop_and_remove_bus_device() has removed the EEH cache, we needn't do that again. Cc: Bjorn Helgaas bhelg...@google.com Acked-by: Bjorn Helgaas bhelg...@google.com Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- drivers/pci/hotplug

[PATCH 09/11] powerpc/eeh: Don't use pci_dev during BAR restore

2013-07-23 Thread Gavin Shan
those information to EEH device in advance. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |8 +++- arch/powerpc/kernel/eeh_pe.c | 25 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 11 + arch/powerpc

[PATCH 07/11] powerpc/pci: Partial hotplug support

2013-07-23 Thread Gavin Shan
based on device-tree or real hardware. It's notable that pci_of_scan.c has been changed for a bit in order to support the partial hotplug based on dev-tree. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-common.c |1 + arch/powerpc/kernel/pci-hotplug.c |6

[PATCH 08/11] powerpc/eeh: Support partial hotplug

2013-07-23 Thread Gavin Shan
from its PE, but with special flag. After the reset is done, those EEH devices with the special flag will be scanned one by one. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |6 ++- arch/powerpc/kernel/eeh.c| 30

[PATCH 11/11] powerpc/eeh: Introdce flag to protect sysfs

2013-07-23 Thread Gavin Shan
The patch introduces flag EEH_DEV_SYSFS to trace that the sysfs for the corresponding EEH device (then PCI device) has been added or removed, in order to avoid race condition. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |2 ++ arch

[PATCH v3 0/11] EEH Followup Fixes (II)

2013-07-23 Thread Gavin Shan
The series of patches bases on linux-poerpc-next initially and intends to resolve the following problems: - On pSeries platform, the EEH doesn't work after PHB hotplug with drmgr. The root cause is that the EEH resources ( EEH devices, EEH caches) aren't released

[PATCH 10/11] powerpc/eeh: Fix unbalanced enable for IRQ

2013-07-23 Thread Gavin Shan
] .ret_from_kernel_thread+0x5c/0x80 Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh_driver.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 9fda75d..36bed5a 100644

[PATCH v4 0/11] EEH Followup Fixes (II)

2013-07-23 Thread Gavin Shan
The series of patches bases on linux-poerpc-next initially and intends to resolve the following problems: - On pSeries platform, the EEH doesn't work after PHB hotplug with drmgr. The root cause is that the EEH resources ( EEH devices, EEH caches) aren't released

[PATCH 04/11] PCI/hotplug: Needn't remove EEH cache again

2013-07-23 Thread Gavin Shan
Since pcibios_release_device() called by pci_stop_and_remove_bus_device() has removed the EEH cache, we needn't do that again. Cc: Bjorn Helgaas bhelg...@google.com Acked-by: Bjorn Helgaas bhelg...@google.com Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- drivers/pci/hotplug

[PATCH 05/11] powerpc/eeh: Keep PE during hotplug

2013-07-23 Thread Gavin Shan
and introduce new flag EEH_PE_KEEP to save the PE while doing hotplug during EEH error recovery. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h| 11 +-- arch/powerpc/include/asm/pci-bridge.h |1 - arch/powerpc/kernel/eeh.c | 28

[PATCH 02/11] powerpc/eeh: Export functions for hotplug

2013-07-23 Thread Gavin Shan
Make some functions public in order to support hotplug on either specific PCI bus or PCI device in future. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |9 + arch/powerpc/kernel/eeh.c |6 +++--- 2 files changed, 12 insertions(+), 3

[PATCH 01/11] powerpc/eeh: Remove reference to PCI device

2013-07-23 Thread Gavin Shan
the reference to the PCI device in EEH core. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c |4 arch/powerpc/kernel/eeh_cache.c | 18 +- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc

[PATCH 07/11] powerpc/pci: Partial hotplug support

2013-07-23 Thread Gavin Shan
based on device-tree or real hardware. It's notable that pci_of_scan.c has been changed for a bit in order to support the partial hotplug based on dev-tree. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-common.c |2 + arch/powerpc/kernel/pci-hotplug.c | 14

[PATCH 06/11] powerpc/eeh: Tranverse EEH devices with safe mode

2013-07-23 Thread Gavin Shan
Currently, we're transversing EEH devices by list_for_each_entry(). That's not safe enough because the EEH devices might be removed from its parent PE while doing iteration. The patch replaces that with list_for_each_entry_safe(). Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch

[PATCH 09/11] powerpc/eeh: Don't use pci_dev during BAR restore

2013-07-23 Thread Gavin Shan
those information to EEH device in advance. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |8 +++- arch/powerpc/kernel/eeh_pe.c | 25 +- arch/powerpc/platforms/powernv/eeh-powernv.c | 11 + arch/powerpc

[PATCH 10/11] powerpc/eeh: Fix unbalanced enable for IRQ

2013-07-23 Thread Gavin Shan
] .ret_from_kernel_thread+0x5c/0x80 Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh_driver.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 9fda75d..36bed5a 100644

[PATCH 03/11] powerpc/pci: Override pcibios_release_device()

2013-07-23 Thread Gavin Shan
The patch overrides pcibios_release_device() to release EEH resources (EEH cache, unbinding EEH device) for the indicated PCI device. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-hotplug.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions

[PATCH 08/11] powerpc/eeh: Support partial hotplug

2013-07-23 Thread Gavin Shan
from its PE, but with special flag. After the reset is done, those EEH devices with the special flag will be scanned one by one. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |6 ++- arch/powerpc/kernel/eeh.c| 30

[PATCH 11/11] powerpc/eeh: Introdce flag to protect sysfs

2013-07-23 Thread Gavin Shan
The patch introduces flag EEH_DEV_SYSFS to trace that the sysfs for the corresponding EEH device (then PCI device) has been added or removed, in order to avoid race condition. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/eeh.h |2 ++ arch

[PATCH] powerpc/pci: Remove duplicate check in pcibios_fixup_bus()

2013-07-31 Thread Gavin Shan
pci_read_bridge_bases() already checks if the PCI bus is root bus or not, so we needn't do same check in pcibios_fixup_bus() and just remove it. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-common.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions

[PATCH 5/5] powerpc/powernv: Needn't IO segment map for PHB3

2013-07-31 Thread Gavin Shan
PHB3 doesn't support IO ports and we needn't IO segment map for that. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c

[PATCH 3/5] powerpc/powernv: Check primary PHB through ID

2013-07-31 Thread Gavin Shan
The index of one specific PCI controller (struct pci_controller:: global_number) can tell that it's primary one or not. So we needn't additional variable for that and just remove it. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c |4 +--- 1

[PATCH 2/5] powerpc/powernv: Fetch PHB bus range from dev-tree

2013-07-31 Thread Gavin Shan
The patch enables fetching bus range from device-tree for the specific PHB. If we can't get that from device-tree, the default range [0 255] will be used. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c | 13 ++--- 1 files changed, 10

Re: [PATCH 4/5] powerpc/powernv: Pick up correct number of PEs

2013-07-31 Thread Gavin Shan
On Wed, Jul 31, 2013 at 07:18:46PM +1000, Benjamin Herrenschmidt wrote: On Wed, 2013-07-31 at 16:47 +0800, Gavin Shan wrote: Usually, the property ibm,opal-num-pes of PHB dev-tree node indicates the number of total PEs. If that property isn't existing or valid, we should fall back to pick

Re: [PATCH] powerpc/eeh: Fix undefined variable

2013-08-06 Thread Gavin Shan
On Tue, Aug 06, 2013 at 10:24:46PM -0400, Mike Qiu wrote: 'pe_no' hasn't been defined, it should be an typo error, it should be 'frozen_pe_no'. Also '__func__' should be added to IODA_EEH_DBG(), Signed-off-by: Mike Qiu qiud...@linux.vnet.ibm.com Acked-by: Gavin Shan sha...@linux.vnet.ibm.com

Re: [PATCH] powerpc/eeh: Add procfs entry for PowerNV

2013-08-06 Thread Gavin Shan
On Tue, Aug 06, 2013 at 10:25:14PM -0400, Mike Qiu wrote: The procfs entry for global statistics has been missed on PowerNV platform and the patch is going to add that. Signed-off-by: Mike Qiu qiud...@linux.vnet.ibm.com Acked-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel

Re: [PATCH] powerpc/eeh: Fix undefined variable

2013-08-06 Thread Gavin Shan
On Wed, Aug 07, 2013 at 03:11:24PM +1000, Michael Ellerman wrote: On Tue, Aug 06, 2013 at 10:24:46PM -0400, Mike Qiu wrote: 'pe_no' hasn't been defined, it should be an typo error, it should be 'frozen_pe_no'. Also '__func__' should be added to IODA_EEH_DBG(), Signed-off-by: Mike Qiu

Re: [PATCH 3/7] powerpc/pci: use pci_is_pcie() to simplify code

2013-09-03 Thread Gavin Shan
Use pci_is_pcie() to simplify code. Signed-off-by: Yijing Wang wangyij...@huawei.com Cc: Gavin Shan sha...@linux.vnet.ibm.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-ker...@vger.kernel.org It looks good

[PATCH 0/6] EEH Support for PHB3

2013-09-05 Thread Gavin Shan
Naturally, EEH has been supported for PHB3, but we had some mask bits to disable it because the firmware isn't ready. The series of patch instends to remove those mask bits and enable EEH for PHB3. Besides, the output messages from EEH has been reordered to reflect the correct steps during EEH

[PATCH 3/6] powerpc/eeh: Output error number

2013-09-05 Thread Gavin Shan
The patch prints the error number while failing to retrieve error log from firmware. It's helpful for debugging. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/eeh-ioda.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH 6/6] powerpc/eeh: Reorder output messages

2013-09-05 Thread Gavin Shan
We already had some output messages from EEH core. Occasionally, we can see the output messages from EEH core before the stack dump. That's not what we expected. The patch fixes that and shows the stack dump prior to output messages from EEH core. Signed-off-by: Gavin Shan sha

[PATCH 4/6] powerpc/powernv: Double size of log blob

2013-09-05 Thread Gavin Shan
Each PHB instance (struct pnv_phb) has its corresponding log blob, which is used to hold the retrieved error log from firmware. The current size of that (4096) isn't enough for PHB3 case and the patch makes that double to 8192. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc

[PATCH 2/6] powerpc/powernv: Support inbound error injection

2013-09-05 Thread Gavin Shan
For now, we only support outbound error injection. Actually, the hardware supports injecting inbound errors as well. The patch enables to inject inbound errors. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/eeh-ioda.c | 59

[PATCH 5/6] powerpc/eeh: Output PHB3 diag-data

2013-09-05 Thread Gavin Shan
The patch adds function ioda_eeh_phb3_phb_diag() to dump PHB3 PHB diag-data. That's called while detecting informative errors or frozen PE on the specific PHB. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/include/asm/opal.h | 65

Re: [PATCH 1/2] powerpc/pseries: CONFIG_PSERIES_MSI should depend on PPC_PSERIES

2013-09-26 Thread Gavin Shan
PSERIES=n. Fix it by making PSERIES_MSI depend directly on PPC_PSERIES. Signed-off-by: Michael Ellerman mich...@ellerman.id.au Reviewed-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/pseries/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc

Re: [PATCH 2/2] powerpc/powernv: Replace CONFIG_POWERNV_MSI with just CONFIG_PPC_POWERNV

2013-09-26 Thread Gavin Shan
on PPC_POWERNV. Signed-off-by: Michael Ellerman mich...@ellerman.id.au Reviewed-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/Kconfig | 5 - arch/powerpc/sysdev/Kconfig| 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/powerpc/platforms

Re: [PATCH v5 00/21] EEH reorganization

2012-04-16 Thread Gavin Shan
I just hit this on mainline from today (3.4.0-rc2-00065-gf549e08). Haven't had a chance to narrow it down yet. Thanks for the information. I'll try to reproduce the issue on Firebird-L today. By the way, it seems that mstmread is some user-level application accessing the config space while the

Re: [PATCH v5 00/21] EEH reorganization

2012-04-16 Thread Gavin Shan
Ben, thanks a lot for the backtrace to help narrowing down the root cause. Also thanks a lot for how to parse the backtrace and register staff printed by oops ;-) Finally, I successfully reproduced the issue on Firebird-L machine without loading the corresponding device driver for Emulex

[PATCH] powerpc/eeh: crash caused by null eeh_dev

2012-04-16 Thread Gavin Shan
and retrieve the eeh device from OF node instead of PCI device after the PCI device has been removed. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/pseries/eeh.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/pseries

Re: 3.4-rc3 compile failed on IBM Power6

2012-04-24 Thread Gavin Shan
Hi Nish, # gcc --version gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. platform:

[PATCH] ppc/pseries: rivet CONFIG_EEH for pSeries platform

2012-04-24 Thread Gavin Shan
suggestion, the patch make CONFIG_EEH invisible and keep it as always selected on pSeries platform. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/pseries/Kconfig |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms

Re: 3.4-rc3 compile failed on IBM Power6

2012-04-24 Thread Gavin Shan
In order to make iommu.c irrelative to CONFIG_EEH, we might figure out the PE number of the PCI device during PCI probe time. Here're some rough thoughts about the rework. - Introduce additional field int pe_num to struct dev_archdata. That would be traced like: (struct

[PATCH] powerpc/mm: dereference OF node /chosen

2012-05-30 Thread Gavin Shan
The form affinity for NUMA is set to 1 if the firmware supports OPAL. Otherwise, we have to retrieve that from OF node /chosen. For the latter case, OF node /chosen was referred without dereferencing. The patch dereference OF node /chosen if necessary. Signed-off-by: Gavin Shan sha

[PATCH] powerpc/pci: cleanup on duplicate assignment

2012-05-31 Thread Gavin Shan
While creating the PCI root bus through function pci_create_root_bus() of PCI core, it should have assigned the secondary bus number for the newly created PCI root bus. Thus we needn't do the explicit assignment for the secondary bus number again in pcibios_scan_phb(). Signed-off-by: Gavin Shan

[PATCH] powerpc/pci: save P2P bridge resource if possible

2012-06-04 Thread Gavin Shan
. The patch explicitly sets the size of P2P bridge BARs to zero in case that resource reassignment is expected with PCI probe flag PCI_REASSIGN_ALL_RSRC. In the result, it will save overall resource required by the system without waste. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch

Re: [PATCH] powerpc/pci: save P2P bridge resource if possible

2012-06-04 Thread Gavin Shan
. Thanks, Gavin Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/kernel/pci-common.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 8e78e93..0fe214d

[PATCH V3 2/2] PCI: minimal alignment for bars of P2P bridges

2012-06-24 Thread Gavin Shan
sets of segments and there will be no overlap. This patch provides a way for the host bridge to override the default alignment values used by the resource allocation code for that purpose. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux...@us.ibm.com Reviewed

[PATCH V3 1/2] PCI: retrieve host bridge by PCI bus

2012-06-24 Thread Gavin Shan
to the specified PCI bus, then accessing the information regarding the minimal resource alignment for I/O and MMIO bars of p2p bridges. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux...@us.ibm.com Reviewed-by: Richard Yang weiy...@linux.vnet.ibm.com Acked-by: Benjamin

[PATCH 4/8] ppc/pnv: initialize DMA for PEs

2012-06-25 Thread Gavin Shan
The patch introduces additional wrapper function to call the original implementation so that the DMA can be configured for all existing PEs. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux...@us.ibm.com Reviewed-by: Richard Yang weiy...@linux.vnet.ibm.com --- arch

[PATCH 8/8] ppc/pnv: remove unused functions

2012-06-25 Thread Gavin Shan
We don't need them anymore. The patch removes those functions. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux...@us.ibm.com Reviewed-by: Richard Yang weiy...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c | 441 - 1

[PATCH 6/8] ppc/pnv: fix overrunning segment tracing array

2012-06-25 Thread Gavin Shan
-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c index 052a50f..ed8cf09 100644 --- a/arch/powerpc

[PATCH 2/8] ppc/pnv: PE list based on creation order

2012-06-25 Thread Gavin Shan
our requirment: tracing PE based on their cration time from top to bottom. So the patch does rename for the DMA based PE list and introduces the list to trace the PEs sequentially based on their creation time. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv

[PATCH 3/8] ppc/pnv: I/O and MMIO resource assignment for PEs

2012-06-25 Thread Gavin Shan
by children PEs. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux...@us.ibm.com Reviewed-by: Richard Yang weiy...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c | 89 + 1 file changed, 89 insertions(+) diff --git

[PATCH V3 0/8] ppc/pnv: Rework on pnv P7IOC initialization

2012-06-25 Thread Gavin Shan
The rework is done based on Ben's initial ideas on how PE and resource assignment is done on top of PCI core instead of doing resource assignment by powernv platform. With the series of patches, the following aspects will be covered: - Only create PE based on PCI bus. Basically, there

[PATCH 7/8] ppc/pnv: using PCI core to do resource assignment

2012-06-25 Thread Gavin Shan
/O and MMIO minimal alignment for P2P bridges have been configured while doing fixup for the PHBs. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux...@us.ibm.com Reviewed-by: Richard Yang weiy...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c | 46

[PATCH 1/8] ppc/pnv: create bus sensitive PEs

2012-06-25 Thread Gavin Shan
sensitive PEs described as above. Also, the function used to retrieve the corresponding PE according to the given PCI device has been changed based on that because each PCI device should trace the directly associated PE. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux

[PATCH 5/8] ppc/pnv: skip check on PE if necessary

2012-06-25 Thread Gavin Shan
the PEs are not available, we won't check the associated PE for the PCI device to be enabled. Signed-off-by: Gavin Shan sha...@linux.vnet.ibm.com Reviewed-by: Ram Pai linux...@us.ibm.com Reviewed-by: Richard Yang weiy...@linux.vnet.ibm.com --- arch/powerpc/platforms/powernv/pci-ioda.c | 19

  1   2   3   4   5   6   7   8   9   10   >