Skip to content

Commit

Permalink
hw/phb3: Apply config register filter after HW change
Browse files Browse the repository at this point in the history
The PCI config register is applied before the HW register is changed.
It won't work when this mechanism is used to capture the change to
SRIOV capability in subsequent patch.

This moves the logic around so that the filter is applied after HW
register is changed. Currently, it's used to cache bridge's pref
window base/length. The code change shouldn't affect that. So no
functional changes introduced by this.

Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Reviewed-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
Gavin Shan authored and stewartsmith committed Feb 16, 2017
1 parent b200ee0 commit 0247540
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/phb3.c
Expand Up @@ -318,9 +318,6 @@ static int64_t phb3_pcicfg_write##size(struct phb *phb, uint32_t bdfn, \
return OPAL_HARDWARE; \
} \
\
phb3_pcicfg_filter(phb, bdfn, offset, sizeof(type), \
(uint32_t *)&data, true); \
\
addr = PHB_CA_ENABLE; \
addr = SETFIELD(PHB_CA_BDFN, addr, bdfn); \
addr = SETFIELD(PHB_CA_REG, addr, offset); \
Expand All @@ -337,6 +334,9 @@ static int64_t phb3_pcicfg_write##size(struct phb *phb, uint32_t bdfn, \
(offset & (4 - sizeof(type))), data); \
} \
\
phb3_pcicfg_filter(phb, bdfn, offset, sizeof(type), \
(uint32_t *)&data, true); \
\
return OPAL_SUCCESS; \
}

Expand Down

0 comments on commit 0247540

Please sign in to comment.