diff options
Diffstat (limited to 'include/asm-ppc64/iSeries')
26 files changed, 0 insertions, 2786 deletions
diff --git a/include/asm-ppc64/iSeries/HvCall.h b/include/asm-ppc64/iSeries/HvCall.h deleted file mode 100644 index c3f19475c0d9..000000000000 --- a/include/asm-ppc64/iSeries/HvCall.h +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * HvCall.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | /* | ||
20 | * This file contains the "hypervisor call" interface which is used to | ||
21 | * drive the hypervisor from the OS. | ||
22 | */ | ||
23 | #ifndef _HVCALL_H | ||
24 | #define _HVCALL_H | ||
25 | |||
26 | #include <asm/iSeries/HvCallSc.h> | ||
27 | #include <asm/iSeries/HvTypes.h> | ||
28 | #include <asm/paca.h> | ||
29 | |||
30 | /* Type of yield for HvCallBaseYieldProcessor */ | ||
31 | #define HvCall_YieldTimed 0 /* Yield until specified time (tb) */ | ||
32 | #define HvCall_YieldToActive 1 /* Yield until all active procs have run */ | ||
33 | #define HvCall_YieldToProc 2 /* Yield until the specified processor has run */ | ||
34 | |||
35 | /* interrupt masks for setEnabledInterrupts */ | ||
36 | #define HvCall_MaskIPI 0x00000001 | ||
37 | #define HvCall_MaskLpEvent 0x00000002 | ||
38 | #define HvCall_MaskLpProd 0x00000004 | ||
39 | #define HvCall_MaskTimeout 0x00000008 | ||
40 | |||
41 | /* Log buffer formats */ | ||
42 | #define HvCall_LogBuffer_ASCII 0 | ||
43 | #define HvCall_LogBuffer_EBCDIC 1 | ||
44 | |||
45 | #define HvCallBaseAckDeferredInts HvCallBase + 0 | ||
46 | #define HvCallBaseCpmPowerOff HvCallBase + 1 | ||
47 | #define HvCallBaseGetHwPatch HvCallBase + 2 | ||
48 | #define HvCallBaseReIplSpAttn HvCallBase + 3 | ||
49 | #define HvCallBaseSetASR HvCallBase + 4 | ||
50 | #define HvCallBaseSetASRAndRfi HvCallBase + 5 | ||
51 | #define HvCallBaseSetIMR HvCallBase + 6 | ||
52 | #define HvCallBaseSendIPI HvCallBase + 7 | ||
53 | #define HvCallBaseTerminateMachine HvCallBase + 8 | ||
54 | #define HvCallBaseTerminateMachineSrc HvCallBase + 9 | ||
55 | #define HvCallBaseProcessPlicInterrupts HvCallBase + 10 | ||
56 | #define HvCallBaseIsPrimaryCpmOrMsdIpl HvCallBase + 11 | ||
57 | #define HvCallBaseSetVirtualSIT HvCallBase + 12 | ||
58 | #define HvCallBaseVaryOffThisProcessor HvCallBase + 13 | ||
59 | #define HvCallBaseVaryOffMemoryChunk HvCallBase + 14 | ||
60 | #define HvCallBaseVaryOffInteractivePercentage HvCallBase + 15 | ||
61 | #define HvCallBaseSendLpProd HvCallBase + 16 | ||
62 | #define HvCallBaseSetEnabledInterrupts HvCallBase + 17 | ||
63 | #define HvCallBaseYieldProcessor HvCallBase + 18 | ||
64 | #define HvCallBaseVaryOffSharedProcUnits HvCallBase + 19 | ||
65 | #define HvCallBaseSetVirtualDecr HvCallBase + 20 | ||
66 | #define HvCallBaseClearLogBuffer HvCallBase + 21 | ||
67 | #define HvCallBaseGetLogBufferCodePage HvCallBase + 22 | ||
68 | #define HvCallBaseGetLogBufferFormat HvCallBase + 23 | ||
69 | #define HvCallBaseGetLogBufferLength HvCallBase + 24 | ||
70 | #define HvCallBaseReadLogBuffer HvCallBase + 25 | ||
71 | #define HvCallBaseSetLogBufferFormatAndCodePage HvCallBase + 26 | ||
72 | #define HvCallBaseWriteLogBuffer HvCallBase + 27 | ||
73 | #define HvCallBaseRouter28 HvCallBase + 28 | ||
74 | #define HvCallBaseRouter29 HvCallBase + 29 | ||
75 | #define HvCallBaseRouter30 HvCallBase + 30 | ||
76 | #define HvCallBaseSetDebugBus HvCallBase + 31 | ||
77 | |||
78 | #define HvCallCcSetDABR HvCallCc + 7 | ||
79 | |||
80 | static inline void HvCall_setVirtualDecr(void) | ||
81 | { | ||
82 | /* | ||
83 | * Ignore any error return codes - most likely means that the | ||
84 | * target value for the LP has been increased and this vary off | ||
85 | * would bring us below the new target. | ||
86 | */ | ||
87 | HvCall0(HvCallBaseSetVirtualDecr); | ||
88 | } | ||
89 | |||
90 | static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm) | ||
91 | { | ||
92 | HvCall2(HvCallBaseYieldProcessor, typeOfYield, yieldParm); | ||
93 | } | ||
94 | |||
95 | static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts) | ||
96 | { | ||
97 | HvCall1(HvCallBaseSetEnabledInterrupts, enabledInterrupts); | ||
98 | } | ||
99 | |||
100 | static inline void HvCall_setLogBufferFormatAndCodepage(int format, | ||
101 | u32 codePage) | ||
102 | { | ||
103 | HvCall2(HvCallBaseSetLogBufferFormatAndCodePage, format, codePage); | ||
104 | } | ||
105 | |||
106 | extern void HvCall_writeLogBuffer(const void *buffer, u64 bufLen); | ||
107 | |||
108 | static inline void HvCall_sendIPI(struct paca_struct *targetPaca) | ||
109 | { | ||
110 | HvCall1(HvCallBaseSendIPI, targetPaca->paca_index); | ||
111 | } | ||
112 | |||
113 | #endif /* _HVCALL_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvCallEvent.h b/include/asm-ppc64/iSeries/HvCallEvent.h deleted file mode 100644 index 5d9a327d0122..000000000000 --- a/include/asm-ppc64/iSeries/HvCallEvent.h +++ /dev/null | |||
@@ -1,253 +0,0 @@ | |||
1 | /* | ||
2 | * HvCallEvent.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | /* | ||
20 | * This file contains the "hypervisor call" interface which is used to | ||
21 | * drive the hypervisor from the OS. | ||
22 | */ | ||
23 | #ifndef _HVCALLEVENT_H | ||
24 | #define _HVCALLEVENT_H | ||
25 | |||
26 | #include <asm/iSeries/HvCallSc.h> | ||
27 | #include <asm/iSeries/HvTypes.h> | ||
28 | #include <asm/abs_addr.h> | ||
29 | |||
30 | struct HvLpEvent; | ||
31 | |||
32 | typedef u8 HvLpEvent_Type; | ||
33 | typedef u8 HvLpEvent_AckInd; | ||
34 | typedef u8 HvLpEvent_AckType; | ||
35 | |||
36 | struct HvCallEvent_PackedParms { | ||
37 | u8 xAckType:1; | ||
38 | u8 xAckInd:1; | ||
39 | u8 xRsvd:1; | ||
40 | u8 xTargetLp:5; | ||
41 | u8 xType; | ||
42 | u16 xSubtype; | ||
43 | HvLpInstanceId xSourceInstId; | ||
44 | HvLpInstanceId xTargetInstId; | ||
45 | }; | ||
46 | |||
47 | typedef u8 HvLpDma_Direction; | ||
48 | typedef u8 HvLpDma_AddressType; | ||
49 | |||
50 | struct HvCallEvent_PackedDmaParms { | ||
51 | u8 xDirection:1; | ||
52 | u8 xLocalAddrType:1; | ||
53 | u8 xRemoteAddrType:1; | ||
54 | u8 xRsvd1:5; | ||
55 | HvLpIndex xRemoteLp; | ||
56 | u8 xType; | ||
57 | u8 xRsvd2; | ||
58 | HvLpInstanceId xLocalInstId; | ||
59 | HvLpInstanceId xRemoteInstId; | ||
60 | }; | ||
61 | |||
62 | typedef u64 HvLpEvent_Rc; | ||
63 | typedef u64 HvLpDma_Rc; | ||
64 | |||
65 | #define HvCallEventAckLpEvent HvCallEvent + 0 | ||
66 | #define HvCallEventCancelLpEvent HvCallEvent + 1 | ||
67 | #define HvCallEventCloseLpEventPath HvCallEvent + 2 | ||
68 | #define HvCallEventDmaBufList HvCallEvent + 3 | ||
69 | #define HvCallEventDmaSingle HvCallEvent + 4 | ||
70 | #define HvCallEventDmaToSp HvCallEvent + 5 | ||
71 | #define HvCallEventGetOverflowLpEvents HvCallEvent + 6 | ||
72 | #define HvCallEventGetSourceLpInstanceId HvCallEvent + 7 | ||
73 | #define HvCallEventGetTargetLpInstanceId HvCallEvent + 8 | ||
74 | #define HvCallEventOpenLpEventPath HvCallEvent + 9 | ||
75 | #define HvCallEventSetLpEventStack HvCallEvent + 10 | ||
76 | #define HvCallEventSignalLpEvent HvCallEvent + 11 | ||
77 | #define HvCallEventSignalLpEventParms HvCallEvent + 12 | ||
78 | #define HvCallEventSetInterLpQueueIndex HvCallEvent + 13 | ||
79 | #define HvCallEventSetLpEventQueueInterruptProc HvCallEvent + 14 | ||
80 | #define HvCallEventRouter15 HvCallEvent + 15 | ||
81 | |||
82 | static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex) | ||
83 | { | ||
84 | HvCall1(HvCallEventGetOverflowLpEvents, queueIndex); | ||
85 | } | ||
86 | |||
87 | static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex) | ||
88 | { | ||
89 | HvCall1(HvCallEventSetInterLpQueueIndex, queueIndex); | ||
90 | } | ||
91 | |||
92 | static inline void HvCallEvent_setLpEventStack(u8 queueIndex, | ||
93 | char *eventStackAddr, u32 eventStackSize) | ||
94 | { | ||
95 | u64 abs_addr; | ||
96 | |||
97 | abs_addr = virt_to_abs(eventStackAddr); | ||
98 | HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr, | ||
99 | eventStackSize); | ||
100 | } | ||
101 | |||
102 | static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex, | ||
103 | u16 lpLogicalProcIndex) | ||
104 | { | ||
105 | HvCall2(HvCallEventSetLpEventQueueInterruptProc, queueIndex, | ||
106 | lpLogicalProcIndex); | ||
107 | } | ||
108 | |||
109 | static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event) | ||
110 | { | ||
111 | u64 abs_addr; | ||
112 | |||
113 | #ifdef DEBUG_SENDEVENT | ||
114 | printk("HvCallEvent_signalLpEvent: *event = %016lx\n ", | ||
115 | (unsigned long)event); | ||
116 | #endif | ||
117 | abs_addr = virt_to_abs(event); | ||
118 | return HvCall1(HvCallEventSignalLpEvent, abs_addr); | ||
119 | } | ||
120 | |||
121 | static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp, | ||
122 | HvLpEvent_Type type, u16 subtype, HvLpEvent_AckInd ackInd, | ||
123 | HvLpEvent_AckType ackType, HvLpInstanceId sourceInstanceId, | ||
124 | HvLpInstanceId targetInstanceId, u64 correlationToken, | ||
125 | u64 eventData1, u64 eventData2, u64 eventData3, | ||
126 | u64 eventData4, u64 eventData5) | ||
127 | { | ||
128 | /* Pack the misc bits into a single Dword to pass to PLIC */ | ||
129 | union { | ||
130 | struct HvCallEvent_PackedParms parms; | ||
131 | u64 dword; | ||
132 | } packed; | ||
133 | packed.parms.xAckType = ackType; | ||
134 | packed.parms.xAckInd = ackInd; | ||
135 | packed.parms.xRsvd = 0; | ||
136 | packed.parms.xTargetLp = targetLp; | ||
137 | packed.parms.xType = type; | ||
138 | packed.parms.xSubtype = subtype; | ||
139 | packed.parms.xSourceInstId = sourceInstanceId; | ||
140 | packed.parms.xTargetInstId = targetInstanceId; | ||
141 | |||
142 | return HvCall7(HvCallEventSignalLpEventParms, packed.dword, | ||
143 | correlationToken, eventData1, eventData2, | ||
144 | eventData3, eventData4, eventData5); | ||
145 | } | ||
146 | |||
147 | static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event) | ||
148 | { | ||
149 | u64 abs_addr; | ||
150 | |||
151 | abs_addr = virt_to_abs(event); | ||
152 | return HvCall1(HvCallEventAckLpEvent, abs_addr); | ||
153 | } | ||
154 | |||
155 | static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event) | ||
156 | { | ||
157 | u64 abs_addr; | ||
158 | |||
159 | abs_addr = virt_to_abs(event); | ||
160 | return HvCall1(HvCallEventCancelLpEvent, abs_addr); | ||
161 | } | ||
162 | |||
163 | static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId( | ||
164 | HvLpIndex targetLp, HvLpEvent_Type type) | ||
165 | { | ||
166 | return HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type); | ||
167 | } | ||
168 | |||
169 | static inline HvLpInstanceId HvCallEvent_getTargetLpInstanceId( | ||
170 | HvLpIndex targetLp, HvLpEvent_Type type) | ||
171 | { | ||
172 | return HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type); | ||
173 | } | ||
174 | |||
175 | static inline void HvCallEvent_openLpEventPath(HvLpIndex targetLp, | ||
176 | HvLpEvent_Type type) | ||
177 | { | ||
178 | HvCall2(HvCallEventOpenLpEventPath, targetLp, type); | ||
179 | } | ||
180 | |||
181 | static inline void HvCallEvent_closeLpEventPath(HvLpIndex targetLp, | ||
182 | HvLpEvent_Type type) | ||
183 | { | ||
184 | HvCall2(HvCallEventCloseLpEventPath, targetLp, type); | ||
185 | } | ||
186 | |||
187 | static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type, | ||
188 | HvLpIndex remoteLp, HvLpDma_Direction direction, | ||
189 | HvLpInstanceId localInstanceId, | ||
190 | HvLpInstanceId remoteInstanceId, | ||
191 | HvLpDma_AddressType localAddressType, | ||
192 | HvLpDma_AddressType remoteAddressType, | ||
193 | /* Do these need to be converted to absolute addresses? */ | ||
194 | u64 localBufList, u64 remoteBufList, u32 transferLength) | ||
195 | { | ||
196 | /* Pack the misc bits into a single Dword to pass to PLIC */ | ||
197 | union { | ||
198 | struct HvCallEvent_PackedDmaParms parms; | ||
199 | u64 dword; | ||
200 | } packed; | ||
201 | |||
202 | packed.parms.xDirection = direction; | ||
203 | packed.parms.xLocalAddrType = localAddressType; | ||
204 | packed.parms.xRemoteAddrType = remoteAddressType; | ||
205 | packed.parms.xRsvd1 = 0; | ||
206 | packed.parms.xRemoteLp = remoteLp; | ||
207 | packed.parms.xType = type; | ||
208 | packed.parms.xRsvd2 = 0; | ||
209 | packed.parms.xLocalInstId = localInstanceId; | ||
210 | packed.parms.xRemoteInstId = remoteInstanceId; | ||
211 | |||
212 | return HvCall4(HvCallEventDmaBufList, packed.dword, localBufList, | ||
213 | remoteBufList, transferLength); | ||
214 | } | ||
215 | |||
216 | static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type, | ||
217 | HvLpIndex remoteLp, HvLpDma_Direction direction, | ||
218 | HvLpInstanceId localInstanceId, | ||
219 | HvLpInstanceId remoteInstanceId, | ||
220 | HvLpDma_AddressType localAddressType, | ||
221 | HvLpDma_AddressType remoteAddressType, | ||
222 | u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength) | ||
223 | { | ||
224 | /* Pack the misc bits into a single Dword to pass to PLIC */ | ||
225 | union { | ||
226 | struct HvCallEvent_PackedDmaParms parms; | ||
227 | u64 dword; | ||
228 | } packed; | ||
229 | |||
230 | packed.parms.xDirection = direction; | ||
231 | packed.parms.xLocalAddrType = localAddressType; | ||
232 | packed.parms.xRemoteAddrType = remoteAddressType; | ||
233 | packed.parms.xRsvd1 = 0; | ||
234 | packed.parms.xRemoteLp = remoteLp; | ||
235 | packed.parms.xType = type; | ||
236 | packed.parms.xRsvd2 = 0; | ||
237 | packed.parms.xLocalInstId = localInstanceId; | ||
238 | packed.parms.xRemoteInstId = remoteInstanceId; | ||
239 | |||
240 | return (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle, packed.dword, | ||
241 | localAddrOrTce, remoteAddrOrTce, transferLength); | ||
242 | } | ||
243 | |||
244 | static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote, | ||
245 | u32 length, HvLpDma_Direction dir) | ||
246 | { | ||
247 | u64 abs_addr; | ||
248 | |||
249 | abs_addr = virt_to_abs(local); | ||
250 | return HvCall4(HvCallEventDmaToSp, abs_addr, remote, length, dir); | ||
251 | } | ||
252 | |||
253 | #endif /* _HVCALLEVENT_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvCallHpt.h b/include/asm-ppc64/iSeries/HvCallHpt.h deleted file mode 100644 index 43a1969230b8..000000000000 --- a/include/asm-ppc64/iSeries/HvCallHpt.h +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | /* | ||
2 | * HvCallHpt.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _HVCALLHPT_H | ||
20 | #define _HVCALLHPT_H | ||
21 | |||
22 | /* | ||
23 | * This file contains the "hypervisor call" interface which is used to | ||
24 | * drive the hypervisor from the OS. | ||
25 | */ | ||
26 | |||
27 | #include <asm/iSeries/HvCallSc.h> | ||
28 | #include <asm/iSeries/HvTypes.h> | ||
29 | #include <asm/mmu.h> | ||
30 | |||
31 | #define HvCallHptGetHptAddress HvCallHpt + 0 | ||
32 | #define HvCallHptGetHptPages HvCallHpt + 1 | ||
33 | #define HvCallHptSetPp HvCallHpt + 5 | ||
34 | #define HvCallHptSetSwBits HvCallHpt + 6 | ||
35 | #define HvCallHptUpdate HvCallHpt + 7 | ||
36 | #define HvCallHptInvalidateNoSyncICache HvCallHpt + 8 | ||
37 | #define HvCallHptGet HvCallHpt + 11 | ||
38 | #define HvCallHptFindNextValid HvCallHpt + 12 | ||
39 | #define HvCallHptFindValid HvCallHpt + 13 | ||
40 | #define HvCallHptAddValidate HvCallHpt + 16 | ||
41 | #define HvCallHptInvalidateSetSwBitsGet HvCallHpt + 18 | ||
42 | |||
43 | |||
44 | static inline u64 HvCallHpt_getHptAddress(void) | ||
45 | { | ||
46 | return HvCall0(HvCallHptGetHptAddress); | ||
47 | } | ||
48 | |||
49 | static inline u64 HvCallHpt_getHptPages(void) | ||
50 | { | ||
51 | return HvCall0(HvCallHptGetHptPages); | ||
52 | } | ||
53 | |||
54 | static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value) | ||
55 | { | ||
56 | HvCall2(HvCallHptSetPp, hpteIndex, value); | ||
57 | } | ||
58 | |||
59 | static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff) | ||
60 | { | ||
61 | HvCall3(HvCallHptSetSwBits, hpteIndex, bitson, bitsoff); | ||
62 | } | ||
63 | |||
64 | static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex) | ||
65 | { | ||
66 | HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); | ||
67 | } | ||
68 | |||
69 | static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, | ||
70 | u8 bitsoff) | ||
71 | { | ||
72 | u64 compressedStatus; | ||
73 | |||
74 | compressedStatus = HvCall4(HvCallHptInvalidateSetSwBitsGet, | ||
75 | hpteIndex, bitson, bitsoff, 1); | ||
76 | HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); | ||
77 | return compressedStatus; | ||
78 | } | ||
79 | |||
80 | static inline u64 HvCallHpt_findValid(hpte_t *hpte, u64 vpn) | ||
81 | { | ||
82 | return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0); | ||
83 | } | ||
84 | |||
85 | static inline u64 HvCallHpt_findNextValid(hpte_t *hpte, u32 hpteIndex, | ||
86 | u8 bitson, u8 bitsoff) | ||
87 | { | ||
88 | return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex, | ||
89 | bitson, bitsoff); | ||
90 | } | ||
91 | |||
92 | static inline void HvCallHpt_get(hpte_t *hpte, u32 hpteIndex) | ||
93 | { | ||
94 | HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); | ||
95 | } | ||
96 | |||
97 | static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, hpte_t *hpte) | ||
98 | { | ||
99 | HvCall4(HvCallHptAddValidate, hpteIndex, hBit, hpte->v, hpte->r); | ||
100 | } | ||
101 | |||
102 | #endif /* _HVCALLHPT_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvCallPci.h b/include/asm-ppc64/iSeries/HvCallPci.h deleted file mode 100644 index c8d675c40f5e..000000000000 --- a/include/asm-ppc64/iSeries/HvCallPci.h +++ /dev/null | |||
@@ -1,533 +0,0 @@ | |||
1 | /* | ||
2 | * Provides the Hypervisor PCI calls for iSeries Linux Parition. | ||
3 | * Copyright (C) 2001 <Wayne G Holm> <IBM Corporation> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the: | ||
17 | * Free Software Foundation, Inc., | ||
18 | * 59 Temple Place, Suite 330, | ||
19 | * Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | * Change Activity: | ||
22 | * Created, Jan 9, 2001 | ||
23 | */ | ||
24 | |||
25 | #ifndef _HVCALLPCI_H | ||
26 | #define _HVCALLPCI_H | ||
27 | |||
28 | #include <asm/iSeries/HvCallSc.h> | ||
29 | #include <asm/iSeries/HvTypes.h> | ||
30 | |||
31 | /* | ||
32 | * DSA == Direct Select Address | ||
33 | * this struct must be 64 bits in total | ||
34 | */ | ||
35 | struct HvCallPci_DsaAddr { | ||
36 | u16 busNumber; /* PHB index? */ | ||
37 | u8 subBusNumber; /* PCI bus number? */ | ||
38 | u8 deviceId; /* device and function? */ | ||
39 | u8 barNumber; | ||
40 | u8 reserved[3]; | ||
41 | }; | ||
42 | |||
43 | union HvDsaMap { | ||
44 | u64 DsaAddr; | ||
45 | struct HvCallPci_DsaAddr Dsa; | ||
46 | }; | ||
47 | |||
48 | struct HvCallPci_LoadReturn { | ||
49 | u64 rc; | ||
50 | u64 value; | ||
51 | }; | ||
52 | |||
53 | enum HvCallPci_DeviceType { | ||
54 | HvCallPci_NodeDevice = 1, | ||
55 | HvCallPci_SpDevice = 2, | ||
56 | HvCallPci_IopDevice = 3, | ||
57 | HvCallPci_BridgeDevice = 4, | ||
58 | HvCallPci_MultiFunctionDevice = 5, | ||
59 | HvCallPci_IoaDevice = 6 | ||
60 | }; | ||
61 | |||
62 | |||
63 | struct HvCallPci_DeviceInfo { | ||
64 | u32 deviceType; /* See DeviceType enum for values */ | ||
65 | }; | ||
66 | |||
67 | struct HvCallPci_BusUnitInfo { | ||
68 | u32 sizeReturned; /* length of data returned */ | ||
69 | u32 deviceType; /* see DeviceType enum for values */ | ||
70 | }; | ||
71 | |||
72 | struct HvCallPci_BridgeInfo { | ||
73 | struct HvCallPci_BusUnitInfo busUnitInfo; /* Generic bus unit info */ | ||
74 | u8 subBusNumber; /* Bus number of secondary bus */ | ||
75 | u8 maxAgents; /* Max idsels on secondary bus */ | ||
76 | u8 maxSubBusNumber; /* Max Sub Bus */ | ||
77 | u8 logicalSlotNumber; /* Logical Slot Number for IOA */ | ||
78 | }; | ||
79 | |||
80 | |||
81 | /* | ||
82 | * Maximum BusUnitInfo buffer size. Provided for clients so | ||
83 | * they can allocate a buffer big enough for any type of bus | ||
84 | * unit. Increase as needed. | ||
85 | */ | ||
86 | enum {HvCallPci_MaxBusUnitInfoSize = 128}; | ||
87 | |||
88 | struct HvCallPci_BarParms { | ||
89 | u64 vaddr; | ||
90 | u64 raddr; | ||
91 | u64 size; | ||
92 | u64 protectStart; | ||
93 | u64 protectEnd; | ||
94 | u64 relocationOffset; | ||
95 | u64 pciAddress; | ||
96 | u64 reserved[3]; | ||
97 | }; | ||
98 | |||
99 | enum HvCallPci_VpdType { | ||
100 | HvCallPci_BusVpd = 1, | ||
101 | HvCallPci_BusAdapterVpd = 2 | ||
102 | }; | ||
103 | |||
104 | #define HvCallPciConfigLoad8 HvCallPci + 0 | ||
105 | #define HvCallPciConfigLoad16 HvCallPci + 1 | ||
106 | #define HvCallPciConfigLoad32 HvCallPci + 2 | ||
107 | #define HvCallPciConfigStore8 HvCallPci + 3 | ||
108 | #define HvCallPciConfigStore16 HvCallPci + 4 | ||
109 | #define HvCallPciConfigStore32 HvCallPci + 5 | ||
110 | #define HvCallPciEoi HvCallPci + 16 | ||
111 | #define HvCallPciGetBarParms HvCallPci + 18 | ||
112 | #define HvCallPciMaskFisr HvCallPci + 20 | ||
113 | #define HvCallPciUnmaskFisr HvCallPci + 21 | ||
114 | #define HvCallPciSetSlotReset HvCallPci + 25 | ||
115 | #define HvCallPciGetDeviceInfo HvCallPci + 27 | ||
116 | #define HvCallPciGetCardVpd HvCallPci + 28 | ||
117 | #define HvCallPciBarLoad8 HvCallPci + 40 | ||
118 | #define HvCallPciBarLoad16 HvCallPci + 41 | ||
119 | #define HvCallPciBarLoad32 HvCallPci + 42 | ||
120 | #define HvCallPciBarLoad64 HvCallPci + 43 | ||
121 | #define HvCallPciBarStore8 HvCallPci + 44 | ||
122 | #define HvCallPciBarStore16 HvCallPci + 45 | ||
123 | #define HvCallPciBarStore32 HvCallPci + 46 | ||
124 | #define HvCallPciBarStore64 HvCallPci + 47 | ||
125 | #define HvCallPciMaskInterrupts HvCallPci + 48 | ||
126 | #define HvCallPciUnmaskInterrupts HvCallPci + 49 | ||
127 | #define HvCallPciGetBusUnitInfo HvCallPci + 50 | ||
128 | |||
129 | static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber, | ||
130 | u8 deviceId, u32 offset, u8 *value) | ||
131 | { | ||
132 | struct HvCallPci_DsaAddr dsa; | ||
133 | struct HvCallPci_LoadReturn retVal; | ||
134 | |||
135 | *((u64*)&dsa) = 0; | ||
136 | |||
137 | dsa.busNumber = busNumber; | ||
138 | dsa.subBusNumber = subBusNumber; | ||
139 | dsa.deviceId = deviceId; | ||
140 | |||
141 | HvCall3Ret16(HvCallPciConfigLoad8, &retVal, *(u64 *)&dsa, offset, 0); | ||
142 | |||
143 | *value = retVal.value; | ||
144 | |||
145 | return retVal.rc; | ||
146 | } | ||
147 | |||
148 | static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, | ||
149 | u8 deviceId, u32 offset, u16 *value) | ||
150 | { | ||
151 | struct HvCallPci_DsaAddr dsa; | ||
152 | struct HvCallPci_LoadReturn retVal; | ||
153 | |||
154 | *((u64*)&dsa) = 0; | ||
155 | |||
156 | dsa.busNumber = busNumber; | ||
157 | dsa.subBusNumber = subBusNumber; | ||
158 | dsa.deviceId = deviceId; | ||
159 | |||
160 | HvCall3Ret16(HvCallPciConfigLoad16, &retVal, *(u64 *)&dsa, offset, 0); | ||
161 | |||
162 | *value = retVal.value; | ||
163 | |||
164 | return retVal.rc; | ||
165 | } | ||
166 | |||
167 | static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber, | ||
168 | u8 deviceId, u32 offset, u32 *value) | ||
169 | { | ||
170 | struct HvCallPci_DsaAddr dsa; | ||
171 | struct HvCallPci_LoadReturn retVal; | ||
172 | |||
173 | *((u64*)&dsa) = 0; | ||
174 | |||
175 | dsa.busNumber = busNumber; | ||
176 | dsa.subBusNumber = subBusNumber; | ||
177 | dsa.deviceId = deviceId; | ||
178 | |||
179 | HvCall3Ret16(HvCallPciConfigLoad32, &retVal, *(u64 *)&dsa, offset, 0); | ||
180 | |||
181 | *value = retVal.value; | ||
182 | |||
183 | return retVal.rc; | ||
184 | } | ||
185 | |||
186 | static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, | ||
187 | u8 deviceId, u32 offset, u8 value) | ||
188 | { | ||
189 | struct HvCallPci_DsaAddr dsa; | ||
190 | |||
191 | *((u64*)&dsa) = 0; | ||
192 | |||
193 | dsa.busNumber = busNumber; | ||
194 | dsa.subBusNumber = subBusNumber; | ||
195 | dsa.deviceId = deviceId; | ||
196 | |||
197 | return HvCall4(HvCallPciConfigStore8, *(u64 *)&dsa, offset, value, 0); | ||
198 | } | ||
199 | |||
200 | static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber, | ||
201 | u8 deviceId, u32 offset, u16 value) | ||
202 | { | ||
203 | struct HvCallPci_DsaAddr dsa; | ||
204 | |||
205 | *((u64*)&dsa) = 0; | ||
206 | |||
207 | dsa.busNumber = busNumber; | ||
208 | dsa.subBusNumber = subBusNumber; | ||
209 | dsa.deviceId = deviceId; | ||
210 | |||
211 | return HvCall4(HvCallPciConfigStore16, *(u64 *)&dsa, offset, value, 0); | ||
212 | } | ||
213 | |||
214 | static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber, | ||
215 | u8 deviceId, u32 offset, u32 value) | ||
216 | { | ||
217 | struct HvCallPci_DsaAddr dsa; | ||
218 | |||
219 | *((u64*)&dsa) = 0; | ||
220 | |||
221 | dsa.busNumber = busNumber; | ||
222 | dsa.subBusNumber = subBusNumber; | ||
223 | dsa.deviceId = deviceId; | ||
224 | |||
225 | return HvCall4(HvCallPciConfigStore32, *(u64 *)&dsa, offset, value, 0); | ||
226 | } | ||
227 | |||
228 | static inline u64 HvCallPci_barLoad8(u16 busNumberParm, u8 subBusParm, | ||
229 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
230 | u8 *valueParm) | ||
231 | { | ||
232 | struct HvCallPci_DsaAddr dsa; | ||
233 | struct HvCallPci_LoadReturn retVal; | ||
234 | |||
235 | *((u64*)&dsa) = 0; | ||
236 | |||
237 | dsa.busNumber = busNumberParm; | ||
238 | dsa.subBusNumber = subBusParm; | ||
239 | dsa.deviceId = deviceIdParm; | ||
240 | dsa.barNumber = barNumberParm; | ||
241 | |||
242 | HvCall3Ret16(HvCallPciBarLoad8, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
243 | |||
244 | *valueParm = retVal.value; | ||
245 | |||
246 | return retVal.rc; | ||
247 | } | ||
248 | |||
249 | static inline u64 HvCallPci_barLoad16(u16 busNumberParm, u8 subBusParm, | ||
250 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
251 | u16 *valueParm) | ||
252 | { | ||
253 | struct HvCallPci_DsaAddr dsa; | ||
254 | struct HvCallPci_LoadReturn retVal; | ||
255 | |||
256 | *((u64*)&dsa) = 0; | ||
257 | |||
258 | dsa.busNumber = busNumberParm; | ||
259 | dsa.subBusNumber = subBusParm; | ||
260 | dsa.deviceId = deviceIdParm; | ||
261 | dsa.barNumber = barNumberParm; | ||
262 | |||
263 | HvCall3Ret16(HvCallPciBarLoad16, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
264 | |||
265 | *valueParm = retVal.value; | ||
266 | |||
267 | return retVal.rc; | ||
268 | } | ||
269 | |||
270 | static inline u64 HvCallPci_barLoad32(u16 busNumberParm, u8 subBusParm, | ||
271 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
272 | u32 *valueParm) | ||
273 | { | ||
274 | struct HvCallPci_DsaAddr dsa; | ||
275 | struct HvCallPci_LoadReturn retVal; | ||
276 | |||
277 | *((u64*)&dsa) = 0; | ||
278 | |||
279 | dsa.busNumber = busNumberParm; | ||
280 | dsa.subBusNumber = subBusParm; | ||
281 | dsa.deviceId = deviceIdParm; | ||
282 | dsa.barNumber = barNumberParm; | ||
283 | |||
284 | HvCall3Ret16(HvCallPciBarLoad32, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
285 | |||
286 | *valueParm = retVal.value; | ||
287 | |||
288 | return retVal.rc; | ||
289 | } | ||
290 | |||
291 | static inline u64 HvCallPci_barLoad64(u16 busNumberParm, u8 subBusParm, | ||
292 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
293 | u64 *valueParm) | ||
294 | { | ||
295 | struct HvCallPci_DsaAddr dsa; | ||
296 | struct HvCallPci_LoadReturn retVal; | ||
297 | |||
298 | *((u64*)&dsa) = 0; | ||
299 | |||
300 | dsa.busNumber = busNumberParm; | ||
301 | dsa.subBusNumber = subBusParm; | ||
302 | dsa.deviceId = deviceIdParm; | ||
303 | dsa.barNumber = barNumberParm; | ||
304 | |||
305 | HvCall3Ret16(HvCallPciBarLoad64, &retVal, *(u64 *)&dsa, offsetParm, 0); | ||
306 | |||
307 | *valueParm = retVal.value; | ||
308 | |||
309 | return retVal.rc; | ||
310 | } | ||
311 | |||
312 | static inline u64 HvCallPci_barStore8(u16 busNumberParm, u8 subBusParm, | ||
313 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
314 | u8 valueParm) | ||
315 | { | ||
316 | struct HvCallPci_DsaAddr dsa; | ||
317 | |||
318 | *((u64*)&dsa) = 0; | ||
319 | |||
320 | dsa.busNumber = busNumberParm; | ||
321 | dsa.subBusNumber = subBusParm; | ||
322 | dsa.deviceId = deviceIdParm; | ||
323 | dsa.barNumber = barNumberParm; | ||
324 | |||
325 | return HvCall4(HvCallPciBarStore8, *(u64 *)&dsa, offsetParm, | ||
326 | valueParm, 0); | ||
327 | } | ||
328 | |||
329 | static inline u64 HvCallPci_barStore16(u16 busNumberParm, u8 subBusParm, | ||
330 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
331 | u16 valueParm) | ||
332 | { | ||
333 | struct HvCallPci_DsaAddr dsa; | ||
334 | |||
335 | *((u64*)&dsa) = 0; | ||
336 | |||
337 | dsa.busNumber = busNumberParm; | ||
338 | dsa.subBusNumber = subBusParm; | ||
339 | dsa.deviceId = deviceIdParm; | ||
340 | dsa.barNumber = barNumberParm; | ||
341 | |||
342 | return HvCall4(HvCallPciBarStore16, *(u64 *)&dsa, offsetParm, | ||
343 | valueParm, 0); | ||
344 | } | ||
345 | |||
346 | static inline u64 HvCallPci_barStore32(u16 busNumberParm, u8 subBusParm, | ||
347 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
348 | u32 valueParm) | ||
349 | { | ||
350 | struct HvCallPci_DsaAddr dsa; | ||
351 | |||
352 | *((u64*)&dsa) = 0; | ||
353 | |||
354 | dsa.busNumber = busNumberParm; | ||
355 | dsa.subBusNumber = subBusParm; | ||
356 | dsa.deviceId = deviceIdParm; | ||
357 | dsa.barNumber = barNumberParm; | ||
358 | |||
359 | return HvCall4(HvCallPciBarStore32, *(u64 *)&dsa, offsetParm, | ||
360 | valueParm, 0); | ||
361 | } | ||
362 | |||
363 | static inline u64 HvCallPci_barStore64(u16 busNumberParm, u8 subBusParm, | ||
364 | u8 deviceIdParm, u8 barNumberParm, u64 offsetParm, | ||
365 | u64 valueParm) | ||
366 | { | ||
367 | struct HvCallPci_DsaAddr dsa; | ||
368 | |||
369 | *((u64*)&dsa) = 0; | ||
370 | |||
371 | dsa.busNumber = busNumberParm; | ||
372 | dsa.subBusNumber = subBusParm; | ||
373 | dsa.deviceId = deviceIdParm; | ||
374 | dsa.barNumber = barNumberParm; | ||
375 | |||
376 | return HvCall4(HvCallPciBarStore64, *(u64 *)&dsa, offsetParm, | ||
377 | valueParm, 0); | ||
378 | } | ||
379 | |||
380 | static inline u64 HvCallPci_eoi(u16 busNumberParm, u8 subBusParm, | ||
381 | u8 deviceIdParm) | ||
382 | { | ||
383 | struct HvCallPci_DsaAddr dsa; | ||
384 | struct HvCallPci_LoadReturn retVal; | ||
385 | |||
386 | *((u64*)&dsa) = 0; | ||
387 | |||
388 | dsa.busNumber = busNumberParm; | ||
389 | dsa.subBusNumber = subBusParm; | ||
390 | dsa.deviceId = deviceIdParm; | ||
391 | |||
392 | HvCall1Ret16(HvCallPciEoi, &retVal, *(u64*)&dsa); | ||
393 | |||
394 | return retVal.rc; | ||
395 | } | ||
396 | |||
397 | static inline u64 HvCallPci_getBarParms(u16 busNumberParm, u8 subBusParm, | ||
398 | u8 deviceIdParm, u8 barNumberParm, u64 parms, u32 sizeofParms) | ||
399 | { | ||
400 | struct HvCallPci_DsaAddr dsa; | ||
401 | |||
402 | *((u64*)&dsa) = 0; | ||
403 | |||
404 | dsa.busNumber = busNumberParm; | ||
405 | dsa.subBusNumber = subBusParm; | ||
406 | dsa.deviceId = deviceIdParm; | ||
407 | dsa.barNumber = barNumberParm; | ||
408 | |||
409 | return HvCall3(HvCallPciGetBarParms, *(u64*)&dsa, parms, sizeofParms); | ||
410 | } | ||
411 | |||
412 | static inline u64 HvCallPci_maskFisr(u16 busNumberParm, u8 subBusParm, | ||
413 | u8 deviceIdParm, u64 fisrMask) | ||
414 | { | ||
415 | struct HvCallPci_DsaAddr dsa; | ||
416 | |||
417 | *((u64*)&dsa) = 0; | ||
418 | |||
419 | dsa.busNumber = busNumberParm; | ||
420 | dsa.subBusNumber = subBusParm; | ||
421 | dsa.deviceId = deviceIdParm; | ||
422 | |||
423 | return HvCall2(HvCallPciMaskFisr, *(u64*)&dsa, fisrMask); | ||
424 | } | ||
425 | |||
426 | static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, u8 subBusParm, | ||
427 | u8 deviceIdParm, u64 fisrMask) | ||
428 | { | ||
429 | struct HvCallPci_DsaAddr dsa; | ||
430 | |||
431 | *((u64*)&dsa) = 0; | ||
432 | |||
433 | dsa.busNumber = busNumberParm; | ||
434 | dsa.subBusNumber = subBusParm; | ||
435 | dsa.deviceId = deviceIdParm; | ||
436 | |||
437 | return HvCall2(HvCallPciUnmaskFisr, *(u64*)&dsa, fisrMask); | ||
438 | } | ||
439 | |||
440 | static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, u8 subBusParm, | ||
441 | u8 deviceIdParm, u64 onNotOff) | ||
442 | { | ||
443 | struct HvCallPci_DsaAddr dsa; | ||
444 | |||
445 | *((u64*)&dsa) = 0; | ||
446 | |||
447 | dsa.busNumber = busNumberParm; | ||
448 | dsa.subBusNumber = subBusParm; | ||
449 | dsa.deviceId = deviceIdParm; | ||
450 | |||
451 | return HvCall2(HvCallPciSetSlotReset, *(u64*)&dsa, onNotOff); | ||
452 | } | ||
453 | |||
454 | static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, u8 subBusParm, | ||
455 | u8 deviceNumberParm, u64 parms, u32 sizeofParms) | ||
456 | { | ||
457 | struct HvCallPci_DsaAddr dsa; | ||
458 | |||
459 | *((u64*)&dsa) = 0; | ||
460 | |||
461 | dsa.busNumber = busNumberParm; | ||
462 | dsa.subBusNumber = subBusParm; | ||
463 | dsa.deviceId = deviceNumberParm << 4; | ||
464 | |||
465 | return HvCall3(HvCallPciGetDeviceInfo, *(u64*)&dsa, parms, sizeofParms); | ||
466 | } | ||
467 | |||
468 | static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm, u8 subBusParm, | ||
469 | u8 deviceIdParm, u64 interruptMask) | ||
470 | { | ||
471 | struct HvCallPci_DsaAddr dsa; | ||
472 | |||
473 | *((u64*)&dsa) = 0; | ||
474 | |||
475 | dsa.busNumber = busNumberParm; | ||
476 | dsa.subBusNumber = subBusParm; | ||
477 | dsa.deviceId = deviceIdParm; | ||
478 | |||
479 | return HvCall2(HvCallPciMaskInterrupts, *(u64*)&dsa, interruptMask); | ||
480 | } | ||
481 | |||
482 | static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm, u8 subBusParm, | ||
483 | u8 deviceIdParm, u64 interruptMask) | ||
484 | { | ||
485 | struct HvCallPci_DsaAddr dsa; | ||
486 | |||
487 | *((u64*)&dsa) = 0; | ||
488 | |||
489 | dsa.busNumber = busNumberParm; | ||
490 | dsa.subBusNumber = subBusParm; | ||
491 | dsa.deviceId = deviceIdParm; | ||
492 | |||
493 | return HvCall2(HvCallPciUnmaskInterrupts, *(u64*)&dsa, interruptMask); | ||
494 | } | ||
495 | |||
496 | static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm, u8 subBusParm, | ||
497 | u8 deviceIdParm, u64 parms, u32 sizeofParms) | ||
498 | { | ||
499 | struct HvCallPci_DsaAddr dsa; | ||
500 | |||
501 | *((u64*)&dsa) = 0; | ||
502 | |||
503 | dsa.busNumber = busNumberParm; | ||
504 | dsa.subBusNumber = subBusParm; | ||
505 | dsa.deviceId = deviceIdParm; | ||
506 | |||
507 | return HvCall3(HvCallPciGetBusUnitInfo, *(u64*)&dsa, parms, | ||
508 | sizeofParms); | ||
509 | } | ||
510 | |||
511 | static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm, | ||
512 | u16 sizeParm) | ||
513 | { | ||
514 | u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, | ||
515 | sizeParm, HvCallPci_BusVpd); | ||
516 | if (xRc == -1) | ||
517 | return -1; | ||
518 | else | ||
519 | return xRc & 0xFFFF; | ||
520 | } | ||
521 | |||
522 | static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, | ||
523 | u16 sizeParm) | ||
524 | { | ||
525 | u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, | ||
526 | sizeParm, HvCallPci_BusAdapterVpd); | ||
527 | if (xRc == -1) | ||
528 | return -1; | ||
529 | else | ||
530 | return xRc & 0xFFFF; | ||
531 | } | ||
532 | |||
533 | #endif /* _HVCALLPCI_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvCallSc.h b/include/asm-ppc64/iSeries/HvCallSc.h deleted file mode 100644 index a62cef3822f9..000000000000 --- a/include/asm-ppc64/iSeries/HvCallSc.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * HvCallSc.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _HVCALLSC_H | ||
20 | #define _HVCALLSC_H | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | |||
24 | #define HvCallBase 0x8000000000000000ul | ||
25 | #define HvCallCc 0x8001000000000000ul | ||
26 | #define HvCallCfg 0x8002000000000000ul | ||
27 | #define HvCallEvent 0x8003000000000000ul | ||
28 | #define HvCallHpt 0x8004000000000000ul | ||
29 | #define HvCallPci 0x8005000000000000ul | ||
30 | #define HvCallSm 0x8007000000000000ul | ||
31 | #define HvCallXm 0x8009000000000000ul | ||
32 | |||
33 | extern u64 HvCall0(u64); | ||
34 | extern u64 HvCall1(u64, u64); | ||
35 | extern u64 HvCall2(u64, u64, u64); | ||
36 | extern u64 HvCall3(u64, u64, u64, u64); | ||
37 | extern u64 HvCall4(u64, u64, u64, u64, u64); | ||
38 | extern u64 HvCall5(u64, u64, u64, u64, u64, u64); | ||
39 | extern u64 HvCall6(u64, u64, u64, u64, u64, u64, u64); | ||
40 | extern u64 HvCall7(u64, u64, u64, u64, u64, u64, u64, u64); | ||
41 | |||
42 | extern u64 HvCall0Ret16(u64, void *); | ||
43 | extern u64 HvCall1Ret16(u64, void *, u64); | ||
44 | extern u64 HvCall2Ret16(u64, void *, u64, u64); | ||
45 | extern u64 HvCall3Ret16(u64, void *, u64, u64, u64); | ||
46 | extern u64 HvCall4Ret16(u64, void *, u64, u64, u64, u64); | ||
47 | extern u64 HvCall5Ret16(u64, void *, u64, u64, u64, u64, u64); | ||
48 | extern u64 HvCall6Ret16(u64, void *, u64, u64, u64, u64, u64, u64); | ||
49 | extern u64 HvCall7Ret16(u64, void *, u64, u64 ,u64 ,u64 ,u64 ,u64 ,u64); | ||
50 | |||
51 | #endif /* _HVCALLSC_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvCallSm.h b/include/asm-ppc64/iSeries/HvCallSm.h deleted file mode 100644 index 8a3dbb071a43..000000000000 --- a/include/asm-ppc64/iSeries/HvCallSm.h +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | * HvCallSm.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _HVCALLSM_H | ||
20 | #define _HVCALLSM_H | ||
21 | |||
22 | /* | ||
23 | * This file contains the "hypervisor call" interface which is used to | ||
24 | * drive the hypervisor from the OS. | ||
25 | */ | ||
26 | |||
27 | #include <asm/iSeries/HvCallSc.h> | ||
28 | #include <asm/iSeries/HvTypes.h> | ||
29 | |||
30 | #define HvCallSmGet64BitsOfAccessMap HvCallSm + 11 | ||
31 | |||
32 | static inline u64 HvCallSm_get64BitsOfAccessMap(HvLpIndex lpIndex, | ||
33 | u64 indexIntoBitMap) | ||
34 | { | ||
35 | return HvCall2(HvCallSmGet64BitsOfAccessMap, lpIndex, indexIntoBitMap); | ||
36 | } | ||
37 | |||
38 | #endif /* _HVCALLSM_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvCallXm.h b/include/asm-ppc64/iSeries/HvCallXm.h deleted file mode 100644 index 8b9ba608daaf..000000000000 --- a/include/asm-ppc64/iSeries/HvCallXm.h +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* | ||
2 | * This file contains the "hypervisor call" interface which is used to | ||
3 | * drive the hypervisor from SLIC. | ||
4 | */ | ||
5 | #ifndef _HVCALLXM_H | ||
6 | #define _HVCALLXM_H | ||
7 | |||
8 | #include <asm/iSeries/HvCallSc.h> | ||
9 | #include <asm/iSeries/HvTypes.h> | ||
10 | |||
11 | #define HvCallXmGetTceTableParms HvCallXm + 0 | ||
12 | #define HvCallXmTestBus HvCallXm + 1 | ||
13 | #define HvCallXmConnectBusUnit HvCallXm + 2 | ||
14 | #define HvCallXmLoadTod HvCallXm + 8 | ||
15 | #define HvCallXmTestBusUnit HvCallXm + 9 | ||
16 | #define HvCallXmSetTce HvCallXm + 11 | ||
17 | #define HvCallXmSetTces HvCallXm + 13 | ||
18 | |||
19 | /* | ||
20 | * Structure passed to HvCallXm_getTceTableParms | ||
21 | */ | ||
22 | struct iommu_table_cb { | ||
23 | unsigned long itc_busno; /* Bus number for this tce table */ | ||
24 | unsigned long itc_start; /* Will be NULL for secondary */ | ||
25 | unsigned long itc_totalsize; /* Size (in pages) of whole table */ | ||
26 | unsigned long itc_offset; /* Index into real tce table of the | ||
27 | start of our section */ | ||
28 | unsigned long itc_size; /* Size (in pages) of our section */ | ||
29 | unsigned long itc_index; /* Index of this tce table */ | ||
30 | unsigned short itc_maxtables; /* Max num of tables for partition */ | ||
31 | unsigned char itc_virtbus; /* Flag to indicate virtual bus */ | ||
32 | unsigned char itc_slotno; /* IOA Tce Slot Index */ | ||
33 | unsigned char itc_rsvd[4]; | ||
34 | }; | ||
35 | |||
36 | static inline void HvCallXm_getTceTableParms(u64 cb) | ||
37 | { | ||
38 | HvCall1(HvCallXmGetTceTableParms, cb); | ||
39 | } | ||
40 | |||
41 | static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce) | ||
42 | { | ||
43 | return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce); | ||
44 | } | ||
45 | |||
46 | static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, | ||
47 | u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4) | ||
48 | { | ||
49 | return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces, | ||
50 | tce1, tce2, tce3, tce4); | ||
51 | } | ||
52 | |||
53 | static inline u64 HvCallXm_testBus(u16 busNumber) | ||
54 | { | ||
55 | return HvCall1(HvCallXmTestBus, busNumber); | ||
56 | } | ||
57 | |||
58 | static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, | ||
59 | u8 deviceId) | ||
60 | { | ||
61 | return HvCall2(HvCallXmTestBusUnit, busNumber, | ||
62 | (subBusNumber << 8) | deviceId); | ||
63 | } | ||
64 | |||
65 | static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, | ||
66 | u8 deviceId, u64 interruptToken) | ||
67 | { | ||
68 | return HvCall5(HvCallXmConnectBusUnit, busNumber, | ||
69 | (subBusNumber << 8) | deviceId, interruptToken, 0, | ||
70 | 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */); | ||
71 | } | ||
72 | |||
73 | static inline u64 HvCallXm_loadTod(void) | ||
74 | { | ||
75 | return HvCall0(HvCallXmLoadTod); | ||
76 | } | ||
77 | |||
78 | #endif /* _HVCALLXM_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvLpConfig.h b/include/asm-ppc64/iSeries/HvLpConfig.h deleted file mode 100644 index f1cf1e70ca3c..000000000000 --- a/include/asm-ppc64/iSeries/HvLpConfig.h +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | /* | ||
2 | * HvLpConfig.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _HVLPCONFIG_H | ||
20 | #define _HVLPCONFIG_H | ||
21 | |||
22 | /* | ||
23 | * This file contains the interface to the LPAR configuration data | ||
24 | * to determine which resources should be allocated to each partition. | ||
25 | */ | ||
26 | |||
27 | #include <asm/iSeries/HvCallSc.h> | ||
28 | #include <asm/iSeries/HvTypes.h> | ||
29 | #include <asm/iSeries/ItLpNaca.h> | ||
30 | |||
31 | enum { | ||
32 | HvCallCfg_Cur = 0, | ||
33 | HvCallCfg_Init = 1, | ||
34 | HvCallCfg_Max = 2, | ||
35 | HvCallCfg_Min = 3 | ||
36 | }; | ||
37 | |||
38 | #define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6 | ||
39 | #define HvCallCfgGetPhysicalProcessors HvCallCfg + 7 | ||
40 | #define HvCallCfgGetMsChunks HvCallCfg + 9 | ||
41 | #define HvCallCfgGetSharedPoolIndex HvCallCfg + 20 | ||
42 | #define HvCallCfgGetSharedProcUnits HvCallCfg + 21 | ||
43 | #define HvCallCfgGetNumProcsInSharedPool HvCallCfg + 22 | ||
44 | #define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30 | ||
45 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 | ||
46 | |||
47 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); | ||
48 | |||
49 | static inline HvLpIndex HvLpConfig_getLpIndex(void) | ||
50 | { | ||
51 | return itLpNaca.xLpIndex; | ||
52 | } | ||
53 | |||
54 | static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) | ||
55 | { | ||
56 | return itLpNaca.xPrimaryLpIndex; | ||
57 | } | ||
58 | |||
59 | static inline u64 HvLpConfig_getMsChunks(void) | ||
60 | { | ||
61 | return HvCall2(HvCallCfgGetMsChunks, HvLpConfig_getLpIndex(), | ||
62 | HvCallCfg_Cur); | ||
63 | } | ||
64 | |||
65 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) | ||
66 | { | ||
67 | return HvCall0(HvCallCfgGetSystemPhysicalProcessors); | ||
68 | } | ||
69 | |||
70 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) | ||
71 | { | ||
72 | return (u16)HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI); | ||
73 | } | ||
74 | |||
75 | static inline u64 HvLpConfig_getPhysicalProcessors(void) | ||
76 | { | ||
77 | return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(), | ||
78 | HvCallCfg_Cur); | ||
79 | } | ||
80 | |||
81 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) | ||
82 | { | ||
83 | return HvCall1(HvCallCfgGetSharedPoolIndex, HvLpConfig_getLpIndex()); | ||
84 | } | ||
85 | |||
86 | static inline u64 HvLpConfig_getSharedProcUnits(void) | ||
87 | { | ||
88 | return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(), | ||
89 | HvCallCfg_Cur); | ||
90 | } | ||
91 | |||
92 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) | ||
93 | { | ||
94 | return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(), | ||
95 | HvCallCfg_Max); | ||
96 | } | ||
97 | |||
98 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) | ||
99 | { | ||
100 | return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(), | ||
101 | HvCallCfg_Max); | ||
102 | } | ||
103 | |||
104 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp( | ||
105 | HvLpIndex lp) | ||
106 | { | ||
107 | /* | ||
108 | * This is a new function in V5R1 so calls to this on older | ||
109 | * hypervisors will return -1 | ||
110 | */ | ||
111 | u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp); | ||
112 | if (retVal == -1) | ||
113 | retVal = 0; | ||
114 | return retVal; | ||
115 | } | ||
116 | |||
117 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) | ||
118 | { | ||
119 | return HvLpConfig_getVirtualLanIndexMapForLp( | ||
120 | HvLpConfig_getLpIndex_outline()); | ||
121 | } | ||
122 | |||
123 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, | ||
124 | HvLpIndex lp2) | ||
125 | { | ||
126 | HvLpVirtualLanIndexMap virtualLanIndexMap1 = | ||
127 | HvLpConfig_getVirtualLanIndexMapForLp(lp1); | ||
128 | HvLpVirtualLanIndexMap virtualLanIndexMap2 = | ||
129 | HvLpConfig_getVirtualLanIndexMapForLp(lp2); | ||
130 | return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0); | ||
131 | } | ||
132 | |||
133 | static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp) | ||
134 | { | ||
135 | return HvCall1(HvCallCfgGetHostingLpIndex, lp); | ||
136 | } | ||
137 | |||
138 | #endif /* _HVLPCONFIG_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvLpEvent.h b/include/asm-ppc64/iSeries/HvLpEvent.h deleted file mode 100644 index 865000de79b6..000000000000 --- a/include/asm-ppc64/iSeries/HvLpEvent.h +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | /* | ||
2 | * HvLpEvent.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | /* This file contains the class for HV events in the system. */ | ||
21 | |||
22 | #ifndef _HVLPEVENT_H | ||
23 | #define _HVLPEVENT_H | ||
24 | |||
25 | #include <asm/types.h> | ||
26 | #include <asm/ptrace.h> | ||
27 | #include <asm/iSeries/HvTypes.h> | ||
28 | #include <asm/iSeries/HvCallEvent.h> | ||
29 | |||
30 | /* | ||
31 | * HvLpEvent is the structure for Lp Event messages passed between | ||
32 | * partitions through PLIC. | ||
33 | */ | ||
34 | |||
35 | struct HvEventFlags { | ||
36 | u8 xValid:1; /* Indicates a valid request x00-x00 */ | ||
37 | u8 xRsvd1:4; /* Reserved ... */ | ||
38 | u8 xAckType:1; /* Immediate or deferred ... */ | ||
39 | u8 xAckInd:1; /* Indicates if ACK required ... */ | ||
40 | u8 xFunction:1; /* Interrupt or Acknowledge ... */ | ||
41 | }; | ||
42 | |||
43 | |||
44 | struct HvLpEvent { | ||
45 | struct HvEventFlags xFlags; /* Event flags x00-x00 */ | ||
46 | u8 xType; /* Type of message x01-x01 */ | ||
47 | u16 xSubtype; /* Subtype for event x02-x03 */ | ||
48 | u8 xSourceLp; /* Source LP x04-x04 */ | ||
49 | u8 xTargetLp; /* Target LP x05-x05 */ | ||
50 | u8 xSizeMinus1; /* Size of Derived class - 1 x06-x06 */ | ||
51 | u8 xRc; /* RC for Ack flows x07-x07 */ | ||
52 | u16 xSourceInstanceId; /* Source sides instance id x08-x09 */ | ||
53 | u16 xTargetInstanceId; /* Target sides instance id x0A-x0B */ | ||
54 | union { | ||
55 | u32 xSubtypeData; /* Data usable by the subtype x0C-x0F */ | ||
56 | u16 xSubtypeDataShort[2]; /* Data as 2 shorts */ | ||
57 | u8 xSubtypeDataChar[4]; /* Data as 4 chars */ | ||
58 | } x; | ||
59 | |||
60 | u64 xCorrelationToken; /* Unique value for source/type x10-x17 */ | ||
61 | }; | ||
62 | |||
63 | typedef void (*LpEventHandler)(struct HvLpEvent *, struct pt_regs *); | ||
64 | |||
65 | /* Register a handler for an event type - returns 0 on success */ | ||
66 | extern int HvLpEvent_registerHandler(HvLpEvent_Type eventType, | ||
67 | LpEventHandler hdlr); | ||
68 | |||
69 | /* | ||
70 | * Unregister a handler for an event type | ||
71 | * | ||
72 | * This call will sleep until the handler being removed is guaranteed to | ||
73 | * be no longer executing on any CPU. Do not call with locks held. | ||
74 | * | ||
75 | * returns 0 on success | ||
76 | * Unregister will fail if there are any paths open for the type | ||
77 | */ | ||
78 | extern int HvLpEvent_unregisterHandler(HvLpEvent_Type eventType); | ||
79 | |||
80 | /* | ||
81 | * Open an Lp Event Path for an event type | ||
82 | * returns 0 on success | ||
83 | * openPath will fail if there is no handler registered for the event type. | ||
84 | * The lpIndex specified is the partition index for the target partition | ||
85 | * (for VirtualIo, VirtualLan and SessionMgr) other types specify zero) | ||
86 | */ | ||
87 | extern int HvLpEvent_openPath(HvLpEvent_Type eventType, HvLpIndex lpIndex); | ||
88 | |||
89 | /* | ||
90 | * Close an Lp Event Path for a type and partition | ||
91 | * returns 0 on sucess | ||
92 | */ | ||
93 | extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex); | ||
94 | |||
95 | #define HvLpEvent_Type_Hypervisor 0 | ||
96 | #define HvLpEvent_Type_MachineFac 1 | ||
97 | #define HvLpEvent_Type_SessionMgr 2 | ||
98 | #define HvLpEvent_Type_SpdIo 3 | ||
99 | #define HvLpEvent_Type_VirtualBus 4 | ||
100 | #define HvLpEvent_Type_PciIo 5 | ||
101 | #define HvLpEvent_Type_RioIo 6 | ||
102 | #define HvLpEvent_Type_VirtualLan 7 | ||
103 | #define HvLpEvent_Type_VirtualIo 8 | ||
104 | #define HvLpEvent_Type_NumTypes 9 | ||
105 | |||
106 | #define HvLpEvent_Rc_Good 0 | ||
107 | #define HvLpEvent_Rc_BufferNotAvailable 1 | ||
108 | #define HvLpEvent_Rc_Cancelled 2 | ||
109 | #define HvLpEvent_Rc_GenericError 3 | ||
110 | #define HvLpEvent_Rc_InvalidAddress 4 | ||
111 | #define HvLpEvent_Rc_InvalidPartition 5 | ||
112 | #define HvLpEvent_Rc_InvalidSize 6 | ||
113 | #define HvLpEvent_Rc_InvalidSubtype 7 | ||
114 | #define HvLpEvent_Rc_InvalidSubtypeData 8 | ||
115 | #define HvLpEvent_Rc_InvalidType 9 | ||
116 | #define HvLpEvent_Rc_PartitionDead 10 | ||
117 | #define HvLpEvent_Rc_PathClosed 11 | ||
118 | #define HvLpEvent_Rc_SubtypeError 12 | ||
119 | |||
120 | #define HvLpEvent_Function_Ack 0 | ||
121 | #define HvLpEvent_Function_Int 1 | ||
122 | |||
123 | #define HvLpEvent_AckInd_NoAck 0 | ||
124 | #define HvLpEvent_AckInd_DoAck 1 | ||
125 | |||
126 | #define HvLpEvent_AckType_ImmediateAck 0 | ||
127 | #define HvLpEvent_AckType_DeferredAck 1 | ||
128 | |||
129 | #define HvLpDma_Direction_LocalToRemote 0 | ||
130 | #define HvLpDma_Direction_RemoteToLocal 1 | ||
131 | |||
132 | #define HvLpDma_AddressType_TceIndex 0 | ||
133 | #define HvLpDma_AddressType_RealAddress 1 | ||
134 | |||
135 | #define HvLpDma_Rc_Good 0 | ||
136 | #define HvLpDma_Rc_Error 1 | ||
137 | #define HvLpDma_Rc_PartitionDead 2 | ||
138 | #define HvLpDma_Rc_PathClosed 3 | ||
139 | #define HvLpDma_Rc_InvalidAddress 4 | ||
140 | #define HvLpDma_Rc_InvalidLength 5 | ||
141 | |||
142 | #endif /* _HVLPEVENT_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvReleaseData.h b/include/asm-ppc64/iSeries/HvReleaseData.h deleted file mode 100644 index c8162e5ccb21..000000000000 --- a/include/asm-ppc64/iSeries/HvReleaseData.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | * HvReleaseData.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _HVRELEASEDATA_H | ||
20 | #define _HVRELEASEDATA_H | ||
21 | |||
22 | /* | ||
23 | * This control block contains the critical information about the | ||
24 | * release so that it can be changed in the future (ie, the virtual | ||
25 | * address of the OS's NACA). | ||
26 | */ | ||
27 | #include <asm/types.h> | ||
28 | #include <asm/naca.h> | ||
29 | |||
30 | /* | ||
31 | * When we IPL a secondary partition, we will check if if the | ||
32 | * secondary xMinPlicVrmIndex > the primary xVrmIndex. | ||
33 | * If it is then this tells PLIC that this secondary is not | ||
34 | * supported running on this "old" of a level of PLIC. | ||
35 | * | ||
36 | * Likewise, we will compare the primary xMinSlicVrmIndex to | ||
37 | * the secondary xVrmIndex. | ||
38 | * If the primary xMinSlicVrmDelta > secondary xVrmDelta then we | ||
39 | * know that this PLIC does not support running an OS "that old". | ||
40 | */ | ||
41 | |||
42 | #define HVREL_TAGSINACTIVE 0x8000 | ||
43 | #define HVREL_32BIT 0x4000 | ||
44 | #define HVREL_NOSHAREDPROCS 0x2000 | ||
45 | #define HVREL_NOHMT 0x1000 | ||
46 | |||
47 | struct HvReleaseData { | ||
48 | u32 xDesc; /* Descriptor "HvRD" ebcdic x00-x03 */ | ||
49 | u16 xSize; /* Size of this control block x04-x05 */ | ||
50 | u16 xVpdAreasPtrOffset; /* Offset in NACA of ItVpdAreas x06-x07 */ | ||
51 | struct naca_struct *xSlicNacaAddr; /* Virt addr of SLIC NACA x08-x0F */ | ||
52 | u32 xMsNucDataOffset; /* Offset of Linux Mapping Data x10-x13 */ | ||
53 | u32 xRsvd1; /* Reserved x14-x17 */ | ||
54 | u16 xFlags; | ||
55 | u16 xVrmIndex; /* VRM Index of OS image x1A-x1B */ | ||
56 | u16 xMinSupportedPlicVrmIndex; /* Min PLIC level (soft) x1C-x1D */ | ||
57 | u16 xMinCompatablePlicVrmIndex; /* Min PLIC levelP (hard) x1E-x1F */ | ||
58 | char xVrmName[12]; /* Displayable name x20-x2B */ | ||
59 | char xRsvd3[20]; /* Reserved x2C-x3F */ | ||
60 | }; | ||
61 | |||
62 | extern struct HvReleaseData hvReleaseData; | ||
63 | |||
64 | #endif /* _HVRELEASEDATA_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvTypes.h b/include/asm-ppc64/iSeries/HvTypes.h deleted file mode 100644 index b1ef2b4cb3e3..000000000000 --- a/include/asm-ppc64/iSeries/HvTypes.h +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * HvTypes.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _HVTYPES_H | ||
20 | #define _HVTYPES_H | ||
21 | |||
22 | /* | ||
23 | * General typedefs for the hypervisor. | ||
24 | */ | ||
25 | |||
26 | #include <asm/types.h> | ||
27 | |||
28 | typedef u8 HvLpIndex; | ||
29 | typedef u16 HvLpInstanceId; | ||
30 | typedef u64 HvLpTOD; | ||
31 | typedef u64 HvLpSystemSerialNum; | ||
32 | typedef u8 HvLpDeviceSerialNum[12]; | ||
33 | typedef u16 HvLpSanHwSet; | ||
34 | typedef u16 HvLpBus; | ||
35 | typedef u16 HvLpBoard; | ||
36 | typedef u16 HvLpCard; | ||
37 | typedef u8 HvLpDeviceType[4]; | ||
38 | typedef u8 HvLpDeviceModel[3]; | ||
39 | typedef u64 HvIoToken; | ||
40 | typedef u8 HvLpName[8]; | ||
41 | typedef u32 HvIoId; | ||
42 | typedef u64 HvRealMemoryIndex; | ||
43 | typedef u32 HvLpIndexMap; /* Must hold HVMAXARCHITECTEDLPS bits!!! */ | ||
44 | typedef u16 HvLpVrmIndex; | ||
45 | typedef u32 HvXmGenerationId; | ||
46 | typedef u8 HvLpBusPool; | ||
47 | typedef u8 HvLpSharedPoolIndex; | ||
48 | typedef u16 HvLpSharedProcUnitsX100; | ||
49 | typedef u8 HvLpVirtualLanIndex; | ||
50 | typedef u16 HvLpVirtualLanIndexMap; /* Must hold HVMAXARCHITECTEDVIRTUALLANS bits!!! */ | ||
51 | typedef u16 HvBusNumber; /* Hypervisor Bus Number */ | ||
52 | typedef u8 HvSubBusNumber; /* Hypervisor SubBus Number */ | ||
53 | typedef u8 HvAgentId; /* Hypervisor DevFn */ | ||
54 | |||
55 | |||
56 | #define HVMAXARCHITECTEDLPS 32 | ||
57 | #define HVMAXARCHITECTEDVIRTUALLANS 16 | ||
58 | #define HVMAXARCHITECTEDVIRTUALDISKS 32 | ||
59 | #define HVMAXARCHITECTEDVIRTUALCDROMS 8 | ||
60 | #define HVMAXARCHITECTEDVIRTUALTAPES 8 | ||
61 | #define HVCHUNKSIZE (256 * 1024) | ||
62 | #define HVPAGESIZE (4 * 1024) | ||
63 | #define HVLPMINMEGSPRIMARY 256 | ||
64 | #define HVLPMINMEGSSECONDARY 64 | ||
65 | #define HVCHUNKSPERMEG 4 | ||
66 | #define HVPAGESPERMEG 256 | ||
67 | #define HVPAGESPERCHUNK 64 | ||
68 | |||
69 | #define HvLpIndexInvalid ((HvLpIndex)0xff) | ||
70 | |||
71 | /* | ||
72 | * Enums for the sub-components under PLIC | ||
73 | * Used in HvCall and HvPrimaryCall | ||
74 | */ | ||
75 | enum { | ||
76 | HvCallCompId = 0, | ||
77 | HvCallCpuCtlsCompId = 1, | ||
78 | HvCallCfgCompId = 2, | ||
79 | HvCallEventCompId = 3, | ||
80 | HvCallHptCompId = 4, | ||
81 | HvCallPciCompId = 5, | ||
82 | HvCallSlmCompId = 6, | ||
83 | HvCallSmCompId = 7, | ||
84 | HvCallSpdCompId = 8, | ||
85 | HvCallXmCompId = 9, | ||
86 | HvCallRioCompId = 10, | ||
87 | HvCallRsvd3CompId = 11, | ||
88 | HvCallRsvd2CompId = 12, | ||
89 | HvCallRsvd1CompId = 13, | ||
90 | HvCallMaxCompId = 14, | ||
91 | HvPrimaryCallCompId = 0, | ||
92 | HvPrimaryCallCfgCompId = 1, | ||
93 | HvPrimaryCallPciCompId = 2, | ||
94 | HvPrimaryCallSmCompId = 3, | ||
95 | HvPrimaryCallSpdCompId = 4, | ||
96 | HvPrimaryCallXmCompId = 5, | ||
97 | HvPrimaryCallRioCompId = 6, | ||
98 | HvPrimaryCallRsvd7CompId = 7, | ||
99 | HvPrimaryCallRsvd6CompId = 8, | ||
100 | HvPrimaryCallRsvd5CompId = 9, | ||
101 | HvPrimaryCallRsvd4CompId = 10, | ||
102 | HvPrimaryCallRsvd3CompId = 11, | ||
103 | HvPrimaryCallRsvd2CompId = 12, | ||
104 | HvPrimaryCallRsvd1CompId = 13, | ||
105 | HvPrimaryCallMaxCompId = HvCallMaxCompId | ||
106 | }; | ||
107 | |||
108 | struct HvLpBufferList { | ||
109 | u64 addr; | ||
110 | u64 len; | ||
111 | }; | ||
112 | |||
113 | #endif /* _HVTYPES_H */ | ||
diff --git a/include/asm-ppc64/iSeries/IoHriMainStore.h b/include/asm-ppc64/iSeries/IoHriMainStore.h deleted file mode 100644 index 45ed3ea67d06..000000000000 --- a/include/asm-ppc64/iSeries/IoHriMainStore.h +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | /* | ||
2 | * IoHriMainStore.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef _IOHRIMAINSTORE_H | ||
21 | #define _IOHRIMAINSTORE_H | ||
22 | |||
23 | /* Main Store Vpd for Condor,iStar,sStar */ | ||
24 | struct IoHriMainStoreSegment4 { | ||
25 | u8 msArea0Exists:1; | ||
26 | u8 msArea1Exists:1; | ||
27 | u8 msArea2Exists:1; | ||
28 | u8 msArea3Exists:1; | ||
29 | u8 reserved1:4; | ||
30 | u8 reserved2; | ||
31 | |||
32 | u8 msArea0Functional:1; | ||
33 | u8 msArea1Functional:1; | ||
34 | u8 msArea2Functional:1; | ||
35 | u8 msArea3Functional:1; | ||
36 | u8 reserved3:4; | ||
37 | u8 reserved4; | ||
38 | |||
39 | u32 totalMainStore; | ||
40 | |||
41 | u64 msArea0Ptr; | ||
42 | u64 msArea1Ptr; | ||
43 | u64 msArea2Ptr; | ||
44 | u64 msArea3Ptr; | ||
45 | |||
46 | u32 cardProductionLevel; | ||
47 | |||
48 | u32 msAdrHole; | ||
49 | |||
50 | u8 msArea0HasRiserVpd:1; | ||
51 | u8 msArea1HasRiserVpd:1; | ||
52 | u8 msArea2HasRiserVpd:1; | ||
53 | u8 msArea3HasRiserVpd:1; | ||
54 | u8 reserved5:4; | ||
55 | u8 reserved6; | ||
56 | u16 reserved7; | ||
57 | |||
58 | u8 reserved8[28]; | ||
59 | |||
60 | u64 nonInterleavedBlocksStartAdr; | ||
61 | u64 nonInterleavedBlocksEndAdr; | ||
62 | }; | ||
63 | |||
64 | /* Main Store VPD for Power4 */ | ||
65 | struct IoHriMainStoreChipInfo1 { | ||
66 | u32 chipMfgID __attribute((packed)); | ||
67 | char chipECLevel[4] __attribute((packed)); | ||
68 | }; | ||
69 | |||
70 | struct IoHriMainStoreVpdIdData { | ||
71 | char typeNumber[4]; | ||
72 | char modelNumber[4]; | ||
73 | char partNumber[12]; | ||
74 | char serialNumber[12]; | ||
75 | }; | ||
76 | |||
77 | struct IoHriMainStoreVpdFruData { | ||
78 | char fruLabel[8] __attribute((packed)); | ||
79 | u8 numberOfSlots __attribute((packed)); | ||
80 | u8 pluggingType __attribute((packed)); | ||
81 | u16 slotMapIndex __attribute((packed)); | ||
82 | }; | ||
83 | |||
84 | struct IoHriMainStoreAdrRangeBlock { | ||
85 | void *blockStart __attribute((packed)); | ||
86 | void *blockEnd __attribute((packed)); | ||
87 | u32 blockProcChipId __attribute((packed)); | ||
88 | }; | ||
89 | |||
90 | #define MaxAreaAdrRangeBlocks 4 | ||
91 | |||
92 | struct IoHriMainStoreArea4 { | ||
93 | u32 msVpdFormat __attribute((packed)); | ||
94 | u8 containedVpdType __attribute((packed)); | ||
95 | u8 reserved1 __attribute((packed)); | ||
96 | u16 reserved2 __attribute((packed)); | ||
97 | |||
98 | u64 msExists __attribute((packed)); | ||
99 | u64 msFunctional __attribute((packed)); | ||
100 | |||
101 | u32 memorySize __attribute((packed)); | ||
102 | u32 procNodeId __attribute((packed)); | ||
103 | |||
104 | u32 numAdrRangeBlocks __attribute((packed)); | ||
105 | struct IoHriMainStoreAdrRangeBlock xAdrRangeBlock[MaxAreaAdrRangeBlocks] __attribute((packed)); | ||
106 | |||
107 | struct IoHriMainStoreChipInfo1 chipInfo0 __attribute((packed)); | ||
108 | struct IoHriMainStoreChipInfo1 chipInfo1 __attribute((packed)); | ||
109 | struct IoHriMainStoreChipInfo1 chipInfo2 __attribute((packed)); | ||
110 | struct IoHriMainStoreChipInfo1 chipInfo3 __attribute((packed)); | ||
111 | struct IoHriMainStoreChipInfo1 chipInfo4 __attribute((packed)); | ||
112 | struct IoHriMainStoreChipInfo1 chipInfo5 __attribute((packed)); | ||
113 | struct IoHriMainStoreChipInfo1 chipInfo6 __attribute((packed)); | ||
114 | struct IoHriMainStoreChipInfo1 chipInfo7 __attribute((packed)); | ||
115 | |||
116 | void *msRamAreaArray __attribute((packed)); | ||
117 | u32 msRamAreaArrayNumEntries __attribute((packed)); | ||
118 | u32 msRamAreaArrayEntrySize __attribute((packed)); | ||
119 | |||
120 | u32 numaDimmExists __attribute((packed)); | ||
121 | u32 numaDimmFunctional __attribute((packed)); | ||
122 | void *numaDimmArray __attribute((packed)); | ||
123 | u32 numaDimmArrayNumEntries __attribute((packed)); | ||
124 | u32 numaDimmArrayEntrySize __attribute((packed)); | ||
125 | |||
126 | struct IoHriMainStoreVpdIdData idData __attribute((packed)); | ||
127 | |||
128 | u64 powerData __attribute((packed)); | ||
129 | u64 cardAssemblyPartNum __attribute((packed)); | ||
130 | u64 chipSerialNum __attribute((packed)); | ||
131 | |||
132 | u64 reserved3 __attribute((packed)); | ||
133 | char reserved4[16] __attribute((packed)); | ||
134 | |||
135 | struct IoHriMainStoreVpdFruData fruData __attribute((packed)); | ||
136 | |||
137 | u8 vpdPortNum __attribute((packed)); | ||
138 | u8 reserved5 __attribute((packed)); | ||
139 | u8 frameId __attribute((packed)); | ||
140 | u8 rackUnit __attribute((packed)); | ||
141 | char asciiKeywordVpd[256] __attribute((packed)); | ||
142 | u32 reserved6 __attribute((packed)); | ||
143 | }; | ||
144 | |||
145 | |||
146 | struct IoHriMainStoreSegment5 { | ||
147 | u16 reserved1; | ||
148 | u8 reserved2; | ||
149 | u8 msVpdFormat; | ||
150 | |||
151 | u32 totalMainStore; | ||
152 | u64 maxConfiguredMsAdr; | ||
153 | |||
154 | struct IoHriMainStoreArea4 *msAreaArray; | ||
155 | u32 msAreaArrayNumEntries; | ||
156 | u32 msAreaArrayEntrySize; | ||
157 | |||
158 | u32 msAreaExists; | ||
159 | u32 msAreaFunctional; | ||
160 | |||
161 | u64 reserved3; | ||
162 | }; | ||
163 | |||
164 | extern u64 xMsVpd[]; | ||
165 | |||
166 | #endif /* _IOHRIMAINSTORE_H */ | ||
diff --git a/include/asm-ppc64/iSeries/IoHriProcessorVpd.h b/include/asm-ppc64/iSeries/IoHriProcessorVpd.h deleted file mode 100644 index 73b73d80b8b1..000000000000 --- a/include/asm-ppc64/iSeries/IoHriProcessorVpd.h +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | /* | ||
2 | * IoHriProcessorVpd.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _IOHRIPROCESSORVPD_H | ||
20 | #define _IOHRIPROCESSORVPD_H | ||
21 | |||
22 | #include <asm/types.h> | ||
23 | |||
24 | /* | ||
25 | * This struct maps Processor Vpd that is DMAd to SLIC by CSP | ||
26 | */ | ||
27 | struct IoHriProcessorVpd { | ||
28 | u8 xFormat; // VPD format indicator x00-x00 | ||
29 | u8 xProcStatus:8; // Processor State x01-x01 | ||
30 | u8 xSecondaryThreadCount; // Secondary thread cnt x02-x02 | ||
31 | u8 xSrcType:1; // Src Type x03-x03 | ||
32 | u8 xSrcSoft:1; // Src stay soft ... | ||
33 | u8 xSrcParable:1; // Src parable ... | ||
34 | u8 xRsvd1:5; // Reserved ... | ||
35 | u16 xHvPhysicalProcIndex; // Hypervisor physical proc index04-x05 | ||
36 | u16 xRsvd2; // Reserved x06-x07 | ||
37 | u32 xHwNodeId; // Hardware node id x08-x0B | ||
38 | u32 xHwProcId; // Hardware processor id x0C-x0F | ||
39 | |||
40 | u32 xTypeNum; // Card Type/CCIN number x10-x13 | ||
41 | u32 xModelNum; // Model/Feature number x14-x17 | ||
42 | u64 xSerialNum; // Serial number x18-x1F | ||
43 | char xPartNum[12]; // Book Part or FPU number x20-x2B | ||
44 | char xMfgID[4]; // Manufacturing ID x2C-x2F | ||
45 | |||
46 | u32 xProcFreq; // Processor Frequency x30-x33 | ||
47 | u32 xTimeBaseFreq; // Time Base Frequency x34-x37 | ||
48 | |||
49 | u32 xChipEcLevel; // Chip EC Levels x38-x3B | ||
50 | u32 xProcIdReg; // PIR SPR value x3C-x3F | ||
51 | u32 xPVR; // PVR value x40-x43 | ||
52 | u8 xRsvd3[12]; // Reserved x44-x4F | ||
53 | |||
54 | u32 xInstCacheSize; // Instruction cache size in KB x50-x53 | ||
55 | u32 xInstBlockSize; // Instruction cache block size x54-x57 | ||
56 | u32 xDataCacheOperandSize; // Data cache operand size x58-x5B | ||
57 | u32 xInstCacheOperandSize; // Inst cache operand size x5C-x5F | ||
58 | |||
59 | u32 xDataL1CacheSizeKB; // L1 data cache size in KB x60-x63 | ||
60 | u32 xDataL1CacheLineSize; // L1 data cache block size x64-x67 | ||
61 | u64 xRsvd4; // Reserved x68-x6F | ||
62 | |||
63 | u32 xDataL2CacheSizeKB; // L2 data cache size in KB x70-x73 | ||
64 | u32 xDataL2CacheLineSize; // L2 data cache block size x74-x77 | ||
65 | u64 xRsvd5; // Reserved x78-x7F | ||
66 | |||
67 | u32 xDataL3CacheSizeKB; // L3 data cache size in KB x80-x83 | ||
68 | u32 xDataL3CacheLineSize; // L3 data cache block size x84-x87 | ||
69 | u64 xRsvd6; // Reserved x88-x8F | ||
70 | |||
71 | u64 xFruLabel; // Card Location Label x90-x97 | ||
72 | u8 xSlotsOnCard; // Slots on card (0=no slots) x98-x98 | ||
73 | u8 xPartLocFlag; // Location flag (0-pluggable 1-imbedded) x99-x99 | ||
74 | u16 xSlotMapIndex; // Index in slot map table x9A-x9B | ||
75 | u8 xSmartCardPortNo; // Smart card port number x9C-x9C | ||
76 | u8 xRsvd7; // Reserved x9D-x9D | ||
77 | u16 xFrameIdAndRackUnit; // Frame ID and rack unit adr x9E-x9F | ||
78 | |||
79 | u8 xRsvd8[24]; // Reserved xA0-xB7 | ||
80 | |||
81 | char xProcSrc[72]; // CSP format SRC xB8-xFF | ||
82 | }; | ||
83 | |||
84 | extern struct IoHriProcessorVpd xIoHriProcessorVpd[]; | ||
85 | |||
86 | #endif /* _IOHRIPROCESSORVPD_H */ | ||
diff --git a/include/asm-ppc64/iSeries/ItExtVpdPanel.h b/include/asm-ppc64/iSeries/ItExtVpdPanel.h deleted file mode 100644 index 4c546a8802b4..000000000000 --- a/include/asm-ppc64/iSeries/ItExtVpdPanel.h +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | /* | ||
2 | * ItExtVpdPanel.h | ||
3 | * Copyright (C) 2002 Dave Boutcher IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _ITEXTVPDPANEL_H | ||
20 | #define _ITEXTVPDPANEL_H | ||
21 | |||
22 | /* | ||
23 | * This struct maps the panel information | ||
24 | * | ||
25 | * Warning: | ||
26 | * This data must match the architecture for the panel information | ||
27 | */ | ||
28 | |||
29 | #include <asm/types.h> | ||
30 | |||
31 | struct ItExtVpdPanel { | ||
32 | /* Definition of the Extended Vpd On Panel Data Area */ | ||
33 | char systemSerial[8]; | ||
34 | char mfgID[4]; | ||
35 | char reserved1[24]; | ||
36 | char machineType[4]; | ||
37 | char systemID[6]; | ||
38 | char somUniqueCnt[4]; | ||
39 | char serialNumberCount; | ||
40 | char reserved2[7]; | ||
41 | u16 bbu3; | ||
42 | u16 bbu2; | ||
43 | u16 bbu1; | ||
44 | char xLocationLabel[8]; | ||
45 | u8 xRsvd1[6]; | ||
46 | u16 xFrameId; | ||
47 | u8 xRsvd2[48]; | ||
48 | }; | ||
49 | |||
50 | extern struct ItExtVpdPanel xItExtVpdPanel; | ||
51 | |||
52 | #endif /* _ITEXTVPDPANEL_H */ | ||
diff --git a/include/asm-ppc64/iSeries/ItIplParmsReal.h b/include/asm-ppc64/iSeries/ItIplParmsReal.h deleted file mode 100644 index ae3417dc599e..000000000000 --- a/include/asm-ppc64/iSeries/ItIplParmsReal.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* | ||
2 | * ItIplParmsReal.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _ITIPLPARMSREAL_H | ||
20 | #define _ITIPLPARMSREAL_H | ||
21 | |||
22 | /* | ||
23 | * This struct maps the IPL Parameters DMA'd from the SP. | ||
24 | * | ||
25 | * Warning: | ||
26 | * This data must map in exactly 64 bytes and match the architecture for | ||
27 | * the IPL parms | ||
28 | */ | ||
29 | |||
30 | #include <asm/types.h> | ||
31 | |||
32 | struct ItIplParmsReal { | ||
33 | u8 xFormat; // Defines format of IplParms x00-x00 | ||
34 | u8 xRsvd01:6; // Reserved x01-x01 | ||
35 | u8 xAlternateSearch:1; // Alternate search indicator ... | ||
36 | u8 xUaSupplied:1; // UA Supplied on programmed IPL... | ||
37 | u8 xLsUaFormat; // Format byte for UA x02-x02 | ||
38 | u8 xRsvd02; // Reserved x03-x03 | ||
39 | u32 xLsUa; // LS UA x04-x07 | ||
40 | u32 xUnusedLsLid; // First OS LID to load x08-x0B | ||
41 | u16 xLsBusNumber; // LS Bus Number x0C-x0D | ||
42 | u8 xLsCardAdr; // LS Card Address x0E-x0E | ||
43 | u8 xLsBoardAdr; // LS Board Address x0F-x0F | ||
44 | u32 xRsvd03; // Reserved x10-x13 | ||
45 | u8 xSpcnPresent:1; // SPCN present x14-x14 | ||
46 | u8 xCpmPresent:1; // CPM present ... | ||
47 | u8 xRsvd04:6; // Reserved ... | ||
48 | u8 xRsvd05:4; // Reserved x15-x15 | ||
49 | u8 xKeyLock:4; // Keylock setting ... | ||
50 | u8 xRsvd06:6; // Reserved x16-x16 | ||
51 | u8 xIplMode:2; // Ipl mode (A|B|C|D) ... | ||
52 | u8 xHwIplType; // Fast v slow v slow EC HW IPL x17-x17 | ||
53 | u16 xCpmEnabledIpl:1; // CPM in effect when IPL initiatedx18-x19 | ||
54 | u16 xPowerOnResetIpl:1; // Indicate POR condition ... | ||
55 | u16 xMainStorePreserved:1; // Main Storage is preserved ... | ||
56 | u16 xRsvd07:13; // Reserved ... | ||
57 | u16 xIplSource:16; // Ipl source x1A-x1B | ||
58 | u8 xIplReason:8; // Reason for this IPL x1C-x1C | ||
59 | u8 xRsvd08; // Reserved x1D-x1D | ||
60 | u16 xRsvd09; // Reserved x1E-x1F | ||
61 | u16 xSysBoxType; // System Box Type x20-x21 | ||
62 | u16 xSysProcType; // System Processor Type x22-x23 | ||
63 | u32 xRsvd10; // Reserved x24-x27 | ||
64 | u64 xRsvd11; // Reserved x28-x2F | ||
65 | u64 xRsvd12; // Reserved x30-x37 | ||
66 | u64 xRsvd13; // Reserved x38-x3F | ||
67 | }; | ||
68 | |||
69 | extern struct ItIplParmsReal xItIplParmsReal; | ||
70 | |||
71 | #endif /* _ITIPLPARMSREAL_H */ | ||
diff --git a/include/asm-ppc64/iSeries/ItLpNaca.h b/include/asm-ppc64/iSeries/ItLpNaca.h deleted file mode 100644 index 225d0176779d..000000000000 --- a/include/asm-ppc64/iSeries/ItLpNaca.h +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | /* | ||
2 | * ItLpNaca.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _ITLPNACA_H | ||
20 | #define _ITLPNACA_H | ||
21 | |||
22 | #include <linux/types.h> | ||
23 | |||
24 | /* | ||
25 | * This control block contains the data that is shared between the | ||
26 | * hypervisor (PLIC) and the OS. | ||
27 | */ | ||
28 | |||
29 | struct ItLpNaca { | ||
30 | // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data | ||
31 | u32 xDesc; // Eye catcher x00-x03 | ||
32 | u16 xSize; // Size of this class x04-x05 | ||
33 | u16 xIntHdlrOffset; // Offset to IntHdlr array x06-x07 | ||
34 | u8 xMaxIntHdlrEntries; // Number of entries in array x08-x08 | ||
35 | u8 xPrimaryLpIndex; // LP Index of Primary x09-x09 | ||
36 | u8 xServiceLpIndex; // LP Ind of Service Focal Pointx0A-x0A | ||
37 | u8 xLpIndex; // LP Index x0B-x0B | ||
38 | u16 xMaxLpQueues; // Number of allocated queues x0C-x0D | ||
39 | u16 xLpQueueOffset; // Offset to start of LP queues x0E-x0F | ||
40 | u8 xPirEnvironMode:8; // Piranha or hardware x10-x10 | ||
41 | u8 xPirConsoleMode:8; // Piranha console indicator x11-x11 | ||
42 | u8 xPirDasdMode:8; // Piranha dasd indicator x12-x12 | ||
43 | u8 xRsvd1_0[5]; // Reserved for Piranha related x13-x17 | ||
44 | u8 xLparInstalled:1; // Is LPAR installed on system x18-x1F | ||
45 | u8 xSysPartitioned:1; // Is the system partitioned ... | ||
46 | u8 xHwSyncedTBs:1; // Hardware synced TBs ... | ||
47 | u8 xIntProcUtilHmt:1; // Utilize HMT for interrupts ... | ||
48 | u8 xRsvd1_1:4; // Reserved ... | ||
49 | u8 xSpVpdFormat:8; // VPD areas are in CSP format ... | ||
50 | u8 xIntProcRatio:8; // Ratio of int procs to procs ... | ||
51 | u8 xRsvd1_2[5]; // Reserved ... | ||
52 | u16 xRsvd1_3; // Reserved x20-x21 | ||
53 | u16 xPlicVrmIndex; // VRM index of PLIC x22-x23 | ||
54 | u16 xMinSupportedSlicVrmInd;// Min supported OS VRM index x24-x25 | ||
55 | u16 xMinCompatableSlicVrmInd;// Min compatible OS VRM index x26-x27 | ||
56 | u64 xLoadAreaAddr; // ER address of load area x28-x2F | ||
57 | u32 xLoadAreaChunks; // Chunks for the load area x30-x33 | ||
58 | u32 xPaseSysCallCRMask; // Mask used to test CR before x34-x37 | ||
59 | // doing an ASR switch on PASE | ||
60 | // system call. | ||
61 | u64 xSlicSegmentTablePtr; // Pointer to Slic seg table. x38-x3f | ||
62 | u8 xRsvd1_4[64]; // x40-x7F | ||
63 | |||
64 | // CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data | ||
65 | u8 xRsvd2_0[128]; // Reserved x00-x7F | ||
66 | |||
67 | // CACHE_LINE_3-6 0x0100 - 0x02FF Contains LP Queue indicators | ||
68 | // NB: Padding required to keep xInterrruptHdlr at x300 which is required | ||
69 | // for v4r4 PLIC. | ||
70 | u8 xOldLpQueue[128]; // LP Queue needed for v4r4 100-17F | ||
71 | u8 xRsvd3_0[384]; // Reserved 180-2FF | ||
72 | |||
73 | // CACHE_LINE_7-8 0x0300 - 0x03FF Contains the address of the OS interrupt | ||
74 | // handlers | ||
75 | u64 xInterruptHdlr[32]; // Interrupt handlers 300-x3FF | ||
76 | }; | ||
77 | |||
78 | extern struct ItLpNaca itLpNaca; | ||
79 | |||
80 | #endif /* _ITLPNACA_H */ | ||
diff --git a/include/asm-ppc64/iSeries/ItLpQueue.h b/include/asm-ppc64/iSeries/ItLpQueue.h deleted file mode 100644 index 69b26ad74135..000000000000 --- a/include/asm-ppc64/iSeries/ItLpQueue.h +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | /* | ||
2 | * ItLpQueue.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _ITLPQUEUE_H | ||
20 | #define _ITLPQUEUE_H | ||
21 | |||
22 | /* | ||
23 | * This control block defines the simple LP queue structure that is | ||
24 | * shared between the hypervisor (PLIC) and the OS in order to send | ||
25 | * events to an LP. | ||
26 | */ | ||
27 | |||
28 | #include <asm/types.h> | ||
29 | #include <asm/ptrace.h> | ||
30 | |||
31 | struct HvLpEvent; | ||
32 | |||
33 | #define ITMaxLpQueues 8 | ||
34 | |||
35 | #define NotUsed 0 // Queue will not be used by PLIC | ||
36 | #define DedicatedIo 1 // Queue dedicated to IO processor specified | ||
37 | #define DedicatedLp 2 // Queue dedicated to LP specified | ||
38 | #define Shared 3 // Queue shared for both IO and LP | ||
39 | |||
40 | #define LpEventStackSize 4096 | ||
41 | #define LpEventMaxSize 256 | ||
42 | #define LpEventAlign 64 | ||
43 | |||
44 | struct hvlpevent_queue { | ||
45 | /* | ||
46 | * The xSlicCurEventPtr is the pointer to the next event stack entry | ||
47 | * that will become valid. The OS must peek at this entry to determine | ||
48 | * if it is valid. PLIC will set the valid indicator as the very last | ||
49 | * store into that entry. | ||
50 | * | ||
51 | * When the OS has completed processing of the event then it will mark | ||
52 | * the event as invalid so that PLIC knows it can store into that event | ||
53 | * location again. | ||
54 | * | ||
55 | * If the event stack fills and there are overflow events, then PLIC | ||
56 | * will set the xPlicOverflowIntPending flag in which case the OS will | ||
57 | * have to fetch the additional LP events once they have drained the | ||
58 | * event stack. | ||
59 | * | ||
60 | * The first 16-bytes are known by both the OS and PLIC. The remainder | ||
61 | * of the cache line is for use by the OS. | ||
62 | */ | ||
63 | u8 xPlicOverflowIntPending;// 0x00 Overflow events are pending | ||
64 | u8 xPlicStatus; // 0x01 DedicatedIo or DedicatedLp or NotUsed | ||
65 | u16 xSlicLogicalProcIndex; // 0x02 Logical Proc Index for correlation | ||
66 | u8 xPlicRsvd[12]; // 0x04 | ||
67 | char *xSlicCurEventPtr; // 0x10 | ||
68 | char *xSlicLastValidEventPtr; // 0x18 | ||
69 | char *xSlicEventStackPtr; // 0x20 | ||
70 | u8 xIndex; // 0x28 unique sequential index. | ||
71 | u8 xSlicRsvd[3]; // 0x29-2b | ||
72 | spinlock_t lock; | ||
73 | }; | ||
74 | |||
75 | extern struct hvlpevent_queue hvlpevent_queue; | ||
76 | |||
77 | extern int hvlpevent_is_pending(void); | ||
78 | extern void process_hvlpevents(struct pt_regs *); | ||
79 | extern void setup_hvlpevent_queue(void); | ||
80 | |||
81 | #endif /* _ITLPQUEUE_H */ | ||
diff --git a/include/asm-ppc64/iSeries/ItLpRegSave.h b/include/asm-ppc64/iSeries/ItLpRegSave.h deleted file mode 100644 index 1b3087e76205..000000000000 --- a/include/asm-ppc64/iSeries/ItLpRegSave.h +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* | ||
2 | * ItLpRegSave.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _ITLPREGSAVE_H | ||
20 | #define _ITLPREGSAVE_H | ||
21 | |||
22 | /* | ||
23 | * This control block contains the data that is shared between PLIC | ||
24 | * and the OS | ||
25 | */ | ||
26 | |||
27 | struct ItLpRegSave { | ||
28 | u32 xDesc; // Eye catcher "LpRS" ebcdic 000-003 | ||
29 | u16 xSize; // Size of this class 004-005 | ||
30 | u8 xInUse; // Area is live 006-007 | ||
31 | u8 xRsvd1[9]; // Reserved 007-00F | ||
32 | |||
33 | u8 xFixedRegSave[352]; // Fixed Register Save Area 010-16F | ||
34 | u32 xCTRL; // Control Register 170-173 | ||
35 | u32 xDEC; // Decrementer 174-177 | ||
36 | u32 xFPSCR; // FP Status and Control Reg 178-17B | ||
37 | u32 xPVR; // Processor Version Number 17C-17F | ||
38 | |||
39 | u64 xMMCR0; // Monitor Mode Control Reg 0 180-187 | ||
40 | u32 xPMC1; // Perf Monitor Counter 1 188-18B | ||
41 | u32 xPMC2; // Perf Monitor Counter 2 18C-18F | ||
42 | u32 xPMC3; // Perf Monitor Counter 3 190-193 | ||
43 | u32 xPMC4; // Perf Monitor Counter 4 194-197 | ||
44 | u32 xPIR; // Processor ID Reg 198-19B | ||
45 | |||
46 | u32 xMMCR1; // Monitor Mode Control Reg 1 19C-19F | ||
47 | u32 xMMCRA; // Monitor Mode Control Reg A 1A0-1A3 | ||
48 | u32 xPMC5; // Perf Monitor Counter 5 1A4-1A7 | ||
49 | u32 xPMC6; // Perf Monitor Counter 6 1A8-1AB | ||
50 | u32 xPMC7; // Perf Monitor Counter 7 1AC-1AF | ||
51 | u32 xPMC8; // Perf Monitor Counter 8 1B0-1B3 | ||
52 | u32 xTSC; // Thread Switch Control 1B4-1B7 | ||
53 | u32 xTST; // Thread Switch Timeout 1B8-1BB | ||
54 | u32 xRsvd; // Reserved 1BC-1BF | ||
55 | |||
56 | u64 xACCR; // Address Compare Control Reg 1C0-1C7 | ||
57 | u64 xIMR; // Instruction Match Register 1C8-1CF | ||
58 | u64 xSDR1; // Storage Description Reg 1 1D0-1D7 | ||
59 | u64 xSPRG0; // Special Purpose Reg General0 1D8-1DF | ||
60 | u64 xSPRG1; // Special Purpose Reg General1 1E0-1E7 | ||
61 | u64 xSPRG2; // Special Purpose Reg General2 1E8-1EF | ||
62 | u64 xSPRG3; // Special Purpose Reg General3 1F0-1F7 | ||
63 | u64 xTB; // Time Base Register 1F8-1FF | ||
64 | |||
65 | u64 xFPR[32]; // Floating Point Registers 200-2FF | ||
66 | |||
67 | u64 xMSR; // Machine State Register 300-307 | ||
68 | u64 xNIA; // Next Instruction Address 308-30F | ||
69 | |||
70 | u64 xDABR; // Data Address Breakpoint Reg 310-317 | ||
71 | u64 xIABR; // Inst Address Breakpoint Reg 318-31F | ||
72 | |||
73 | u64 xHID0; // HW Implementation Dependent0 320-327 | ||
74 | |||
75 | u64 xHID4; // HW Implementation Dependent4 328-32F | ||
76 | u64 xSCOMd; // SCON Data Reg (SPRG4) 330-337 | ||
77 | u64 xSCOMc; // SCON Command Reg (SPRG5) 338-33F | ||
78 | u64 xSDAR; // Sample Data Address Register 340-347 | ||
79 | u64 xSIAR; // Sample Inst Address Register 348-34F | ||
80 | |||
81 | u8 xRsvd3[176]; // Reserved 350-3FF | ||
82 | }; | ||
83 | |||
84 | #endif /* _ITLPREGSAVE_H */ | ||
diff --git a/include/asm-ppc64/iSeries/ItSpCommArea.h b/include/asm-ppc64/iSeries/ItSpCommArea.h deleted file mode 100644 index 5535f8271c9f..000000000000 --- a/include/asm-ppc64/iSeries/ItSpCommArea.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * ItSpCommArea.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef _ITSPCOMMAREA_H | ||
21 | #define _ITSPCOMMAREA_H | ||
22 | |||
23 | |||
24 | struct SpCommArea { | ||
25 | u32 xDesc; // Descriptor (only in new formats) 000-003 | ||
26 | u8 xFormat; // Format (only in new formats) 004-004 | ||
27 | u8 xRsvd1[11]; // Reserved 005-00F | ||
28 | u64 xRawTbAtIplStart; // Raw HW TB value when IPL is started 010-017 | ||
29 | u64 xRawTodAtIplStart; // Raw HW TOD value when IPL is started 018-01F | ||
30 | u64 xBcdTimeAtIplStart; // BCD time when IPL is started 020-027 | ||
31 | u64 xBcdTimeAtOsStart; // BCD time when OS passed control 028-02F | ||
32 | u8 xRsvd2[80]; // Reserved 030-07F | ||
33 | }; | ||
34 | |||
35 | extern struct SpCommArea xSpCommArea; | ||
36 | |||
37 | #endif /* _ITSPCOMMAREA_H */ | ||
diff --git a/include/asm-ppc64/iSeries/ItVpdAreas.h b/include/asm-ppc64/iSeries/ItVpdAreas.h deleted file mode 100644 index 71b3ad24f95a..000000000000 --- a/include/asm-ppc64/iSeries/ItVpdAreas.h +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | /* | ||
2 | * ItVpdAreas.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _ITVPDAREAS_H | ||
20 | #define _ITVPDAREAS_H | ||
21 | |||
22 | /* | ||
23 | * This file defines the address and length of all of the VPD area passed to | ||
24 | * the OS from PLIC (most of which start from the SP). | ||
25 | */ | ||
26 | |||
27 | #include <asm/types.h> | ||
28 | |||
29 | /* VPD Entry index is carved in stone - cannot be changed (easily). */ | ||
30 | #define ItVpdCecVpd 0 | ||
31 | #define ItVpdDynamicSpace 1 | ||
32 | #define ItVpdExtVpd 2 | ||
33 | #define ItVpdExtVpdOnPanel 3 | ||
34 | #define ItVpdFirstPaca 4 | ||
35 | #define ItVpdIoVpd 5 | ||
36 | #define ItVpdIplParms 6 | ||
37 | #define ItVpdMsVpd 7 | ||
38 | #define ItVpdPanelVpd 8 | ||
39 | #define ItVpdLpNaca 9 | ||
40 | #define ItVpdBackplaneAndMaybeClockCardVpd 10 | ||
41 | #define ItVpdRecoveryLogBuffer 11 | ||
42 | #define ItVpdSpCommArea 12 | ||
43 | #define ItVpdSpLogBuffer 13 | ||
44 | #define ItVpdSpLogBufferSave 14 | ||
45 | #define ItVpdSpCardVpd 15 | ||
46 | #define ItVpdFirstProcVpd 16 | ||
47 | #define ItVpdApModelVpd 17 | ||
48 | #define ItVpdClockCardVpd 18 | ||
49 | #define ItVpdBusExtCardVpd 19 | ||
50 | #define ItVpdProcCapacityVpd 20 | ||
51 | #define ItVpdInteractiveCapacityVpd 21 | ||
52 | #define ItVpdFirstSlotLabel 22 | ||
53 | #define ItVpdFirstLpQueue 23 | ||
54 | #define ItVpdFirstL3CacheVpd 24 | ||
55 | #define ItVpdFirstProcFruVpd 25 | ||
56 | |||
57 | #define ItVpdMaxEntries 26 | ||
58 | |||
59 | #define ItDmaMaxEntries 10 | ||
60 | |||
61 | #define ItVpdAreasMaxSlotLabels 192 | ||
62 | |||
63 | |||
64 | struct ItVpdAreas { | ||
65 | u32 xSlicDesc; // Descriptor 000-003 | ||
66 | u16 xSlicSize; // Size of this control block 004-005 | ||
67 | u16 xPlicAdjustVpdLens:1; // Flag to indicate new interface006-007 | ||
68 | u16 xRsvd1:15; // Reserved bits ... | ||
69 | u16 xSlicVpdEntries; // Number of VPD entries 008-009 | ||
70 | u16 xSlicDmaEntries; // Number of DMA entries 00A-00B | ||
71 | u16 xSlicMaxLogicalProcs; // Maximum logical processors 00C-00D | ||
72 | u16 xSlicMaxPhysicalProcs; // Maximum physical processors 00E-00F | ||
73 | u16 xSlicDmaToksOffset; // Offset into this of array 010-011 | ||
74 | u16 xSlicVpdAdrsOffset; // Offset into this of array 012-013 | ||
75 | u16 xSlicDmaLensOffset; // Offset into this of array 014-015 | ||
76 | u16 xSlicVpdLensOffset; // Offset into this of array 016-017 | ||
77 | u16 xSlicMaxSlotLabels; // Maximum number of slot labels018-019 | ||
78 | u16 xSlicMaxLpQueues; // Maximum number of LP Queues 01A-01B | ||
79 | u8 xRsvd2[4]; // Reserved 01C-01F | ||
80 | u64 xRsvd3[12]; // Reserved 020-07F | ||
81 | u32 xPlicDmaLens[ItDmaMaxEntries];// Array of DMA lengths 080-0A7 | ||
82 | u32 xPlicDmaToks[ItDmaMaxEntries];// Array of DMA tokens 0A8-0CF | ||
83 | u32 xSlicVpdLens[ItVpdMaxEntries];// Array of VPD lengths 0D0-12F | ||
84 | void *xSlicVpdAdrs[ItVpdMaxEntries];// Array of VPD buffers 130-1EF | ||
85 | }; | ||
86 | |||
87 | extern struct ItVpdAreas itVpdAreas; | ||
88 | |||
89 | #endif /* _ITVPDAREAS_H */ | ||
diff --git a/include/asm-ppc64/iSeries/LparMap.h b/include/asm-ppc64/iSeries/LparMap.h deleted file mode 100644 index a6840b186d03..000000000000 --- a/include/asm-ppc64/iSeries/LparMap.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * LparMap.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef _LPARMAP_H | ||
20 | #define _LPARMAP_H | ||
21 | |||
22 | #ifndef __ASSEMBLY__ | ||
23 | |||
24 | #include <asm/types.h> | ||
25 | |||
26 | /* | ||
27 | * The iSeries hypervisor will set up mapping for one or more | ||
28 | * ESID/VSID pairs (in SLB/segment registers) and will set up | ||
29 | * mappings of one or more ranges of pages to VAs. | ||
30 | * We will have the hypervisor set up the ESID->VSID mapping | ||
31 | * for the four kernel segments (C-F). With shared processors, | ||
32 | * the hypervisor will clear all segment registers and reload | ||
33 | * these four whenever the processor is switched from one | ||
34 | * partition to another. | ||
35 | */ | ||
36 | |||
37 | /* The Vsid and Esid identified below will be used by the hypervisor | ||
38 | * to set up a memory mapping for part of the load area before giving | ||
39 | * control to the Linux kernel. The load area is 64 MB, but this must | ||
40 | * not attempt to map the whole load area. The Hashed Page Table may | ||
41 | * need to be located within the load area (if the total partition size | ||
42 | * is 64 MB), but cannot be mapped. Typically, this should specify | ||
43 | * to map half (32 MB) of the load area. | ||
44 | * | ||
45 | * The hypervisor will set up page table entries for the number of | ||
46 | * pages specified. | ||
47 | * | ||
48 | * In 32-bit mode, the hypervisor will load all four of the | ||
49 | * segment registers (identified by the low-order four bits of the | ||
50 | * Esid field. In 64-bit mode, the hypervisor will load one SLB | ||
51 | * entry to map the Esid to the Vsid. | ||
52 | */ | ||
53 | |||
54 | #define HvEsidsToMap 2 | ||
55 | #define HvRangesToMap 1 | ||
56 | |||
57 | /* Hypervisor initially maps 32MB of the load area */ | ||
58 | #define HvPagesToMap 8192 | ||
59 | |||
60 | struct LparMap { | ||
61 | u64 xNumberEsids; // Number of ESID/VSID pairs | ||
62 | u64 xNumberRanges; // Number of VA ranges to map | ||
63 | u64 xSegmentTableOffs; // Page number within load area of seg table | ||
64 | u64 xRsvd[5]; | ||
65 | struct { | ||
66 | u64 xKernelEsid; // Esid used to map kernel load | ||
67 | u64 xKernelVsid; // Vsid used to map kernel load | ||
68 | } xEsids[HvEsidsToMap]; | ||
69 | struct { | ||
70 | u64 xPages; // Number of pages to be mapped | ||
71 | u64 xOffset; // Offset from start of load area | ||
72 | u64 xVPN; // Virtual Page Number | ||
73 | } xRanges[HvRangesToMap]; | ||
74 | }; | ||
75 | |||
76 | extern const struct LparMap xLparMap; | ||
77 | |||
78 | #endif /* __ASSEMBLY__ */ | ||
79 | |||
80 | /* the fixed address where the LparMap exists */ | ||
81 | #define LPARMAP_PHYS 0x7000 | ||
82 | |||
83 | #endif /* _LPARMAP_H */ | ||
diff --git a/include/asm-ppc64/iSeries/iSeries_io.h b/include/asm-ppc64/iSeries/iSeries_io.h deleted file mode 100644 index 9f79413342b3..000000000000 --- a/include/asm-ppc64/iSeries/iSeries_io.h +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | #ifndef _ISERIES_IO_H | ||
2 | #define _ISERIES_IO_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #ifdef CONFIG_PPC_ISERIES | ||
7 | #include <linux/types.h> | ||
8 | /* | ||
9 | * File iSeries_io.h created by Allan Trautman on Thu Dec 28 2000. | ||
10 | * | ||
11 | * Remaps the io.h for the iSeries Io | ||
12 | * Copyright (C) 2000 Allan H Trautman, IBM Corporation | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the: | ||
26 | * Free Software Foundation, Inc., | ||
27 | * 59 Temple Place, Suite 330, | ||
28 | * Boston, MA 02111-1307 USA | ||
29 | * | ||
30 | * Change Activity: | ||
31 | * Created December 28, 2000 | ||
32 | * End Change Activity | ||
33 | */ | ||
34 | |||
35 | extern u8 iSeries_Read_Byte(const volatile void __iomem * IoAddress); | ||
36 | extern u16 iSeries_Read_Word(const volatile void __iomem * IoAddress); | ||
37 | extern u32 iSeries_Read_Long(const volatile void __iomem * IoAddress); | ||
38 | extern void iSeries_Write_Byte(u8 IoData, volatile void __iomem * IoAddress); | ||
39 | extern void iSeries_Write_Word(u16 IoData, volatile void __iomem * IoAddress); | ||
40 | extern void iSeries_Write_Long(u32 IoData, volatile void __iomem * IoAddress); | ||
41 | |||
42 | extern void iSeries_memset_io(volatile void __iomem *dest, char x, size_t n); | ||
43 | extern void iSeries_memcpy_toio(volatile void __iomem *dest, void *source, | ||
44 | size_t n); | ||
45 | extern void iSeries_memcpy_fromio(void *dest, | ||
46 | const volatile void __iomem *source, size_t n); | ||
47 | |||
48 | #endif /* CONFIG_PPC_ISERIES */ | ||
49 | #endif /* _ISERIES_IO_H */ | ||
diff --git a/include/asm-ppc64/iSeries/iSeries_irq.h b/include/asm-ppc64/iSeries/iSeries_irq.h deleted file mode 100644 index 6c9767ac1302..000000000000 --- a/include/asm-ppc64/iSeries/iSeries_irq.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | #ifndef __ISERIES_IRQ_H__ | ||
2 | #define __ISERIES_IRQ_H__ | ||
3 | |||
4 | extern void iSeries_init_IRQ(void); | ||
5 | extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId); | ||
6 | extern void iSeries_activate_IRQs(void); | ||
7 | |||
8 | #endif /* __ISERIES_IRQ_H__ */ | ||
diff --git a/include/asm-ppc64/iSeries/iSeries_pci.h b/include/asm-ppc64/iSeries/iSeries_pci.h deleted file mode 100644 index 575f611f8b33..000000000000 --- a/include/asm-ppc64/iSeries/iSeries_pci.h +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | #ifndef _ISERIES_64_PCI_H | ||
2 | #define _ISERIES_64_PCI_H | ||
3 | |||
4 | /* | ||
5 | * File iSeries_pci.h created by Allan Trautman on Tue Feb 20, 2001. | ||
6 | * | ||
7 | * Define some useful macros for the iSeries pci routines. | ||
8 | * Copyright (C) 2001 Allan H Trautman, IBM Corporation | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the: | ||
22 | * Free Software Foundation, Inc., | ||
23 | * 59 Temple Place, Suite 330, | ||
24 | * Boston, MA 02111-1307 USA | ||
25 | * | ||
26 | * Change Activity: | ||
27 | * Created Feb 20, 2001 | ||
28 | * Added device reset, March 22, 2001 | ||
29 | * Ported to ppc64, May 25, 2001 | ||
30 | * End Change Activity | ||
31 | */ | ||
32 | |||
33 | #include <asm/iSeries/HvCallPci.h> | ||
34 | #include <asm/abs_addr.h> | ||
35 | |||
36 | struct pci_dev; /* For Forward Reference */ | ||
37 | struct iSeries_Device_Node; | ||
38 | |||
39 | /* | ||
40 | * Gets iSeries Bus, SubBus, DevFn using iSeries_Device_Node structure | ||
41 | */ | ||
42 | |||
43 | #define ISERIES_BUS(DevPtr) DevPtr->DsaAddr.Dsa.busNumber | ||
44 | #define ISERIES_SUBBUS(DevPtr) DevPtr->DsaAddr.Dsa.subBusNumber | ||
45 | #define ISERIES_DEVICE(DevPtr) DevPtr->DsaAddr.Dsa.deviceId | ||
46 | #define ISERIES_DSA(DevPtr) DevPtr->DsaAddr.DsaAddr | ||
47 | #define ISERIES_DEVNODE(PciDev) ((struct iSeries_Device_Node *)PciDev->sysdata) | ||
48 | |||
49 | #define EADsMaxAgents 7 | ||
50 | |||
51 | /* | ||
52 | * Decodes Linux DevFn to iSeries DevFn, bridge device, or function. | ||
53 | * For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h | ||
54 | */ | ||
55 | |||
56 | #define ISERIES_PCI_AGENTID(idsel, func) \ | ||
57 | (((idsel & 0x0F) << 4) | (func & 0x07)) | ||
58 | #define ISERIES_ENCODE_DEVICE(agentid) \ | ||
59 | ((0x10) | ((agentid & 0x20) >> 2) | (agentid & 0x07)) | ||
60 | |||
61 | #define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus) ((subbus >> 5) & 0x7) | ||
62 | #define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7) | ||
63 | |||
64 | /* | ||
65 | * Converts Virtual Address to Real Address for Hypervisor calls | ||
66 | */ | ||
67 | #define ISERIES_HV_ADDR(virtaddr) \ | ||
68 | (0x8000000000000000 | virt_to_abs(virtaddr)) | ||
69 | |||
70 | /* | ||
71 | * iSeries Device Information | ||
72 | */ | ||
73 | struct iSeries_Device_Node { | ||
74 | struct list_head Device_List; | ||
75 | struct pci_dev *PciDev; | ||
76 | union HvDsaMap DsaAddr; /* Direct Select Address */ | ||
77 | /* busNumber, subBusNumber, */ | ||
78 | /* deviceId, barNumber */ | ||
79 | int DevFn; /* Linux devfn */ | ||
80 | int Irq; /* Assigned IRQ */ | ||
81 | int Flags; /* Possible flags(disable/bist)*/ | ||
82 | u8 LogicalSlot; /* Hv Slot Index for Tces */ | ||
83 | struct iommu_table *iommu_table;/* Device TCE Table */ | ||
84 | }; | ||
85 | |||
86 | extern void iSeries_Device_Information(struct pci_dev*, int); | ||
87 | |||
88 | #endif /* _ISERIES_64_PCI_H */ | ||
diff --git a/include/asm-ppc64/iSeries/mf.h b/include/asm-ppc64/iSeries/mf.h deleted file mode 100644 index 7e6a0d936999..000000000000 --- a/include/asm-ppc64/iSeries/mf.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * mf.h | ||
3 | * Copyright (C) 2001 Troy D. Armstrong IBM Corporation | ||
4 | * Copyright (C) 2004 Stephen Rothwell IBM Corporation | ||
5 | * | ||
6 | * This modules exists as an interface between a Linux secondary partition | ||
7 | * running on an iSeries and the primary partition's Virtual Service | ||
8 | * Processor (VSP) object. The VSP has final authority over powering on/off | ||
9 | * all partitions in the iSeries. It also provides miscellaneous low-level | ||
10 | * machine facility type operations. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License as published by | ||
14 | * the Free Software Foundation; either version 2 of the License, or | ||
15 | * (at your option) any later version. | ||
16 | * | ||
17 | * This program is distributed in the hope that it will be useful, | ||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | * GNU General Public License for more details. | ||
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
25 | */ | ||
26 | #ifndef _ASM_PPC64_ISERIES_MF_H | ||
27 | #define _ASM_PPC64_ISERIES_MF_H | ||
28 | |||
29 | #include <linux/types.h> | ||
30 | |||
31 | #include <asm/iSeries/HvTypes.h> | ||
32 | #include <asm/iSeries/HvCallEvent.h> | ||
33 | |||
34 | struct rtc_time; | ||
35 | |||
36 | typedef void (*MFCompleteHandler)(void *clientToken, int returnCode); | ||
37 | |||
38 | extern void mf_allocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type, | ||
39 | unsigned size, unsigned amount, MFCompleteHandler hdlr, | ||
40 | void *userToken); | ||
41 | extern void mf_deallocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type, | ||
42 | unsigned count, MFCompleteHandler hdlr, void *userToken); | ||
43 | |||
44 | extern void mf_power_off(void); | ||
45 | extern void mf_reboot(void); | ||
46 | |||
47 | extern void mf_display_src(u32 word); | ||
48 | extern void mf_display_progress(u16 value); | ||
49 | extern void mf_clear_src(void); | ||
50 | |||
51 | extern void mf_init(void); | ||
52 | |||
53 | extern int mf_get_rtc(struct rtc_time *tm); | ||
54 | extern int mf_get_boot_rtc(struct rtc_time *tm); | ||
55 | extern int mf_set_rtc(struct rtc_time *tm); | ||
56 | |||
57 | #endif /* _ASM_PPC64_ISERIES_MF_H */ | ||
diff --git a/include/asm-ppc64/iSeries/vio.h b/include/asm-ppc64/iSeries/vio.h deleted file mode 100644 index 6c05e6257f53..000000000000 --- a/include/asm-ppc64/iSeries/vio.h +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /* -*- linux-c -*- | ||
2 | * drivers/char/vio.h | ||
3 | * | ||
4 | * iSeries Virtual I/O Message Path header | ||
5 | * | ||
6 | * Authors: Dave Boutcher <boutcher@us.ibm.com> | ||
7 | * Ryan Arnold <ryanarn@us.ibm.com> | ||
8 | * Colin Devilbiss <devilbis@us.ibm.com> | ||
9 | * | ||
10 | * (C) Copyright 2000 IBM Corporation | ||
11 | * | ||
12 | * This header file is used by the iSeries virtual I/O device | ||
13 | * drivers. It defines the interfaces to the common functions | ||
14 | * (implemented in drivers/char/viopath.h) as well as defining | ||
15 | * common functions and structures. Currently (at the time I | ||
16 | * wrote this comment) the iSeries virtual I/O device drivers | ||
17 | * that use this are | ||
18 | * drivers/block/viodasd.c | ||
19 | * drivers/char/viocons.c | ||
20 | * drivers/char/viotape.c | ||
21 | * drivers/cdrom/viocd.c | ||
22 | * | ||
23 | * The iSeries virtual ethernet support (veth.c) uses a whole | ||
24 | * different set of functions. | ||
25 | * | ||
26 | * This program is free software; you can redistribute it and/or | ||
27 | * modify it under the terms of the GNU General Public License as | ||
28 | * published by the Free Software Foundation; either version 2 of the | ||
29 | * License, or (at your option) anyu later version. | ||
30 | * | ||
31 | * This program is distributed in the hope that it will be useful, but | ||
32 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
33 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
34 | * General Public License for more details. | ||
35 | * | ||
36 | * You should have received a copy of the GNU General Public License | ||
37 | * along with this program; if not, write to the Free Software Foundation, | ||
38 | * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
39 | * | ||
40 | */ | ||
41 | #ifndef _ISERIES_VIO_H | ||
42 | #define _ISERIES_VIO_H | ||
43 | |||
44 | #include <asm/iSeries/HvTypes.h> | ||
45 | #include <asm/iSeries/HvLpEvent.h> | ||
46 | |||
47 | /* | ||
48 | * iSeries virtual I/O events use the subtype field in | ||
49 | * HvLpEvent to figure out what kind of vio event is coming | ||
50 | * in. We use a table to route these, and this defines | ||
51 | * the maximum number of distinct subtypes | ||
52 | */ | ||
53 | #define VIO_MAX_SUBTYPES 8 | ||
54 | |||
55 | /* | ||
56 | * Each subtype can register a handler to process their events. | ||
57 | * The handler must have this interface. | ||
58 | */ | ||
59 | typedef void (vio_event_handler_t) (struct HvLpEvent * event); | ||
60 | |||
61 | extern int viopath_open(HvLpIndex remoteLp, int subtype, int numReq); | ||
62 | extern int viopath_close(HvLpIndex remoteLp, int subtype, int numReq); | ||
63 | extern int vio_setHandler(int subtype, vio_event_handler_t * beh); | ||
64 | extern int vio_clearHandler(int subtype); | ||
65 | extern int viopath_isactive(HvLpIndex lp); | ||
66 | extern HvLpInstanceId viopath_sourceinst(HvLpIndex lp); | ||
67 | extern HvLpInstanceId viopath_targetinst(HvLpIndex lp); | ||
68 | extern void vio_set_hostlp(void); | ||
69 | extern void *vio_get_event_buffer(int subtype); | ||
70 | extern void vio_free_event_buffer(int subtype, void *buffer); | ||
71 | |||
72 | extern HvLpIndex viopath_hostLp; | ||
73 | extern HvLpIndex viopath_ourLp; | ||
74 | |||
75 | #define VIOCHAR_MAX_DATA 200 | ||
76 | |||
77 | #define VIOMAJOR_SUBTYPE_MASK 0xff00 | ||
78 | #define VIOMINOR_SUBTYPE_MASK 0x00ff | ||
79 | #define VIOMAJOR_SUBTYPE_SHIFT 8 | ||
80 | |||
81 | #define VIOVERSION 0x0101 | ||
82 | |||
83 | /* | ||
84 | * This is the general structure for VIO errors; each module should have | ||
85 | * a table of them, and each table should be terminated by an entry of | ||
86 | * { 0, 0, NULL }. Then, to find a specific error message, a module | ||
87 | * should pass its local table and the return code. | ||
88 | */ | ||
89 | struct vio_error_entry { | ||
90 | u16 rc; | ||
91 | int errno; | ||
92 | const char *msg; | ||
93 | }; | ||
94 | extern const struct vio_error_entry *vio_lookup_rc( | ||
95 | const struct vio_error_entry *local_table, u16 rc); | ||
96 | |||
97 | enum viosubtypes { | ||
98 | viomajorsubtype_monitor = 0x0100, | ||
99 | viomajorsubtype_blockio = 0x0200, | ||
100 | viomajorsubtype_chario = 0x0300, | ||
101 | viomajorsubtype_config = 0x0400, | ||
102 | viomajorsubtype_cdio = 0x0500, | ||
103 | viomajorsubtype_tape = 0x0600, | ||
104 | viomajorsubtype_scsi = 0x0700 | ||
105 | }; | ||
106 | |||
107 | enum vioconfigsubtype { | ||
108 | vioconfigget = 0x0001, | ||
109 | }; | ||
110 | |||
111 | enum viorc { | ||
112 | viorc_good = 0x0000, | ||
113 | viorc_noConnection = 0x0001, | ||
114 | viorc_noReceiver = 0x0002, | ||
115 | viorc_noBufferAvailable = 0x0003, | ||
116 | viorc_invalidMessageType = 0x0004, | ||
117 | viorc_invalidRange = 0x0201, | ||
118 | viorc_invalidToken = 0x0202, | ||
119 | viorc_DMAError = 0x0203, | ||
120 | viorc_useError = 0x0204, | ||
121 | viorc_releaseError = 0x0205, | ||
122 | viorc_invalidDisk = 0x0206, | ||
123 | viorc_openRejected = 0x0301 | ||
124 | }; | ||
125 | |||
126 | struct device; | ||
127 | |||
128 | extern struct device *iSeries_vio_dev; | ||
129 | |||
130 | #endif /* _ISERIES_VIO_H */ | ||