aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xen-pciback/conf_space_header.c
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2016-07-06 00:58:19 -0600
committerDavid Vrabel <david.vrabel@citrix.com>2016-07-06 10:35:37 +0100
commitc8670c22e04e4e42e752cc5b53922106b3eedbda (patch)
tree2ad9c185fde712605a7abc13ead9c77c80e1c972 /drivers/xen/xen-pciback/conf_space_header.c
parentxen-pciback: fold read_dev_bar() into its now single caller (diff)
downloadlinux-dev-c8670c22e04e4e42e752cc5b53922106b3eedbda.tar.xz
linux-dev-c8670c22e04e4e42e752cc5b53922106b3eedbda.zip
xen-pciback: simplify determination of 64-bit memory resource
Other than for raw BAR values, flags are properly separated in the internal representation. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to '')
-rw-r--r--drivers/xen/xen-pciback/conf_space_header.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c
index 56647b873697..bfa610d02443 100644
--- a/drivers/xen/xen-pciback/conf_space_header.c
+++ b/drivers/xen/xen-pciback/conf_space_header.c
@@ -222,10 +222,7 @@ static void *bar_init(struct pci_dev *dev, int offset)
pos = PCI_ROM_RESOURCE;
else {
pos = (offset - PCI_BASE_ADDRESS_0) / 4;
- if (pos && ((res[pos - 1].flags & (PCI_BASE_ADDRESS_SPACE |
- PCI_BASE_ADDRESS_MEM_TYPE_MASK)) ==
- (PCI_BASE_ADDRESS_SPACE_MEMORY |
- PCI_BASE_ADDRESS_MEM_TYPE_64))) {
+ if (pos && (res[pos - 1].flags & IORESOURCE_MEM_64)) {
bar->val = res[pos - 1].start >> 32;
bar->len_val = -resource_size(&res[pos - 1]) >> 32;
return bar;