summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2018-04-16 23:04:02 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-04-17 03:52:10 -0500
commit2fd92666b665af4e08e47a1de8e95e0c371299de (patch)
tree6ac7750399e0e6302f1f73a5975ee212182ca2fa
parent8ff9be76345a5e46bdf18853dab13f6becb95580 (diff)
downloadtalos-skiboot-2fd92666b665af4e08e47a1de8e95e0c371299de.tar.gz
talos-skiboot-2fd92666b665af4e08e47a1de8e95e0c371299de.zip
opal/hmi: Stop flooding HMI event for TOD errors.
Fix the issue where every thread on the chip sends HMI event to host for TOD errors. TOD errors are reported to all the core/threads on the chip. Any one thread can fix the error and send event. Rest of the threads don't need to send HMI event unnecessarily. This patch fixes this by modifying __chiptod_recover_tod_errors() function to return -1 if no errors found. Without this change every thread that see TFMR[51]=1 sends HMI event to the host kernel. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--hw/chiptod.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/chiptod.c b/hw/chiptod.c
index 33d55395..28ed8973 100644
--- a/hw/chiptod.c
+++ b/hw/chiptod.c
@@ -974,7 +974,7 @@ static int __chiptod_recover_tod_errors(void)
{
uint64_t terr;
uint64_t treset = 0;
- int i;
+ int i, rc = -1;
int32_t chip_id = this_cpu()->chip_id;
/* Read TOD error register */
@@ -990,6 +990,7 @@ static int __chiptod_recover_tod_errors(void)
(terr & TOD_ERR_DELAY_COMPL_PARITY) ||
(terr & TOD_ERR_TOD_REGISTER_PARITY)) {
chiptod_reset_tod_errors();
+ rc = 1;
}
/*
@@ -1023,7 +1024,9 @@ static int __chiptod_recover_tod_errors(void)
return 0;
}
/* We have handled all the TOD errors routed to hypervisor */
- return 1;
+ if (treset)
+ rc = 1;
+ return rc;
}
int chiptod_recover_tod_errors(void)
OpenPOWER on IntegriCloud