aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 18:14:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-01 18:14:04 -0400
commit4b1779c2cf030c68aefe939d946475e4136c1895 (patch)
tree27e4bda2f6c8d269d02dec52a62dd1443880c6dc /include/linux
parent62ff577fa2fec87edbf26f53e87210ba726d4d44 (diff)
parent30723cbf6f7aec2ab4810bdc4bf12c5749a09e33 (diff)
Merge tag 'pci-v3.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI changes from Bjorn Helgaas: "Enumeration - Increment max correctly in pci_scan_bridge() (Andreas Noever) - Clarify the "scan anyway" comment in pci_scan_bridge() (Andreas Noever) - Assign CardBus bus number only during the second pass (Andreas Noever) - Use request_resource_conflict() instead of insert_ for bus numbers (Andreas Noever) - Make sure bus number resources stay within their parents bounds (Andreas Noever) - Remove pci_fixup_parent_subordinate_busnr() (Andreas Noever) - Check for child busses which use more bus numbers than allocated (Andreas Noever) - Don't scan random busses in pci_scan_bridge() (Andreas Noever) - x86: Drop pcibios_scan_root() check for bus already scanned (Bjorn Helgaas) - x86: Use pcibios_scan_root() instead of pci_scan_bus_with_sysdata() (Bjorn Helgaas) - x86: Use pcibios_scan_root() instead of pci_scan_bus_on_node() (Bjorn Helgaas) - x86: Merge pci_scan_bus_on_node() into pcibios_scan_root() (Bjorn Helgaas) - x86: Drop return value of pcibios_scan_root() (Bjorn Helgaas) NUMA - x86: Add x86_pci_root_bus_node() to look up NUMA node from PCI bus (Bjorn Helgaas) - x86: Use x86_pci_root_bus_node() instead of get_mp_bus_to_node() (Bjorn Helgaas) - x86: Remove mp_bus_to_node[], set_mp_bus_to_node(), get_mp_bus_to_node() (Bjorn Helgaas) - x86: Use NUMA_NO_NODE, not -1, for unknown node (Bjorn Helgaas) - x86: Remove acpi_get_pxm() usage (Bjorn Helgaas) - ia64: Use NUMA_NO_NODE, not MAX_NUMNODES, for unknown node (Bjorn Helgaas) - ia64: Remove acpi_get_pxm() usage (Bjorn Helgaas) - ACPI: Fix acpi_get_node() prototype (Bjorn Helgaas) Resource management - i2o: Fix and refactor PCI space allocation (Bjorn Helgaas) - Add resource_contains() (Bjorn Helgaas) - Add %pR support for IORESOURCE_UNSET (Bjorn Helgaas) - Mark resources as IORESOURCE_UNSET if we can't assign them (Bjorn Helgaas) - Don't clear IORESOURCE_UNSET when updating BAR (Bjorn Helgaas) - Check IORESOURCE_UNSET before updating BAR (Bjorn Helgaas) - Don't try to claim IORESOURCE_UNSET resources (Bjorn Helgaas) - Mark 64-bit resource as IORESOURCE_UNSET if we only support 32-bit (Bjorn Helgaas) - Don't enable decoding if BAR hasn't been assigned an address (Bjorn Helgaas) - Add "weak" generic pcibios_enable_device() implementation (Bjorn Helgaas) - alpha, microblaze, sh, sparc, tile: Use default pcibios_enable_device() (Bjorn Helgaas) - s390: Use generic pci_enable_resources() (Bjorn Helgaas) - Don't check resource_size() in pci_bus_alloc_resource() (Bjorn Helgaas) - Set type in __request_region() (Bjorn Helgaas) - Check all IORESOURCE_TYPE_BITS in pci_bus_alloc_from_region() (Bjorn Helgaas) - Change pci_bus_alloc_resource() type_mask to unsigned long (Bjorn Helgaas) - Log IDE resource quirk in dmesg (Bjorn Helgaas) - Revert "[PATCH] Insert GART region into resource map" (Bjorn Helgaas) PCI device hotplug - Make check_link_active() non-static (Rajat Jain) - Use link change notifications for hot-plug and removal (Rajat Jain) - Enable link state change notifications (Rajat Jain) - Don't disable the link permanently during removal (Rajat Jain) - Don't check adapter or latch status while disabling (Rajat Jain) - Disable link notification across slot reset (Rajat Jain) - Ensure very fast hotplug events are also processed (Rajat Jain) - Add hotplug_lock to serialize hotplug events (Rajat Jain) - Remove a non-existent card, regardless of "surprise" capability (Rajat Jain) - Don't turn slot off when hot-added device already exists (Yijing Wang) MSI - Keep pci_enable_msi() documentation (Alexander Gordeev) - ahci: Fix broken single MSI fallback (Alexander Gordeev) - ahci, vfio: Use pci_enable_msi_range() (Alexander Gordeev) - Check kmalloc() return value, fix leak of name (Greg Kroah-Hartman) - Fix leak of msi_attrs (Greg Kroah-Hartman) - Fix pci_msix_vec_count() htmldocs failure (Masanari Iida) Virtualization - Device-specific ACS support (Alex Williamson) Freescale i.MX6 - Wait for retraining (Marek Vasut) Marvell MVEBU - Use Device ID and revision from underlying endpoint (Andrew Lunn) - Fix incorrect size for PCI aperture resources (Jason Gunthorpe) - Call request_resource() on the apertures (Jason Gunthorpe) - Fix potential issue in range parsing (Jean-Jacques Hiblot) Renesas R-Car - Check platform_get_irq() return code (Ben Dooks) - Add error interrupt handling (Ben Dooks) - Fix bridge logic configuration accesses (Ben Dooks) - Register each instance independently (Magnus Damm) - Break out window size handling (Magnus Damm) - Make the Kconfig dependencies more generic (Magnus Damm) Synopsys DesignWare - Fix RC BAR to be single 64-bit non-prefetchable memory (Mohit Kumar) Miscellaneous - Remove unused SR-IOV VF Migration support (Bjorn Helgaas) - Enable INTx if BIOS left them disabled (Bjorn Helgaas) - Fix hex vs decimal typo in cpqhpc_probe() (Dan Carpenter) - Clean up par-arch object file list (Liviu Dudau) - Set IORESOURCE_ROM_SHADOW only for the default VGA device (Sander Eikelenboom) - ACPI, ARM, drm, powerpc, pcmcia, PCI: Use list_for_each_entry() for bus traversal (Yijing Wang) - Fix pci_bus_b() build failure (Paul Gortmaker)" * tag 'pci-v3.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (108 commits) Revert "[PATCH] Insert GART region into resource map" PCI: Log IDE resource quirk in dmesg PCI: Change pci_bus_alloc_resource() type_mask to unsigned long PCI: Check all IORESOURCE_TYPE_BITS in pci_bus_alloc_from_region() resources: Set type in __request_region() PCI: Don't check resource_size() in pci_bus_alloc_resource() s390/PCI: Use generic pci_enable_resources() tile PCI RC: Use default pcibios_enable_device() sparc/PCI: Use default pcibios_enable_device() (Leon only) sh/PCI: Use default pcibios_enable_device() microblaze/PCI: Use default pcibios_enable_device() alpha/PCI: Use default pcibios_enable_device() PCI: Add "weak" generic pcibios_enable_device() implementation PCI: Don't enable decoding if BAR hasn't been assigned an address PCI: Enable INTx in pci_reenable_device() only when MSI/MSI-X not enabled PCI: Mark 64-bit resource as IORESOURCE_UNSET if we only support 32-bit PCI: Don't try to claim IORESOURCE_UNSET resources PCI: Check IORESOURCE_UNSET before updating BAR PCI: Don't clear IORESOURCE_UNSET when updating BAR PCI: Mark resources as IORESOURCE_UNSET if we can't assign them ... Conflicts: arch/x86/include/asm/topology.h drivers/ata/ahci.c
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h9
-rw-r--r--include/linux/ioport.h12
-rw-r--r--include/linux/pci.h11
3 files changed, 18 insertions, 14 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 6a15dddbaa09..7a8f2cd66c8b 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -263,14 +263,9 @@ extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
263extern void acpi_osi_setup(char *str); 263extern void acpi_osi_setup(char *str);
264 264
265#ifdef CONFIG_ACPI_NUMA 265#ifdef CONFIG_ACPI_NUMA
266int acpi_get_pxm(acpi_handle handle); 266int acpi_get_node(acpi_handle handle);
267int acpi_get_node(acpi_handle *handle);
268#else 267#else
269static inline int acpi_get_pxm(acpi_handle handle) 268static inline int acpi_get_node(acpi_handle handle)
270{
271 return 0;
272}
273static inline int acpi_get_node(acpi_handle *handle)
274{ 269{
275 return 0; 270 return 0;
276} 271}
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 89b7c24a36e9..5e3a906cc089 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -51,7 +51,7 @@ struct resource {
51 51
52#define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ 52#define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */
53#define IORESOURCE_DISABLED 0x10000000 53#define IORESOURCE_DISABLED 0x10000000
54#define IORESOURCE_UNSET 0x20000000 54#define IORESOURCE_UNSET 0x20000000 /* No address assigned yet */
55#define IORESOURCE_AUTO 0x40000000 55#define IORESOURCE_AUTO 0x40000000
56#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */ 56#define IORESOURCE_BUSY 0x80000000 /* Driver has marked this resource busy */
57 57
@@ -169,6 +169,16 @@ static inline unsigned long resource_type(const struct resource *res)
169{ 169{
170 return res->flags & IORESOURCE_TYPE_BITS; 170 return res->flags & IORESOURCE_TYPE_BITS;
171} 171}
172/* True iff r1 completely contains r2 */
173static inline bool resource_contains(struct resource *r1, struct resource *r2)
174{
175 if (resource_type(r1) != resource_type(r2))
176 return false;
177 if (r1->flags & IORESOURCE_UNSET || r2->flags & IORESOURCE_UNSET)
178 return false;
179 return r1->start <= r2->start && r1->end >= r2->end;
180}
181
172 182
173/* Convenience shorthand with allocation */ 183/* Convenience shorthand with allocation */
174#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0) 184#define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name), 0)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 33aa2caf0f0c..aab57b4abe7f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -29,7 +29,6 @@
29#include <linux/atomic.h> 29#include <linux/atomic.h>
30#include <linux/device.h> 30#include <linux/device.h>
31#include <linux/io.h> 31#include <linux/io.h>
32#include <linux/irqreturn.h>
33#include <uapi/linux/pci.h> 32#include <uapi/linux/pci.h>
34 33
35#include <linux/pci_ids.h> 34#include <linux/pci_ids.h>
@@ -170,6 +169,8 @@ enum pci_dev_flags {
170 PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2, 169 PCI_DEV_FLAGS_NO_D3 = (__force pci_dev_flags_t) 2,
171 /* Provide indication device is assigned by a Virtual Machine Manager */ 170 /* Provide indication device is assigned by a Virtual Machine Manager */
172 PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4, 171 PCI_DEV_FLAGS_ASSIGNED = (__force pci_dev_flags_t) 4,
172 /* Flag for quirk use to store if quirk-specific ACS is enabled */
173 PCI_DEV_FLAGS_ACS_ENABLED_QUIRK = (__force pci_dev_flags_t) 8,
173}; 174};
174 175
175enum pci_irq_reroute_variant { 176enum pci_irq_reroute_variant {
@@ -461,7 +462,6 @@ struct pci_bus {
461 unsigned int is_added:1; 462 unsigned int is_added:1;
462}; 463};
463 464
464#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
465#define to_pci_bus(n) container_of(n, struct pci_bus, dev) 465#define to_pci_bus(n) container_of(n, struct pci_bus, dev)
466 466
467/* 467/*
@@ -1066,7 +1066,7 @@ void pci_bus_remove_resources(struct pci_bus *bus);
1066int __must_check pci_bus_alloc_resource(struct pci_bus *bus, 1066int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
1067 struct resource *res, resource_size_t size, 1067 struct resource *res, resource_size_t size,
1068 resource_size_t align, resource_size_t min, 1068 resource_size_t align, resource_size_t min,
1069 unsigned int type_mask, 1069 unsigned long type_mask,
1070 resource_size_t (*alignf)(void *, 1070 resource_size_t (*alignf)(void *,
1071 const struct resource *, 1071 const struct resource *,
1072 resource_size_t, 1072 resource_size_t,
@@ -1530,6 +1530,7 @@ enum pci_fixup_pass {
1530void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 1530void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
1531struct pci_dev *pci_get_dma_source(struct pci_dev *dev); 1531struct pci_dev *pci_get_dma_source(struct pci_dev *dev);
1532int pci_dev_specific_acs_enabled(struct pci_dev *dev, u16 acs_flags); 1532int pci_dev_specific_acs_enabled(struct pci_dev *dev, u16 acs_flags);
1533void pci_dev_specific_enable_acs(struct pci_dev *dev);
1533#else 1534#else
1534static inline void pci_fixup_device(enum pci_fixup_pass pass, 1535static inline void pci_fixup_device(enum pci_fixup_pass pass,
1535 struct pci_dev *dev) { } 1536 struct pci_dev *dev) { }
@@ -1542,6 +1543,7 @@ static inline int pci_dev_specific_acs_enabled(struct pci_dev *dev,
1542{ 1543{
1543 return -ENOTTY; 1544 return -ENOTTY;
1544} 1545}
1546static inline void pci_dev_specific_enable_acs(struct pci_dev *dev) { }
1545#endif 1547#endif
1546 1548
1547void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); 1549void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
@@ -1597,7 +1599,6 @@ void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
1597#ifdef CONFIG_PCI_IOV 1599#ifdef CONFIG_PCI_IOV
1598int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn); 1600int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn);
1599void pci_disable_sriov(struct pci_dev *dev); 1601void pci_disable_sriov(struct pci_dev *dev);
1600irqreturn_t pci_sriov_migration(struct pci_dev *dev);
1601int pci_num_vf(struct pci_dev *dev); 1602int pci_num_vf(struct pci_dev *dev);
1602int pci_vfs_assigned(struct pci_dev *dev); 1603int pci_vfs_assigned(struct pci_dev *dev);
1603int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs); 1604int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs);
@@ -1606,8 +1607,6 @@ int pci_sriov_get_totalvfs(struct pci_dev *dev);
1606static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn) 1607static inline int pci_enable_sriov(struct pci_dev *dev, int nr_virtfn)
1607{ return -ENODEV; } 1608{ return -ENODEV; }
1608static inline void pci_disable_sriov(struct pci_dev *dev) { } 1609static inline void pci_disable_sriov(struct pci_dev *dev) { }
1609static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev)
1610{ return IRQ_NONE; }
1611static inline int pci_num_vf(struct pci_dev *dev) { return 0; } 1610static inline int pci_num_vf(struct pci_dev *dev) { return 0; }
1612static inline int pci_vfs_assigned(struct pci_dev *dev) 1611static inline int pci_vfs_assigned(struct pci_dev *dev)
1613{ return 0; } 1612{ return 0; }