aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-09-11 15:16:17 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-09-18 01:32:23 -0400
commit20ee6a970858a0f5711ea32cb7f855a81704cb53 (patch)
treeb09241fc593a30f494d2bad75ae0e704465b995b /arch/powerpc/include/asm
parent5efc3ad7325d81b5a8e09bc14d5e21ce7272d934 (diff)
powerpc/eeh: Remove EEH PE for normal PCI hotplug
Function eeh_rmv_from_parent_pe() could be called by the path of either normal PCI hotplug, or EEH recovery. For the former case, we need purge the corresponding PE on removal of the associated PE bus. The patch tries to cover that by passing more information to function pcibios_remove_pci_devices() so that we know if the corresponding PE needs to be purged or be marked as "invalid". Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r--arch/powerpc/include/asm/eeh.h6
-rw-r--r--arch/powerpc/include/asm/pci-bridge.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h
index afeb40086fb2..b0ef73882b38 100644
--- a/arch/powerpc/include/asm/eeh.h
+++ b/arch/powerpc/include/asm/eeh.h
@@ -185,7 +185,7 @@ static inline void eeh_unlock(void)
185typedef void *(*eeh_traverse_func)(void *data, void *flag); 185typedef void *(*eeh_traverse_func)(void *data, void *flag);
186int __devinit eeh_phb_pe_create(struct pci_controller *phb); 186int __devinit eeh_phb_pe_create(struct pci_controller *phb);
187int eeh_add_to_parent_pe(struct eeh_dev *edev); 187int eeh_add_to_parent_pe(struct eeh_dev *edev);
188int eeh_rmv_from_parent_pe(struct eeh_dev *edev); 188int eeh_rmv_from_parent_pe(struct eeh_dev *edev, int purge_pe);
189void *eeh_pe_dev_traverse(struct eeh_pe *root, 189void *eeh_pe_dev_traverse(struct eeh_pe *root,
190 eeh_traverse_func fn, void *flag); 190 eeh_traverse_func fn, void *flag);
191void eeh_pe_restore_bars(struct eeh_pe *pe); 191void eeh_pe_restore_bars(struct eeh_pe *pe);
@@ -201,7 +201,7 @@ int eeh_dev_check_failure(struct eeh_dev *edev);
201void __init eeh_addr_cache_build(void); 201void __init eeh_addr_cache_build(void);
202void eeh_add_device_tree_early(struct device_node *); 202void eeh_add_device_tree_early(struct device_node *);
203void eeh_add_device_tree_late(struct pci_bus *); 203void eeh_add_device_tree_late(struct pci_bus *);
204void eeh_remove_bus_device(struct pci_dev *); 204void eeh_remove_bus_device(struct pci_dev *, int);
205 205
206/** 206/**
207 * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure. 207 * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure.
@@ -240,7 +240,7 @@ static inline void eeh_add_device_tree_early(struct device_node *dn) { }
240 240
241static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } 241static inline void eeh_add_device_tree_late(struct pci_bus *bus) { }
242 242
243static inline void eeh_remove_bus_device(struct pci_dev *dev) { } 243static inline void eeh_remove_bus_device(struct pci_dev *dev, int purge_pe) { }
244 244
245static inline void eeh_lock(void) { } 245static inline void eeh_lock(void) { }
246static inline void eeh_unlock(void) { } 246static inline void eeh_unlock(void) { }
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 973df4d9d366..a059cb94952b 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -192,6 +192,7 @@ static inline struct eeh_dev *of_node_to_eeh_dev(struct device_node *dn)
192extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn); 192extern struct pci_bus *pcibios_find_pci_bus(struct device_node *dn);
193 193
194/** Remove all of the PCI devices under this bus */ 194/** Remove all of the PCI devices under this bus */
195extern void __pcibios_remove_pci_devices(struct pci_bus *bus, int purge_pe);
195extern void pcibios_remove_pci_devices(struct pci_bus *bus); 196extern void pcibios_remove_pci_devices(struct pci_bus *bus);
196 197
197/** Discover new pci devices under this bus, and add them */ 198/** Discover new pci devices under this bus, and add them */