diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2015-09-23 16:44:14 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-09-30 14:16:12 +1000 |
commit | c7192a449880617800fdc0b71419fd628eb89388 (patch) | |
tree | 6cd275c4ded81768dee5485b27bcf22b6a588dc4 | |
parent | 211d899d32912f3c25020899ba18d101abf6808d (diff) | |
download | skiboot-c7192a449880617800fdc0b71419fd628eb89388.zip skiboot-c7192a449880617800fdc0b71419fd628eb89388.tar.gz skiboot-c7192a449880617800fdc0b71419fd628eb89388.tar.bz2 |
PHB3: Fix wrong PE number in error injection
We disallow to inject error to reserved PE#, which is 255 instead
of 0 on PHB3. Otherwise, error OPAL_PARAM is returned when injecting
error to PE#0.
This fixes above issue by checking against the correct PE number 255.
Reported-by: Pradeep Ramanna <pramann2@in.ibm.com>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/phb3.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3057,8 +3057,8 @@ static int64_t phb3_err_inject(struct phb *phb, uint32_t pe_no, if (!p->tbl_rtt) return OPAL_HARDWARE; - /* We can't inject error to the reserved PE#0 */ - if (pe_no == 0x0 || pe_no >= PHB3_MAX_PE_NUM) + /* We can't inject error to the reserved PE */ + if (pe_no == PHB3_RESERVED_PE_NUM || pe_no >= PHB3_MAX_PE_NUM) return OPAL_PARAMETER; /* Clear leftover from last time */ |