[PATCH v2 0/6] powerpc/powernv: Support M64 window

2014-07-16 Thread Guo Chao
for EEH powerpc/powernv: Handle compound PE in config accessors Guo Chao (1): powerpc/powernv: Enable M64 aperatus for PHB3 arch/powerpc/include/asm/opal.h| 17 +- arch/powerpc/platforms/powernv/eeh-ioda.c | 293 +--- arch/powerpc/platforms/powernv/opal-wrappers.S

[PATCH v2 1/6] powerpc/powernv: Enable M64 aperatus for PHB3

2014-07-16 Thread Guo Chao
BAR device attached, might span multiple M64 segments. We introduce compound PE to cover the case. The compound PE is a list of PEs and the master PE is used as before. The slave PEs are just for MMIO isolation. Signed-off-by: Guo Chao y...@linux.vnet.ibm.com --- arch/powerpc/include

[PATCH v2 2/6] powerpc/powernv: Allow to freeze PE

2014-07-16 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com For compound PE, all PEs should be frozen if any one in the group becomes frozen. Unfortunately, hardware doesn't always do that automatically with help of PELTV. So we have to flirt with PESTA/B a bit to freeze all PEs for the case. The patch

[PATCH v2 3/6] powerpc/powernv: Split ioda_eeh_get_state()

2014-07-16 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com Function ioda_eeh_get_state() is used to fetch EEH state for PHB or PE. We're going to support compound PE and the function becomes more complicated with that. The patch splits the function into two functions for PHB and PE cases separately to improve

[PATCH v2 4/6] powerpc/powernv: Handle compound PE

2014-07-16 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The patch introduces 3 PHB callbacks: compound PE state retrieval, force freezing and unfreezing compound PE. The PCI config accessors and PowerNV EEH backend can use them in subsequent patches. We don't export the capability of compound PE to EEH core,

[PATCH v2 6/6] powerpc/powernv: Handle compound PE in config accessors

2014-07-16 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The PCI config accessors check for PE frozen state and clear it if EEH isn't functional. The patch handles compound PE in config accessors if PHB supports it. For consistency, all PEs will be put into frozen state if any one in compound group gets frozen

[PATCH v2 5/6] powerpc/powernv: Handle compound PE for EEH

2014-07-16 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The patch handles compound PE for EEH backend. If one specific PE in compound group has been frozen, we enforces to freeze all PEs in the group. If we're enable DMA or MMIO for one PE in compound group, DMA or MMIO of all PEs in the group will be

[PATCH 0/6] powerpc/powernv: Support M64 window

2014-07-10 Thread Guo Chao
: Split ioda_eeh_get_state() powerpc/powernv: handle compound PE powerpc/powernv: Handle compound PE for EEH powerpc/powernv: Handle compound PE in config accessors Guo Chao (1): powerpc/powernv: Enable M64 aperatus for PHB3 arch/powerpc/include/asm/opal.h| 17 +- arch/powerpc

[PATCH 1/6] powerpc/powernv: Enable M64 aperatus for PHB3

2014-07-10 Thread Guo Chao
device attached, might span multiple M64 segments. We introduce compound PE to cover the case. The compound PE is a list of PEs and the master PE is used as before. The slave PEs are just for MMIO isolation. Signed-off-by: Guo Chao y...@linux.vnet.ibm.com --- arch/powerpc/include

[PATCH 6/6] powerpc/powernv: Handle compound PE in config accessors

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The PCI config accessors check for PE frozen state and clear it if EEH is disabled. The patch handles compound PE in config accessors if PHB supports it. For consistency, all PEs will be put into frozen state if any one in compound group gets frozen by

[PATCH 3/6] powerpc/powernv: Split ioda_eeh_get_state()

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com Function ioda_eeh_get_state() is used to fetch EEH state for PHB or PE. We're going to support compound PE and the function becomes more complicated with that. The patch splits the function into two for PHB and PE cases separately. Besides, I also clean

[PATCH 5/6] powerpc/powernv: Handle compound PE for EEH

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The patch handles compound PE for EEH backend. If one specific PE in compound group has been frozen, we enforces to freeze all PEs in the group. If we're enable DMA or MMIO for one PE in compound group, DMA or MMIO of all PEs in the group will be

[PATCH 4/6] powerpc/powernv: handle compound PE

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com The patch introduces 3 PHB callbacks: compound PE retrieval, force freezing and unfreezing compound PE. The PCI config accessors and EEH backend can use them in subsequent patches. Signed-off-by: Gavin Shan gws...@linux.vnet.ibm.com ---

[PATCH 2/6] powerpc/powernv: Allows to freeze PE

2014-07-10 Thread Guo Chao
From: Gavin Shan gws...@linux.vnet.ibm.com For compound PE, all PEs should be frozen if any one in the group becomes frozen. Unfortunately, hardware doesn't always do that automatically with help of PELTV. So we have to flirt with PESTA/B a bit to freeze all PEs for the case. The patch

[PATCH] powerpc/powernv: fix endianness problems in EEH

2014-06-09 Thread Guo Chao
EEH information fetched from OPAL need fix before using in LE environment. To be included in sparse's endian check, declare them as __beXX and access them by accessors. Cc: Gavin Shan gws...@linux.vnet.ibm.com Signed-off-by: Guo Chao y...@linux.vnet.ibm.com --- arch/powerpc/include/asm/opal.h