diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-11-16 11:36:05 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-11-15 21:11:15 -0600 |
commit | 31f90050849283261e300619e63f9bb0deb5862d (patch) | |
tree | 10749ad504e86981c85f66648a2004b0dccd849b | |
parent | 9b068ad820a870c203571548c9025455f0f3e8b8 (diff) | |
download | skiboot-31f90050849283261e300619e63f9bb0deb5862d.zip skiboot-31f90050849283261e300619e63f9bb0deb5862d.tar.gz skiboot-31f90050849283261e300619e63f9bb0deb5862d.tar.bz2 |
phb4: Fix lost bit in PE number on config accesses
A PE number can be up to 9 bits, using a uint8_t won't fly..
That was causing error on config accesses to freeze the
wrong PE.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
(cherry picked from commit a1cd5529a84ccf3c88e12a864705e4de93908d8e)
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/phb4.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -257,7 +257,7 @@ static inline void phb4_ioda_sel(struct phb4 *p, uint32_t table, */ static int64_t phb4_pcicfg_check(struct phb4 *p, uint32_t bdfn, uint32_t offset, uint32_t size, - uint8_t *pe) + uint16_t *pe) { uint32_t sm = size - 1; @@ -437,7 +437,7 @@ static int64_t phb4_pcicfg_read(struct phb4 *p, uint32_t bdfn, { uint64_t addr, val64; int64_t rc; - uint8_t pe; + uint16_t pe; bool use_asb = false; rc = phb4_pcicfg_check(p, bdfn, offset, size, &pe); @@ -530,7 +530,7 @@ static int64_t phb4_pcicfg_write(struct phb4 *p, uint32_t bdfn, { uint64_t addr; int64_t rc; - uint8_t pe; + uint16_t pe; bool use_asb = false; rc = phb4_pcicfg_check(p, bdfn, offset, size, &pe); |