Merge branch 'pci/resource'
authorBjorn Helgaas <bhelgaas@google.com>
Mon, 23 Sep 2019 21:10:15 +0000 (16:10 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 23 Sep 2019 21:10:15 +0000 (16:10 -0500)
  - Convert pci_resource_to_user() to a weak function to remove
    HAVE_ARCH_PCI_RESOURCE_TO_USER #defines (Denis Efremov)

  - Use PCI_SRIOV_NUM_BARS for idiomatic loop structure (Denis Efremov)

  - Fix Resizable BAR size suspend/restore for 1MB BARs (Sumit Saxena)

  - Correct "pci=resource_alignment" example in documentation (Alexey
    Kardashevskiy)

* pci/resource:
  PCI: Correct pci=resource_alignment parameter example
  PCI: Restore Resizable BAR size bits correctly for 1MB BARs
  PCI: Use PCI_SRIOV_NUM_BARS in loops instead of PCI_IOV_RESOURCE_END
  PCI: Convert pci_resource_to_user() to a weak function

# Conflicts:
# drivers/pci/pci.c

1  2 
drivers/pci/iov.c
drivers/pci/pci.c
include/linux/pci.h

Simple merge
index 63a87d1065d8b2530e15fe077f4405d0c5d54f14,5836eb576d961e38ae342430ac03bfafbe564efe..80fe2d24fa37afaccc1dc7ea2309e92f8940d660
@@@ -5932,7 -5932,20 +5932,19 @@@ resource_size_t __weak pcibios_default_
        return 0;
  }
  
 -#define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE
 -static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0};
+ /*
+  * Arches that don't want to expose struct resource to userland as-is in
+  * sysfs and /proc can implement their own pci_resource_to_user().
+  */
+ void __weak pci_resource_to_user(const struct pci_dev *dev, int bar,
+                                const struct resource *rsrc,
+                                resource_size_t *start, resource_size_t *end)
+ {
+       *start = rsrc->start;
+       *end = rsrc->end;
+ }
 +static char *resource_alignment_param;
  static DEFINE_SPINLOCK(resource_alignment_lock);
  
  /**
Simple merge