diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2014-03-19 17:11:19 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-03-19 17:11:19 -0400 |
| commit | 30723cbf6f7aec2ab4810bdc4bf12c5749a09e33 (patch) | |
| tree | 840833435357419595fee44b2a06f9864f1458c9 /include/linux | |
| parent | 91b4adc983d8e9975bc677c2b8395631edf7b92d (diff) | |
| parent | f2e6027b816df3326d3f40d6ce55539a2f381529 (diff) | |
Merge branch 'pci/resource' into next
* pci/resource: (26 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: 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
PCI: Remove pci_find_parent_resource() use for allocation
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ioport.h | 12 | ||||
| -rw-r--r-- | include/linux/pci.h | 2 |
2 files changed, 12 insertions, 2 deletions
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 */ | ||
| 173 | static 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 d47b352c2e11..aab57b4abe7f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -1066,7 +1066,7 @@ void pci_bus_remove_resources(struct pci_bus *bus); | |||
| 1066 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | 1066 | int __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, |
