From a1fcbaac29d785875eaea09bd70e9a287580a452 Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Thu, 5 Oct 2017 16:39:26 +0530 Subject: xscom: Do not print error message for 'chiplet offline' return values xscom_read/write operations returns CHIPLET_OFFLINE when chiplet is offline. Some multicast xscom_read/write requests from HBRT results in xscom operation on offline chiplet(s) and printing below warnings in OPAL console. [ 135.036327572,3] XSCOM: Read failed, ret = -14 [ 135.092689829,3] XSCOM: Read failed, ret = -14 This results in unnecessary bugs. Hence remove error message for multicast SCOM operations. Suggested-by: Daniel M Crowell Tested-by: Pridhiviraj Paidipeddi Signed-off-by: Vasant Hegde Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Stewart Smith --- hw/xscom.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'hw/xscom.c') diff --git a/hw/xscom.c b/hw/xscom.c index 7bd78bf..716cb73 100644 --- a/hw/xscom.c +++ b/hw/xscom.c @@ -238,6 +238,12 @@ static bool xscom_gcid_ok(uint32_t gcid) return get_chip(gcid) != NULL; } +/* Determine if SCOM address is multicast */ +static inline bool xscom_is_multicast_addr(uint32_t addr) +{ + return (((addr >> 30) & 0x1) == 0x1); +} + /* * Low level XSCOM access functions, perform a single direct xscom * access via MMIO @@ -274,6 +280,10 @@ static int __xscom_read(uint32_t gcid, uint32_t pcb_addr, uint64_t *val) break; } + /* Do not print error message for multicast SCOMS */ + if (xscom_is_multicast_addr(pcb_addr) && ret == OPAL_XSCOM_CHIPLET_OFF) + return ret; + prerror("XSCOM: Read failed, ret = %lld\n", ret); return ret; } @@ -310,6 +320,10 @@ static int __xscom_write(uint32_t gcid, uint32_t pcb_addr, uint64_t val) break; } + /* Do not print error message for multicast SCOMS */ + if (xscom_is_multicast_addr(pcb_addr) && ret == OPAL_XSCOM_CHIPLET_OFF) + return ret; + prerror("XSCOM: Write failed, ret = %lld\n", ret); return ret; } -- cgit v1.1