diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:48:36 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-02 15:48:36 -0400 |
| commit | f900e5824a44ab65437b4f7e7c610b72f94820c5 (patch) | |
| tree | 770015a763e4c87e807e00a467a4ca602f242363 /include | |
| parent | 23344cb341902f4e3431d8137dca93d6e186d054 (diff) | |
| parent | 856d08ec46c5ecf3df13827c492fb6998fdc8322 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc
* master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc:
[PATCH] powerpc: iSeries needs slb_initialize to be called
powerpc: hook up the splice syscall
[PATCH] powerpc/cell: compile fixes
[PATCH] powerpc: trivial spelling fixes in fault.c
[PATCH] powerpc/pseries: EEH Cleanup
[PATCH] powerpc/pseries: misc lparcfg fixes
[PATCH] powerpc/pseries: fix device name printing, again.
[PATCH] powerpc: Extends HCALL interface for InfiniBand usage
[PATCH] powerpc/pseries: Change H_StudlyCaps to H_SHOUTING_CAPS
[PATCH] powerpc/pseries: print message if EEH recovery fails
[PATCH] powerpc/pseries: mutex lock to serialize EEH event processing
powerpc: converted embedded platforms to use new define_machine support
powerpc: merge machine_check_exception between ppc32 & ppc64
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-powerpc/eeh.h | 20 | ||||
| -rw-r--r-- | include/asm-powerpc/hvcall.h | 185 |
2 files changed, 146 insertions, 59 deletions
diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index 5207758a6dd9..868c7139dbff 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h | |||
| @@ -60,24 +60,10 @@ void __init pci_addr_cache_build(void); | |||
| 60 | * device (including config space i/o). Call eeh_add_device_late | 60 | * device (including config space i/o). Call eeh_add_device_late |
| 61 | * to finish the eeh setup for this device. | 61 | * to finish the eeh setup for this device. |
| 62 | */ | 62 | */ |
| 63 | void eeh_add_device_early(struct device_node *); | ||
| 64 | void eeh_add_device_late(struct pci_dev *dev); | ||
| 65 | void eeh_add_device_tree_early(struct device_node *); | 63 | void eeh_add_device_tree_early(struct device_node *); |
| 66 | void eeh_add_device_tree_late(struct pci_bus *); | 64 | void eeh_add_device_tree_late(struct pci_bus *); |
| 67 | 65 | ||
| 68 | /** | 66 | /** |
| 69 | * eeh_remove_device - undo EEH setup for the indicated pci device | ||
| 70 | * @dev: pci device to be removed | ||
| 71 | * | ||
| 72 | * This routine should be called when a device is removed from | ||
| 73 | * a running system (e.g. by hotplug or dlpar). It unregisters | ||
| 74 | * the PCI device from the EEH subsystem. I/O errors affecting | ||
| 75 | * this device will no longer be detected after this call; thus, | ||
| 76 | * i/o errors affecting this slot may leave this device unusable. | ||
| 77 | */ | ||
| 78 | void eeh_remove_device(struct pci_dev *); | ||
| 79 | |||
| 80 | /** | ||
| 81 | * eeh_remove_device_recursive - undo EEH for device & children. | 67 | * eeh_remove_device_recursive - undo EEH for device & children. |
| 82 | * @dev: pci device to be removed | 68 | * @dev: pci device to be removed |
| 83 | * | 69 | * |
| @@ -116,12 +102,6 @@ static inline int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *d | |||
| 116 | 102 | ||
| 117 | static inline void pci_addr_cache_build(void) { } | 103 | static inline void pci_addr_cache_build(void) { } |
| 118 | 104 | ||
| 119 | static inline void eeh_add_device_early(struct device_node *dn) { } | ||
| 120 | |||
| 121 | static inline void eeh_add_device_late(struct pci_dev *dev) { } | ||
| 122 | |||
| 123 | static inline void eeh_remove_device(struct pci_dev *dev) { } | ||
| 124 | |||
| 125 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } | 105 | static inline void eeh_add_device_tree_early(struct device_node *dn) { } |
| 126 | 106 | ||
| 127 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } | 107 | static inline void eeh_add_device_tree_late(struct pci_bus *bus) { } |
diff --git a/include/asm-powerpc/hvcall.h b/include/asm-powerpc/hvcall.h index b72c04f3f551..6cc7e1fb7bfd 100644 --- a/include/asm-powerpc/hvcall.h +++ b/include/asm-powerpc/hvcall.h | |||
| @@ -4,47 +4,88 @@ | |||
| 4 | 4 | ||
| 5 | #define HVSC .long 0x44000022 | 5 | #define HVSC .long 0x44000022 |
| 6 | 6 | ||
| 7 | #define H_Success 0 | 7 | #define H_SUCCESS 0 |
| 8 | #define H_Busy 1 /* Hardware busy -- retry later */ | 8 | #define H_BUSY 1 /* Hardware busy -- retry later */ |
| 9 | #define H_Closed 2 /* Resource closed */ | 9 | #define H_CLOSED 2 /* Resource closed */ |
| 10 | #define H_Constrained 4 /* Resource request constrained to max allowed */ | 10 | #define H_NOT_AVAILABLE 3 |
| 11 | #define H_InProgress 14 /* Kind of like busy */ | 11 | #define H_CONSTRAINED 4 /* Resource request constrained to max allowed */ |
| 12 | #define H_Pending 17 /* returned from H_POLL_PENDING */ | 12 | #define H_PARTIAL 5 |
| 13 | #define H_Continue 18 /* Returned from H_Join on success */ | 13 | #define H_IN_PROGRESS 14 /* Kind of like busy */ |
| 14 | #define H_LongBusyStartRange 9900 /* Start of long busy range */ | 14 | #define H_PAGE_REGISTERED 15 |
| 15 | #define H_LongBusyOrder1msec 9900 /* Long busy, hint that 1msec is a good time to retry */ | 15 | #define H_PARTIAL_STORE 16 |
| 16 | #define H_LongBusyOrder10msec 9901 /* Long busy, hint that 10msec is a good time to retry */ | 16 | #define H_PENDING 17 /* returned from H_POLL_PENDING */ |
| 17 | #define H_LongBusyOrder100msec 9902 /* Long busy, hint that 100msec is a good time to retry */ | 17 | #define H_CONTINUE 18 /* Returned from H_Join on success */ |
| 18 | #define H_LongBusyOrder1sec 9903 /* Long busy, hint that 1sec is a good time to retry */ | 18 | #define H_LONG_BUSY_START_RANGE 9900 /* Start of long busy range */ |
| 19 | #define H_LongBusyOrder10sec 9904 /* Long busy, hint that 10sec is a good time to retry */ | 19 | #define H_LONG_BUSY_ORDER_1_MSEC 9900 /* Long busy, hint that 1msec \ |
| 20 | #define H_LongBusyOrder100sec 9905 /* Long busy, hint that 100sec is a good time to retry */ | 20 | is a good time to retry */ |
| 21 | #define H_LongBusyEndRange 9905 /* End of long busy range */ | 21 | #define H_LONG_BUSY_ORDER_10_MSEC 9901 /* Long busy, hint that 10msec \ |
| 22 | #define H_Hardware -1 /* Hardware error */ | 22 | is a good time to retry */ |
| 23 | #define H_Function -2 /* Function not supported */ | 23 | #define H_LONG_BUSY_ORDER_100_MSEC 9902 /* Long busy, hint that 100msec \ |
| 24 | #define H_Privilege -3 /* Caller not privileged */ | 24 | is a good time to retry */ |
| 25 | #define H_Parameter -4 /* Parameter invalid, out-of-range or conflicting */ | 25 | #define H_LONG_BUSY_ORDER_1_SEC 9903 /* Long busy, hint that 1sec \ |
| 26 | #define H_Bad_Mode -5 /* Illegal msr value */ | 26 | is a good time to retry */ |
| 27 | #define H_PTEG_Full -6 /* PTEG is full */ | 27 | #define H_LONG_BUSY_ORDER_10_SEC 9904 /* Long busy, hint that 10sec \ |
| 28 | #define H_Not_Found -7 /* PTE was not found" */ | 28 | is a good time to retry */ |
| 29 | #define H_Reserved_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ | 29 | #define H_LONG_BUSY_ORDER_100_SEC 9905 /* Long busy, hint that 100sec \ |
| 30 | #define H_NoMem -9 | 30 | is a good time to retry */ |
| 31 | #define H_Authority -10 | 31 | #define H_LONG_BUSY_END_RANGE 9905 /* End of long busy range */ |
| 32 | #define H_Permission -11 | 32 | #define H_HARDWARE -1 /* Hardware error */ |
| 33 | #define H_Dropped -12 | 33 | #define H_FUNCTION -2 /* Function not supported */ |
| 34 | #define H_SourceParm -13 | 34 | #define H_PRIVILEGE -3 /* Caller not privileged */ |
| 35 | #define H_DestParm -14 | 35 | #define H_PARAMETER -4 /* Parameter invalid, out-of-range or conflicting */ |
| 36 | #define H_RemoteParm -15 | 36 | #define H_BAD_MODE -5 /* Illegal msr value */ |
| 37 | #define H_Resource -16 | 37 | #define H_PTEG_FULL -6 /* PTEG is full */ |
| 38 | #define H_NOT_FOUND -7 /* PTE was not found" */ | ||
| 39 | #define H_RESERVED_DABR -8 /* DABR address is reserved by the hypervisor on this processor" */ | ||
| 40 | #define H_NO_MEM -9 | ||
| 41 | #define H_AUTHORITY -10 | ||
| 42 | #define H_PERMISSION -11 | ||
| 43 | #define H_DROPPED -12 | ||
| 44 | #define H_SOURCE_PARM -13 | ||
| 45 | #define H_DEST_PARM -14 | ||
| 46 | #define H_REMOTE_PARM -15 | ||
| 47 | #define H_RESOURCE -16 | ||
| 48 | #define H_ADAPTER_PARM -17 | ||
| 49 | #define H_RH_PARM -18 | ||
| 50 | #define H_RCQ_PARM -19 | ||
| 51 | #define H_SCQ_PARM -20 | ||
| 52 | #define H_EQ_PARM -21 | ||
| 53 | #define H_RT_PARM -22 | ||
| 54 | #define H_ST_PARM -23 | ||
| 55 | #define H_SIGT_PARM -24 | ||
| 56 | #define H_TOKEN_PARM -25 | ||
| 57 | #define H_MLENGTH_PARM -27 | ||
| 58 | #define H_MEM_PARM -28 | ||
| 59 | #define H_MEM_ACCESS_PARM -29 | ||
| 60 | #define H_ATTR_PARM -30 | ||
| 61 | #define H_PORT_PARM -31 | ||
| 62 | #define H_MCG_PARM -32 | ||
| 63 | #define H_VL_PARM -33 | ||
| 64 | #define H_TSIZE_PARM -34 | ||
| 65 | #define H_TRACE_PARM -35 | ||
| 66 | |||
| 67 | #define H_MASK_PARM -37 | ||
| 68 | #define H_MCG_FULL -38 | ||
| 69 | #define H_ALIAS_EXIST -39 | ||
| 70 | #define H_P_COUNTER -40 | ||
| 71 | #define H_TABLE_FULL -41 | ||
| 72 | #define H_ALT_TABLE -42 | ||
| 73 | #define H_MR_CONDITION -43 | ||
| 74 | #define H_NOT_ENOUGH_RESOURCES -44 | ||
| 75 | #define H_R_STATE -45 | ||
| 76 | #define H_RESCINDEND -46 | ||
| 77 | |||
| 38 | 78 | ||
| 39 | /* Long Busy is a condition that can be returned by the firmware | 79 | /* Long Busy is a condition that can be returned by the firmware |
| 40 | * when a call cannot be completed now, but the identical call | 80 | * when a call cannot be completed now, but the identical call |
| 41 | * should be retried later. This prevents calls blocking in the | 81 | * should be retried later. This prevents calls blocking in the |
| 42 | * firmware for long periods of time. Annoyingly the firmware can return | 82 | * firmware for long periods of time. Annoyingly the firmware can return |
| 43 | * a range of return codes, hinting at how long we should wait before | 83 | * a range of return codes, hinting at how long we should wait before |
| 44 | * retrying. If you don't care for the hint, the macro below is a good | 84 | * retrying. If you don't care for the hint, the macro below is a good |
| 45 | * way to check for the long_busy return codes | 85 | * way to check for the long_busy return codes |
| 46 | */ | 86 | */ |
| 47 | #define H_isLongBusy(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange)) | 87 | #define H_IS_LONG_BUSY(x) ((x >= H_LONG_BUSY_START_RANGE) \ |
| 88 | && (x <= H_LONG_BUSY_END_RANGE)) | ||
| 48 | 89 | ||
| 49 | /* Flags */ | 90 | /* Flags */ |
| 50 | #define H_LARGE_PAGE (1UL<<(63-16)) | 91 | #define H_LARGE_PAGE (1UL<<(63-16)) |
| @@ -66,6 +107,9 @@ | |||
| 66 | #define H_DABRX_KERNEL (1UL<<(63-62)) | 107 | #define H_DABRX_KERNEL (1UL<<(63-62)) |
| 67 | #define H_DABRX_USER (1UL<<(63-63)) | 108 | #define H_DABRX_USER (1UL<<(63-63)) |
| 68 | 109 | ||
| 110 | /* Each control block has to be on a 4K bondary */ | ||
| 111 | #define H_CB_ALIGNMENT 4096 | ||
| 112 | |||
| 69 | /* pSeries hypervisor opcodes */ | 113 | /* pSeries hypervisor opcodes */ |
| 70 | #define H_REMOVE 0x04 | 114 | #define H_REMOVE 0x04 |
| 71 | #define H_ENTER 0x08 | 115 | #define H_ENTER 0x08 |
| @@ -99,25 +143,52 @@ | |||
| 99 | #define H_PERFMON 0x7c | 143 | #define H_PERFMON 0x7c |
| 100 | #define H_MIGRATE_DMA 0x78 | 144 | #define H_MIGRATE_DMA 0x78 |
| 101 | #define H_REGISTER_VPA 0xDC | 145 | #define H_REGISTER_VPA 0xDC |
| 102 | #define H_CEDE 0xE0 | 146 | #define H_CEDE 0xE0 |
| 103 | #define H_CONFER 0xE4 | 147 | #define H_CONFER 0xE4 |
| 104 | #define H_PROD 0xE8 | 148 | #define H_PROD 0xE8 |
| 105 | #define H_GET_PPP 0xEC | 149 | #define H_GET_PPP 0xEC |
| 106 | #define H_SET_PPP 0xF0 | 150 | #define H_SET_PPP 0xF0 |
| 107 | #define H_PURR 0xF4 | 151 | #define H_PURR 0xF4 |
| 108 | #define H_PIC 0xF8 | 152 | #define H_PIC 0xF8 |
| 109 | #define H_REG_CRQ 0xFC | 153 | #define H_REG_CRQ 0xFC |
| 110 | #define H_FREE_CRQ 0x100 | 154 | #define H_FREE_CRQ 0x100 |
| 111 | #define H_VIO_SIGNAL 0x104 | 155 | #define H_VIO_SIGNAL 0x104 |
| 112 | #define H_SEND_CRQ 0x108 | 156 | #define H_SEND_CRQ 0x108 |
| 113 | #define H_COPY_RDMA 0x110 | 157 | #define H_COPY_RDMA 0x110 |
| 114 | #define H_SET_XDABR 0x134 | 158 | #define H_SET_XDABR 0x134 |
| 115 | #define H_STUFF_TCE 0x138 | 159 | #define H_STUFF_TCE 0x138 |
| 116 | #define H_PUT_TCE_INDIRECT 0x13C | 160 | #define H_PUT_TCE_INDIRECT 0x13C |
| 117 | #define H_VTERM_PARTNER_INFO 0x150 | 161 | #define H_VTERM_PARTNER_INFO 0x150 |
| 118 | #define H_REGISTER_VTERM 0x154 | 162 | #define H_REGISTER_VTERM 0x154 |
| 119 | #define H_FREE_VTERM 0x158 | 163 | #define H_FREE_VTERM 0x158 |
| 120 | #define H_POLL_PENDING 0x1D8 | 164 | #define H_RESET_EVENTS 0x15C |
| 165 | #define H_ALLOC_RESOURCE 0x160 | ||
| 166 | #define H_FREE_RESOURCE 0x164 | ||
| 167 | #define H_MODIFY_QP 0x168 | ||
| 168 | #define H_QUERY_QP 0x16C | ||
| 169 | #define H_REREGISTER_PMR 0x170 | ||
| 170 | #define H_REGISTER_SMR 0x174 | ||
| 171 | #define H_QUERY_MR 0x178 | ||
| 172 | #define H_QUERY_MW 0x17C | ||
| 173 | #define H_QUERY_HCA 0x180 | ||
| 174 | #define H_QUERY_PORT 0x184 | ||
| 175 | #define H_MODIFY_PORT 0x188 | ||
| 176 | #define H_DEFINE_AQP1 0x18C | ||
| 177 | #define H_GET_TRACE_BUFFER 0x190 | ||
| 178 | #define H_DEFINE_AQP0 0x194 | ||
| 179 | #define H_RESIZE_MR 0x198 | ||
| 180 | #define H_ATTACH_MCQP 0x19C | ||
| 181 | #define H_DETACH_MCQP 0x1A0 | ||
| 182 | #define H_CREATE_RPT 0x1A4 | ||
| 183 | #define H_REMOVE_RPT 0x1A8 | ||
| 184 | #define H_REGISTER_RPAGES 0x1AC | ||
| 185 | #define H_DISABLE_AND_GETC 0x1B0 | ||
| 186 | #define H_ERROR_DATA 0x1B4 | ||
| 187 | #define H_GET_HCA_INFO 0x1B8 | ||
| 188 | #define H_GET_PERF_COUNT 0x1BC | ||
| 189 | #define H_MANAGE_TRACE 0x1C0 | ||
| 190 | #define H_QUERY_INT_STATE 0x1E4 | ||
| 191 | #define H_POLL_PENDING 0x1D8 | ||
| 121 | #define H_JOIN 0x298 | 192 | #define H_JOIN 0x298 |
| 122 | #define H_ENABLE_CRQ 0x2B0 | 193 | #define H_ENABLE_CRQ 0x2B0 |
| 123 | 194 | ||
| @@ -152,7 +223,7 @@ long plpar_hcall_norets(unsigned long opcode, ...); | |||
| 152 | */ | 223 | */ |
| 153 | long plpar_hcall_8arg_2ret(unsigned long opcode, | 224 | long plpar_hcall_8arg_2ret(unsigned long opcode, |
| 154 | unsigned long arg1, | 225 | unsigned long arg1, |
| 155 | unsigned long arg2, | 226 | unsigned long arg2, |
| 156 | unsigned long arg3, | 227 | unsigned long arg3, |
| 157 | unsigned long arg4, | 228 | unsigned long arg4, |
| 158 | unsigned long arg5, | 229 | unsigned long arg5, |
| @@ -176,6 +247,42 @@ long plpar_hcall_4out(unsigned long opcode, | |||
| 176 | unsigned long *out3, | 247 | unsigned long *out3, |
| 177 | unsigned long *out4); | 248 | unsigned long *out4); |
| 178 | 249 | ||
| 250 | long plpar_hcall_7arg_7ret(unsigned long opcode, | ||
| 251 | unsigned long arg1, | ||
| 252 | unsigned long arg2, | ||
| 253 | unsigned long arg3, | ||
| 254 | unsigned long arg4, | ||
| 255 | unsigned long arg5, | ||
| 256 | unsigned long arg6, | ||
| 257 | unsigned long arg7, | ||
| 258 | unsigned long *out1, | ||
| 259 | unsigned long *out2, | ||
| 260 | unsigned long *out3, | ||
| 261 | unsigned long *out4, | ||
| 262 | unsigned long *out5, | ||
| 263 | unsigned long *out6, | ||
| 264 | unsigned long *out7); | ||
| 265 | |||
| 266 | long plpar_hcall_9arg_9ret(unsigned long opcode, | ||
| 267 | unsigned long arg1, | ||
| 268 | unsigned long arg2, | ||
| 269 | unsigned long arg3, | ||
| 270 | unsigned long arg4, | ||
| 271 | unsigned long arg5, | ||
| 272 | unsigned long arg6, | ||
| 273 | unsigned long arg7, | ||
| 274 | unsigned long arg8, | ||
| 275 | unsigned long arg9, | ||
| 276 | unsigned long *out1, | ||
| 277 | unsigned long *out2, | ||
| 278 | unsigned long *out3, | ||
| 279 | unsigned long *out4, | ||
| 280 | unsigned long *out5, | ||
| 281 | unsigned long *out6, | ||
| 282 | unsigned long *out7, | ||
| 283 | unsigned long *out8, | ||
| 284 | unsigned long *out9); | ||
| 285 | |||
| 179 | #endif /* __ASSEMBLY__ */ | 286 | #endif /* __ASSEMBLY__ */ |
| 180 | #endif /* __KERNEL__ */ | 287 | #endif /* __KERNEL__ */ |
| 181 | #endif /* _ASM_POWERPC_HVCALL_H */ | 288 | #endif /* _ASM_POWERPC_HVCALL_H */ |
