aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2017-08-03 16:45:45 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-08-15 16:37:14 +1000
commit80ec3381e96629522793a0056f1a3e36d35d9315 (patch)
treebb15f904ec4ea2eede4c64a46116c787e212fb76 /core
parentb24ad955af7512b3f771640d313125b61af602aa (diff)
downloadskiboot-80ec3381e96629522793a0056f1a3e36d35d9315.zip
skiboot-80ec3381e96629522793a0056f1a3e36d35d9315.tar.gz
skiboot-80ec3381e96629522793a0056f1a3e36d35d9315.tar.bz2
core/hmi: Fix use of uninitialised value (CID 147808)
A rework of where some of the xscom regs are for POWER9 has resulted in a scope issue where the same line attempts to simultaneously reference a variable by the same name in global and function scope. Change the value read by xscom_read to *_val Fixes: CID 147808 Fixes: bda5e0ea Fix scom addresses for power9 nx checkstop hmi handling. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/hmi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/hmi.c b/core/hmi.c
index 8b229eb..c1769e3 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -450,7 +450,7 @@ static void find_nx_checkstop_reason(int flat_chip_id,
{
uint64_t nx_status;
uint64_t nx_dma_fir;
- uint64_t nx_pbi_fir;
+ uint64_t nx_pbi_fir_val;
int i;
/* Get NX status register value. */
@@ -476,7 +476,7 @@ static void find_nx_checkstop_reason(int flat_chip_id,
}
/* Get PowerBus Interface FIR data register value. */
- if (xscom_read(flat_chip_id, nx_pbi_fir, &nx_pbi_fir) != 0) {
+ if (xscom_read(flat_chip_id, nx_pbi_fir, &nx_pbi_fir_val) != 0) {
prerror("HMI: XSCOM error reading NX_PBI_FIR\n");
return;
}
@@ -488,7 +488,7 @@ static void find_nx_checkstop_reason(int flat_chip_id,
|= nx_dma_xstop_bits[i].reason;
for (i = 0; i < ARRAY_SIZE(nx_pbi_xstop_bits); i++)
- if (nx_pbi_fir & PPC_BIT(nx_pbi_xstop_bits[i].bit))
+ if (nx_pbi_fir_val & PPC_BIT(nx_pbi_xstop_bits[i].bit))
hmi_evt->u.xstop_error.xstop_reason
|= nx_pbi_xstop_bits[i].reason;