diff options
Diffstat (limited to 'include/asm-powerpc/eeh.h')
-rw-r--r-- | include/asm-powerpc/eeh.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index f8633aafe4ba..b263fb2fa6e4 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #ifndef _PPC64_EEH_H | 20 | #ifndef _PPC64_EEH_H |
21 | #define _PPC64_EEH_H | 21 | #define _PPC64_EEH_H |
22 | #ifdef __KERNEL__ | ||
22 | 23 | ||
23 | #include <linux/config.h> | 24 | #include <linux/config.h> |
24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
@@ -33,9 +34,11 @@ struct device_node; | |||
33 | extern int eeh_subsystem_enabled; | 34 | extern int eeh_subsystem_enabled; |
34 | 35 | ||
35 | /* Values for eeh_mode bits in device_node */ | 36 | /* Values for eeh_mode bits in device_node */ |
36 | #define EEH_MODE_SUPPORTED (1<<0) | 37 | #define EEH_MODE_SUPPORTED (1<<0) |
37 | #define EEH_MODE_NOCHECK (1<<1) | 38 | #define EEH_MODE_NOCHECK (1<<1) |
38 | #define EEH_MODE_ISOLATED (1<<2) | 39 | #define EEH_MODE_ISOLATED (1<<2) |
40 | #define EEH_MODE_RECOVERING (1<<3) | ||
41 | #define EEH_MODE_IRQ_DISABLED (1<<4) | ||
39 | 42 | ||
40 | /* Max number of EEH freezes allowed before we consider the device | 43 | /* Max number of EEH freezes allowed before we consider the device |
41 | * to be permanently disabled. */ | 44 | * to be permanently disabled. */ |
@@ -57,6 +60,7 @@ void __init pci_addr_cache_build(void); | |||
57 | * to finish the eeh setup for this device. | 60 | * to finish the eeh setup for this device. |
58 | */ | 61 | */ |
59 | void eeh_add_device_early(struct device_node *); | 62 | void eeh_add_device_early(struct device_node *); |
63 | void eeh_add_device_tree_early(struct device_node *); | ||
60 | void eeh_add_device_late(struct pci_dev *); | 64 | void eeh_add_device_late(struct pci_dev *); |
61 | 65 | ||
62 | /** | 66 | /** |
@@ -72,6 +76,15 @@ void eeh_add_device_late(struct pci_dev *); | |||
72 | void eeh_remove_device(struct pci_dev *); | 76 | void eeh_remove_device(struct pci_dev *); |
73 | 77 | ||
74 | /** | 78 | /** |
79 | * eeh_remove_device_recursive - undo EEH for device & children. | ||
80 | * @dev: pci device to be removed | ||
81 | * | ||
82 | * As above, this removes the device; it also removes child | ||
83 | * pci devices as well. | ||
84 | */ | ||
85 | void eeh_remove_bus_device(struct pci_dev *); | ||
86 | |||
87 | /** | ||
75 | * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure. | 88 | * EEH_POSSIBLE_ERROR() -- test for possible MMIO failure. |
76 | * | 89 | * |
77 | * If this macro yields TRUE, the caller relays to eeh_check_failure() | 90 | * If this macro yields TRUE, the caller relays to eeh_check_failure() |
@@ -107,6 +120,9 @@ static inline void eeh_add_device_late(struct pci_dev *dev) { } | |||
107 | 120 | ||
108 | static inline void eeh_remove_device(struct pci_dev *dev) { } | 121 | static inline void eeh_remove_device(struct pci_dev *dev) { } |
109 | 122 | ||
123 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } | ||
124 | |||
125 | static inline void eeh_remove_bus_device(struct pci_dev *dev) { } | ||
110 | #define EEH_POSSIBLE_ERROR(val, type) (0) | 126 | #define EEH_POSSIBLE_ERROR(val, type) (0) |
111 | #define EEH_IO_ERROR_VALUE(size) (-1UL) | 127 | #define EEH_IO_ERROR_VALUE(size) (-1UL) |
112 | #endif /* CONFIG_EEH */ | 128 | #endif /* CONFIG_EEH */ |
@@ -363,4 +379,5 @@ static inline void eeh_insl_ns(unsigned long port, void * buf, int nl) | |||
363 | eeh_check_failure((void __iomem *)(port), *(u32*)buf); | 379 | eeh_check_failure((void __iomem *)(port), *(u32*)buf); |
364 | } | 380 | } |
365 | 381 | ||
382 | #endif /* __KERNEL__ */ | ||
366 | #endif /* _PPC64_EEH_H */ | 383 | #endif /* _PPC64_EEH_H */ |