diff options
author | Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> | 2014-10-14 21:41:16 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-12-02 14:18:49 +1100 |
commit | 44e90c933487370052a7ead8e54dc763ccb479b6 (patch) | |
tree | 19ba896219fa4c441364f00cd46e1b5b48c36d55 /hw/chiptod.c | |
parent | 699c433a8c736f44b13b7ba28cc0f9e0ac55840c (diff) | |
download | skiboot-44e90c933487370052a7ead8e54dc763ccb479b6.zip skiboot-44e90c933487370052a7ead8e54dc763ccb479b6.tar.gz skiboot-44e90c933487370052a7ead8e54dc763ccb479b6.tar.bz2 |
opal: Report only one HMI event per core for recovered TFAC errors.
HMER is per thread and each thread needs to reset the relavant error bit.
But Timebase register is per core and first thread that gets an interrupt
would fix the actual TFAC errors where as others just resets the respective
HMER error bit. This patch limits the reporting of HMI event one per
core for TFAC errors.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/chiptod.c')
-rw-r--r-- | hw/chiptod.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/hw/chiptod.c b/hw/chiptod.c index 295c745..22dfaec 100644 --- a/hw/chiptod.c +++ b/hw/chiptod.c @@ -635,10 +635,23 @@ static int chiptod_start_tod(void) return 1; } +/* + * Recover from TB and TOD errors. + * Timebase register is per core and first thread that gets chance to + * handle interrupt would fix actual TFAC errors and rest of the threads + * from same core would see no errors. Return -1 if no errors have been + * found. The caller (handle_hmi_exception) of this function would not + * send an HMI event to host if return value is -1. + * + * Return values: + * 0 <= Failed to recover from errors + * 1 <= Successfully recovered from errors + * -1 <= No errors found. Errors are already been fixed. + */ int chiptod_recover_tb_errors(void) { uint64_t tfmr; - int rc = 1; + int rc = -1; if (chiptod_primary < 0) return 0; |