[Skiboot] [PATCH] hmi: Identify the phb upon CAPI malfunction alert

Philippe Bergheaud felix at linux.vnet.ibm.com
Tue Jan 12 20:29:25 AEDT 2016


Find the phb index with capp_phb3_attached_mask.

Signed-off-by: Philippe Bergheaud <felix at linux.vnet.ibm.com>
---
This fixes bz131314, SW324468

 core/hmi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/hmi.c b/core/hmi.c
index 71a6c7e..d2cca90 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -256,13 +256,15 @@ static int handle_capp_recoverable(int chip_id)
 	u32 dt_chip_id;
 	struct phb *phb;
 	u32 phb_index;
+	struct proc_chip *chip = get_chip(chip_id);
+	u8 mask = chip->capp_phb3_attached_mask;
 
 	dt_for_each_compatible(dt_root, np, "ibm,power8-pciex") {
 		dt_chip_id = dt_prop_get_u32(np, "ibm,chip-id");
 		phb_index = dt_prop_get_u32(np, "ibm,phb-index");
 		phb_id = dt_prop_get_u64(np, "ibm,opal-phbid");
 
-		if ((phb_index == 0) && (chip_id == dt_chip_id)) {
+		if ((mask & (1 << phb_index)) && (chip_id == dt_chip_id)) {
 			phb = pci_get_phb(phb_id);
 			phb->ops->lock(phb);
 			phb->ops->set_capp_recovery(phb);
-- 
2.1.0



More information about the Skiboot mailing list