From 69e027ef2bd5f3ad7bfd7b067d3a0cbbe6cca298 Mon Sep 17 00:00:00 2001 From: Philippe Bergheaud Date: Tue, 12 Jan 2016 10:29:25 +0100 Subject: hmi: Identify the phb upon CAPI malfunction alert commit 2e4cc4dca8c0d31138adc52076b38d80c5a6bef0 upstream Find the phb index with capp_phb3_attached_mask. Signed-off-by: Philippe Bergheaud Reviewed-by: Andrew Donnellan Signed-off-by: Stewart Smith --- 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); -- cgit v1.1