From: Bjorn Helgaas Date: Mon, 23 Sep 2019 21:10:15 +0000 (-0500) Subject: Merge branch 'pci/resource' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0ca0ef1042f49c4b457ca6cb48ebb5d1c0bcf003;p=linux.git Merge branch 'pci/resource' - 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 --- 0ca0ef1042f49c4b457ca6cb48ebb5d1c0bcf003 diff --cc drivers/pci/pci.c index 63a87d1065d8b,5836eb576d961..80fe2d24fa37a --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@@ -5932,7 -5932,20 +5932,19 @@@ resource_size_t __weak pcibios_default_ return 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; + } + -#define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE -static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0}; +static char *resource_alignment_param; static DEFINE_SPINLOCK(resource_alignment_lock); /**