Commit f2856491 authored by Gavin Shan's avatar Gavin Shan Committed by Benjamin Herrenschmidt

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: default avatarGavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 0ba17888
...@@ -209,9 +209,12 @@ unsigned long eeh_check_failure(const volatile void __iomem *token, ...@@ -209,9 +209,12 @@ unsigned long eeh_check_failure(const volatile void __iomem *token,
unsigned long val); unsigned long val);
int eeh_dev_check_failure(struct eeh_dev *edev); int eeh_dev_check_failure(struct eeh_dev *edev);
void eeh_addr_cache_build(void); void eeh_addr_cache_build(void);
void eeh_add_device_early(struct device_node *);
void eeh_add_device_tree_early(struct device_node *); void eeh_add_device_tree_early(struct device_node *);
void eeh_add_device_late(struct pci_dev *);
void eeh_add_device_tree_late(struct pci_bus *); void eeh_add_device_tree_late(struct pci_bus *);
void eeh_add_sysfs_files(struct pci_bus *); void eeh_add_sysfs_files(struct pci_bus *);
void eeh_remove_device(struct pci_dev *, int);
void eeh_remove_bus_device(struct pci_dev *, int); void eeh_remove_bus_device(struct pci_dev *, int);
/** /**
...@@ -252,12 +255,18 @@ static inline unsigned long eeh_check_failure(const volatile void __iomem *token ...@@ -252,12 +255,18 @@ static inline unsigned long eeh_check_failure(const volatile void __iomem *token
static inline void eeh_addr_cache_build(void) { } static inline void eeh_addr_cache_build(void) { }
static inline void eeh_add_device_early(struct device_node *dn) { }
static inline void eeh_add_device_tree_early(struct device_node *dn) { } static inline void eeh_add_device_tree_early(struct device_node *dn) { }
static inline void eeh_add_device_late(struct pci_dev *dev) { }
static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
static inline void eeh_add_sysfs_files(struct pci_bus *bus) { } static inline void eeh_add_sysfs_files(struct pci_bus *bus) { }
static inline void eeh_remove_device(struct pci_dev *dev, int purge_pe) { }
static inline void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe) { } static inline void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe) { }
#define EEH_POSSIBLE_ERROR(val, type) (0) #define EEH_POSSIBLE_ERROR(val, type) (0)
......
...@@ -836,7 +836,7 @@ core_initcall_sync(eeh_init); ...@@ -836,7 +836,7 @@ core_initcall_sync(eeh_init);
* on the CEC architecture, type of the device, on earlier boot * on the CEC architecture, type of the device, on earlier boot
* command-line arguments & etc. * command-line arguments & etc.
*/ */
static void eeh_add_device_early(struct device_node *dn) void eeh_add_device_early(struct device_node *dn)
{ {
struct pci_controller *phb; struct pci_controller *phb;
...@@ -884,7 +884,7 @@ EXPORT_SYMBOL_GPL(eeh_add_device_tree_early); ...@@ -884,7 +884,7 @@ EXPORT_SYMBOL_GPL(eeh_add_device_tree_early);
* This routine must be used to complete EEH initialization for PCI * This routine must be used to complete EEH initialization for PCI
* devices that were added after system boot (e.g. hotplug, dlpar). * devices that were added after system boot (e.g. hotplug, dlpar).
*/ */
static void eeh_add_device_late(struct pci_dev *dev) void eeh_add_device_late(struct pci_dev *dev)
{ {
struct device_node *dn; struct device_node *dn;
struct eeh_dev *edev; struct eeh_dev *edev;
...@@ -972,7 +972,7 @@ EXPORT_SYMBOL_GPL(eeh_add_sysfs_files); ...@@ -972,7 +972,7 @@ EXPORT_SYMBOL_GPL(eeh_add_sysfs_files);
* this device will no longer be detected after this call; thus, * this device will no longer be detected after this call; thus,
* i/o errors affecting this slot may leave this device unusable. * i/o errors affecting this slot may leave this device unusable.
*/ */
static void eeh_remove_device(struct pci_dev *dev, int purge_pe) void eeh_remove_device(struct pci_dev *dev, int purge_pe)
{ {
struct eeh_dev *edev; struct eeh_dev *edev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment