diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-22 14:59:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-22 14:59:51 -0400 |
commit | 59ef7a83f1127038a433464597df02e2dc9540e7 (patch) | |
tree | 725d262fc2e68eb9c592d76265f878cec73f8f2d /include | |
parent | 5165aece0efac6574fc3e32b6f1c2a964820d1c6 (diff) | |
parent | 2af5066f664cb011cf17d2e4414491fe24597e07 (diff) |
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (74 commits)
PCI: make msi_free_irqs() to use msix_mask_irq() instead of open coded write
PCI: Fix the NIU MSI-X problem in a better way
PCI ASPM: remove get_root_port_link
PCI ASPM: cleanup pcie_aspm_sanity_check
PCI ASPM: remove has_switch field
PCI ASPM: cleanup calc_Lx_latency
PCI ASPM: cleanup pcie_aspm_get_cap_device
PCI ASPM: cleanup clkpm checks
PCI ASPM: cleanup __pcie_aspm_check_state_one
PCI ASPM: cleanup initialization
PCI ASPM: cleanup change input argument of aspm functions
PCI ASPM: cleanup misc in struct pcie_link_state
PCI ASPM: cleanup clkpm state in struct pcie_link_state
PCI ASPM: cleanup latency field in struct pcie_link_state
PCI ASPM: cleanup aspm state field in struct pcie_link_state
PCI ASPM: fix typo in struct pcie_link_state
PCI: drivers/pci/slot.c should depend on CONFIG_SYSFS
PCI: remove redundant __msi_set_enable()
PCI PM: consistently use type bool for wake enable variable
x86/ACPI: Correct maximum allowed _CRS returned resources and warn if exceeded
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ioport.h | 2 | ||||
-rw-r--r-- | include/linux/pci-acpi.h | 4 | ||||
-rw-r--r-- | include/linux/pci.h | 35 | ||||
-rw-r--r-- | include/linux/pci_hotplug.h | 23 | ||||
-rw-r--r-- | include/linux/pci_regs.h | 4 |
5 files changed, 43 insertions, 25 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 32e4b2f72294..786e7b8cece9 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -49,6 +49,8 @@ struct resource_list { | |||
49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ | 49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ |
50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ | 50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ |
51 | 51 | ||
52 | #define IORESOURCE_MEM_64 0x00100000 | ||
53 | |||
52 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | 54 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ |
53 | #define IORESOURCE_DISABLED 0x10000000 | 55 | #define IORESOURCE_DISABLED 0x10000000 |
54 | #define IORESOURCE_UNSET 0x20000000 | 56 | #define IORESOURCE_UNSET 0x20000000 |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 092e82e0048c..93a7c08f869d 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -15,7 +15,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | |||
15 | { | 15 | { |
16 | struct pci_bus *pbus = pdev->bus; | 16 | struct pci_bus *pbus = pdev->bus; |
17 | /* Find a PCI root bus */ | 17 | /* Find a PCI root bus */ |
18 | while (pbus->parent) | 18 | while (!pci_is_root_bus(pbus)) |
19 | pbus = pbus->parent; | 19 | pbus = pbus->parent; |
20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
21 | pbus->number); | 21 | pbus->number); |
@@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | |||
23 | 23 | ||
24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | 24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) |
25 | { | 25 | { |
26 | if (pbus->parent) | 26 | if (!pci_is_root_bus(pbus)) |
27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); | 27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); |
28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
29 | pbus->number); | 29 | pbus->number); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 8e366bb0705f..1365c745bdb7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -607,8 +607,6 @@ extern void pci_sort_breadthfirst(void); | |||
607 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | 607 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, |
608 | unsigned int device, | 608 | unsigned int device, |
609 | struct pci_dev *from); | 609 | struct pci_dev *from); |
610 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, | ||
611 | unsigned int devfn); | ||
612 | #endif /* CONFIG_PCI_LEGACY */ | 610 | #endif /* CONFIG_PCI_LEGACY */ |
613 | 611 | ||
614 | enum pci_lost_interrupt_reason { | 612 | enum pci_lost_interrupt_reason { |
@@ -647,6 +645,7 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn, | |||
647 | int where, u16 val); | 645 | int where, u16 val); |
648 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, | 646 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, |
649 | int where, u32 val); | 647 | int where, u32 val); |
648 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); | ||
650 | 649 | ||
651 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) | 650 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) |
652 | { | 651 | { |
@@ -711,8 +710,8 @@ int pcix_get_mmrbc(struct pci_dev *dev); | |||
711 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 710 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
712 | int pcie_get_readrq(struct pci_dev *dev); | 711 | int pcie_get_readrq(struct pci_dev *dev); |
713 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 712 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
713 | int __pci_reset_function(struct pci_dev *dev); | ||
714 | int pci_reset_function(struct pci_dev *dev); | 714 | int pci_reset_function(struct pci_dev *dev); |
715 | int pci_execute_reset_function(struct pci_dev *dev); | ||
716 | void pci_update_resource(struct pci_dev *dev, int resno); | 715 | void pci_update_resource(struct pci_dev *dev, int resno); |
717 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 716 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
718 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | 717 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
@@ -732,7 +731,7 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
732 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 731 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
733 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 732 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
734 | void pci_pme_active(struct pci_dev *dev, bool enable); | 733 | void pci_pme_active(struct pci_dev *dev, bool enable); |
735 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 734 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); |
736 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); | 735 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); |
737 | pci_power_t pci_target_state(struct pci_dev *dev); | 736 | pci_power_t pci_target_state(struct pci_dev *dev); |
738 | int pci_prepare_to_sleep(struct pci_dev *dev); | 737 | int pci_prepare_to_sleep(struct pci_dev *dev); |
@@ -798,7 +797,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, | |||
798 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | 797 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, |
799 | int pass); | 798 | int pass); |
800 | 799 | ||
801 | void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), | 800 | void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), |
802 | void *userdata); | 801 | void *userdata); |
803 | int pci_cfg_space_size_ext(struct pci_dev *dev); | 802 | int pci_cfg_space_size_ext(struct pci_dev *dev); |
804 | int pci_cfg_space_size(struct pci_dev *dev); | 803 | int pci_cfg_space_size(struct pci_dev *dev); |
@@ -888,6 +887,17 @@ static inline int pcie_aspm_enabled(void) | |||
888 | extern int pcie_aspm_enabled(void); | 887 | extern int pcie_aspm_enabled(void); |
889 | #endif | 888 | #endif |
890 | 889 | ||
890 | #ifndef CONFIG_PCIE_ECRC | ||
891 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | ||
892 | { | ||
893 | return; | ||
894 | } | ||
895 | static inline void pcie_ecrc_get_policy(char *str) {}; | ||
896 | #else | ||
897 | extern void pcie_set_ecrc_checking(struct pci_dev *dev); | ||
898 | extern void pcie_ecrc_get_policy(char *str); | ||
899 | #endif | ||
900 | |||
891 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 901 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
892 | 902 | ||
893 | #ifdef CONFIG_HT_IRQ | 903 | #ifdef CONFIG_HT_IRQ |
@@ -944,12 +954,6 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor, | |||
944 | return NULL; | 954 | return NULL; |
945 | } | 955 | } |
946 | 956 | ||
947 | static inline struct pci_dev *pci_find_slot(unsigned int bus, | ||
948 | unsigned int devfn) | ||
949 | { | ||
950 | return NULL; | ||
951 | } | ||
952 | |||
953 | static inline struct pci_dev *pci_get_device(unsigned int vendor, | 957 | static inline struct pci_dev *pci_get_device(unsigned int vendor, |
954 | unsigned int device, | 958 | unsigned int device, |
955 | struct pci_dev *from) | 959 | struct pci_dev *from) |
@@ -1105,6 +1109,10 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | |||
1105 | 1109 | ||
1106 | #include <asm/pci.h> | 1110 | #include <asm/pci.h> |
1107 | 1111 | ||
1112 | #ifndef PCIBIOS_MAX_MEM_32 | ||
1113 | #define PCIBIOS_MAX_MEM_32 (-1) | ||
1114 | #endif | ||
1115 | |||
1108 | /* these helpers provide future and backwards compatibility | 1116 | /* these helpers provide future and backwards compatibility |
1109 | * for accessing popular PCI BAR info */ | 1117 | * for accessing popular PCI BAR info */ |
1110 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) | 1118 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) |
@@ -1261,5 +1269,10 @@ static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev) | |||
1261 | } | 1269 | } |
1262 | #endif | 1270 | #endif |
1263 | 1271 | ||
1272 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | ||
1273 | extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | ||
1274 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | ||
1275 | #endif | ||
1276 | |||
1264 | #endif /* __KERNEL__ */ | 1277 | #endif /* __KERNEL__ */ |
1265 | #endif /* LINUX_PCI_H */ | 1278 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 20998746518e..b3646cd7fd5a 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -66,17 +66,10 @@ enum pcie_link_speed { | |||
66 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, | 66 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct hotplug_slot; | ||
70 | struct hotplug_slot_attribute { | ||
71 | struct attribute attr; | ||
72 | ssize_t (*show)(struct hotplug_slot *, char *); | ||
73 | ssize_t (*store)(struct hotplug_slot *, const char *, size_t); | ||
74 | }; | ||
75 | #define to_hotplug_attr(n) container_of(n, struct hotplug_slot_attribute, attr); | ||
76 | |||
77 | /** | 69 | /** |
78 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use | 70 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use |
79 | * @owner: The module owner of this structure | 71 | * @owner: The module owner of this structure |
72 | * @mod_name: The module name (KBUILD_MODNAME) of this structure | ||
80 | * @enable_slot: Called when the user wants to enable a specific pci slot | 73 | * @enable_slot: Called when the user wants to enable a specific pci slot |
81 | * @disable_slot: Called when the user wants to disable a specific pci slot | 74 | * @disable_slot: Called when the user wants to disable a specific pci slot |
82 | * @set_attention_status: Called to set the specific slot's attention LED to | 75 | * @set_attention_status: Called to set the specific slot's attention LED to |
@@ -109,6 +102,7 @@ struct hotplug_slot_attribute { | |||
109 | */ | 102 | */ |
110 | struct hotplug_slot_ops { | 103 | struct hotplug_slot_ops { |
111 | struct module *owner; | 104 | struct module *owner; |
105 | const char *mod_name; | ||
112 | int (*enable_slot) (struct hotplug_slot *slot); | 106 | int (*enable_slot) (struct hotplug_slot *slot); |
113 | int (*disable_slot) (struct hotplug_slot *slot); | 107 | int (*disable_slot) (struct hotplug_slot *slot); |
114 | int (*set_attention_status) (struct hotplug_slot *slot, u8 value); | 108 | int (*set_attention_status) (struct hotplug_slot *slot, u8 value); |
@@ -167,12 +161,21 @@ static inline const char *hotplug_slot_name(const struct hotplug_slot *slot) | |||
167 | return pci_slot_name(slot->pci_slot); | 161 | return pci_slot_name(slot->pci_slot); |
168 | } | 162 | } |
169 | 163 | ||
170 | extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr, | 164 | extern int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus, |
171 | const char *name); | 165 | int nr, const char *name, |
166 | struct module *owner, const char *mod_name); | ||
172 | extern int pci_hp_deregister(struct hotplug_slot *slot); | 167 | extern int pci_hp_deregister(struct hotplug_slot *slot); |
173 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 168 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
174 | struct hotplug_slot_info *info); | 169 | struct hotplug_slot_info *info); |
175 | 170 | ||
171 | static inline int pci_hp_register(struct hotplug_slot *slot, | ||
172 | struct pci_bus *pbus, | ||
173 | int devnr, const char *name) | ||
174 | { | ||
175 | return __pci_hp_register(slot, pbus, devnr, name, | ||
176 | THIS_MODULE, KBUILD_MODNAME); | ||
177 | } | ||
178 | |||
176 | /* PCI Setting Record (Type 0) */ | 179 | /* PCI Setting Record (Type 0) */ |
177 | struct hpp_type0 { | 180 | struct hpp_type0 { |
178 | u32 revision; | 181 | u32 revision; |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 616bf8b3c8b5..83b02f5a25b2 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
@@ -295,8 +295,9 @@ | |||
295 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ | 295 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ |
296 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ | 296 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ |
297 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ | 297 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ |
298 | #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ | ||
298 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ | 299 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ |
299 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ | 300 | #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ |
300 | 301 | ||
301 | /* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */ | 302 | /* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */ |
302 | #define PCI_MSIX_FLAGS 2 | 303 | #define PCI_MSIX_FLAGS 2 |
@@ -304,7 +305,6 @@ | |||
304 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | 305 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) |
305 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) | 306 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) |
306 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 307 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) |
307 | #define PCI_MSIX_FLAGS_BITMASK (1 << 0) | ||
308 | 308 | ||
309 | /* CompactPCI Hotswap Register */ | 309 | /* CompactPCI Hotswap Register */ |
310 | 310 | ||