Message ID | 20171116003606.25488-1-benh@kernel.crashing.org |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] phb4: Fix lost bit in PE number on config accesses | expand |
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes: > 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> > --- > hw/phb4.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Thanks, series merged to master as of 4002ea166fde4b4e44f6571027c60c6b75df5c33 and to 5.9.x as of bb58eed0de1f310830361b0b54be1df125e66b8d
diff --git a/hw/phb4.c b/hw/phb4.c index 4f10db32..96a6e0de 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -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);
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> --- hw/phb4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)