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

2014-07-16 Thread Guo Chao
From: Gavin Shan 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 enabled. Signed-off-by: Gavin Sh

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

2014-07-16 Thread Guo Chao
From: Gavin Shan 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 by hardware. Signed-off-

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

2014-07-16 Thread Guo Chao
From: Gavin Shan 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, which helps avoiding more

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

2014-07-16 Thread Guo Chao
From: Gavin Shan 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 readability. Signed-off-by:

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

2014-07-16 Thread Guo Chao
From: Gavin Shan 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 sychronizes with firmware hearder a

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

2014-07-16 Thread Guo Chao
to PCI bus with large M64 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 -

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

2014-07-16 Thread Guo Chao
rpc/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/platforms/powernv/eeh-ioda.c | 293 +--- arch/powerp

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

2014-07-10 Thread Guo Chao
From: Gavin Shan 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 sychronizes with firmware hearder a

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

2014-07-10 Thread Guo Chao
From: Gavin Shan 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 enabled. Signed-off-by: Gavin Sh

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

2014-07-10 Thread Guo Chao
From: Gavin Shan 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 --- arch/powerpc/platforms/powernv/pci-ioda.c | 144 ++

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

2014-07-10 Thread Guo Chao
From: Gavin Shan 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 the code up for a bit to i

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

2014-07-10 Thread Guo Chao
From: Gavin Shan 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 hardware. Signed-off-by: G

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

2014-07-10 Thread Guo Chao
CI bus with large M64 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 -

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

2014-07-10 Thread Guo Chao
to freeze PE powerpc/powernv: 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

[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 Signed-off-by: Guo Chao --- arch/powerpc/include/asm/opal.h