diff options
author | Gavin Shan <shangw@linux.vnet.ibm.com> | 2013-07-23 22:24:52 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-07-24 00:18:46 -0400 |
commit | f2856491d24044de08da9e53cf7068841a8b4e1c (patch) | |
tree | 84833a3b2983ae67aa0e3038bf16f2e04c37e871 /arch | |
parent | 0ba178888b05a4efdaca7da528c170bd09f9687b (diff) |
powerpc/eeh: Export functions for hotplug
Make some functions public in order to support hotplug on either specific
PCI bus or PCI device in future.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/eeh.h | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/eeh.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index 09a8743143f3..d9d35c27de25 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h | |||
@@ -209,9 +209,12 @@ unsigned long eeh_check_failure(const volatile void __iomem *token, | |||
209 | unsigned long val); | 209 | unsigned long val); |
210 | int eeh_dev_check_failure(struct eeh_dev *edev); | 210 | int eeh_dev_check_failure(struct eeh_dev *edev); |
211 | void eeh_addr_cache_build(void); | 211 | void eeh_addr_cache_build(void); |
212 | void eeh_add_device_early(struct device_node *); | ||
212 | void eeh_add_device_tree_early(struct device_node *); | 213 | void eeh_add_device_tree_early(struct device_node *); |
214 | void eeh_add_device_late(struct pci_dev *); | ||
213 | void eeh_add_device_tree_late(struct pci_bus *); | 215 | void eeh_add_device_tree_late(struct pci_bus *); |
214 | void eeh_add_sysfs_files(struct pci_bus *); | 216 | void eeh_add_sysfs_files(struct pci_bus *); |
217 | void eeh_remove_device(struct pci_dev *, int); | ||
215 | void eeh_remove_bus_device(struct pci_dev *, int); | 218 | void eeh_remove_bus_device(struct pci_dev *, int); |
216 | 219 | ||
217 | /** | 220 | /** |
@@ -252,12 +255,18 @@ static inline unsigned long eeh_check_failure(const volatile void __iomem *token | |||
252 | 255 | ||
253 | static inline void eeh_addr_cache_build(void) { } | 256 | static inline void eeh_addr_cache_build(void) { } |
254 | 257 | ||
258 | static inline void eeh_add_device_early(struct device_node *dn) { } | ||
259 | |||
255 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } | 260 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } |
256 | 261 | ||
262 | static inline void eeh_add_device_late(struct pci_dev *dev) { } | ||
263 | |||
257 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } | 264 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } |
258 | 265 | ||
259 | static inline void eeh_add_sysfs_files(struct pci_bus *bus) { } | 266 | static inline void eeh_add_sysfs_files(struct pci_bus *bus) { } |
260 | 267 | ||
268 | static inline void eeh_remove_device(struct pci_dev *dev, int purge_pe) { } | ||
269 | |||
261 | static inline void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe) { } | 270 | static inline void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe) { } |
262 | 271 | ||
263 | #define EEH_POSSIBLE_ERROR(val, type) (0) | 272 | #define EEH_POSSIBLE_ERROR(val, type) (0) |
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index b5c425ea2974..582ad1ef46a8 100644 --- a/arch/powerpc/kernel/eeh.c +++ b/arch/powerpc/kernel/eeh.c | |||
@@ -836,7 +836,7 @@ core_initcall_sync(eeh_init); | |||
836 | * on the CEC architecture, type of the device, on earlier boot | 836 | * on the CEC architecture, type of the device, on earlier boot |
837 | * command-line arguments & etc. | 837 | * command-line arguments & etc. |
838 | */ | 838 | */ |
839 | static void eeh_add_device_early(struct device_node *dn) | 839 | void eeh_add_device_early(struct device_node *dn) |
840 | { | 840 | { |
841 | struct pci_controller *phb; | 841 | struct pci_controller *phb; |
842 | 842 | ||
@@ -884,7 +884,7 @@ EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); | |||
884 | * This routine must be used to complete EEH initialization for PCI | 884 | * This routine must be used to complete EEH initialization for PCI |
885 | * devices that were added after system boot (e.g. hotplug, dlpar). | 885 | * devices that were added after system boot (e.g. hotplug, dlpar). |
886 | */ | 886 | */ |
887 | static void eeh_add_device_late(struct pci_dev *dev) | 887 | void eeh_add_device_late(struct pci_dev *dev) |
888 | { | 888 | { |
889 | struct device_node *dn; | 889 | struct device_node *dn; |
890 | struct eeh_dev *edev; | 890 | struct eeh_dev *edev; |
@@ -972,7 +972,7 @@ EXPORT_SYMBOL_GPL(eeh_add_sysfs_files); | |||
972 | * this device will no longer be detected after this call; thus, | 972 | * this device will no longer be detected after this call; thus, |
973 | * i/o errors affecting this slot may leave this device unusable. | 973 | * i/o errors affecting this slot may leave this device unusable. |
974 | */ | 974 | */ |
975 | static void eeh_remove_device(struct pci_dev *dev, int purge_pe) | 975 | void eeh_remove_device(struct pci_dev *dev, int purge_pe) |
976 | { | 976 | { |
977 | struct eeh_dev *edev; | 977 | struct eeh_dev *edev; |
978 | 978 | ||