aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/iSeries/HvCallEvent.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCallEvent.h')
-rw-r--r--include/asm-ppc64/iSeries/HvCallEvent.h94
1 files changed, 25 insertions, 69 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallEvent.h b/include/asm-ppc64/iSeries/HvCallEvent.h
index 191ddce0c2c6..5d9a327d0122 100644
--- a/include/asm-ppc64/iSeries/HvCallEvent.h
+++ b/include/asm-ppc64/iSeries/HvCallEvent.h
@@ -1,32 +1,28 @@
1/* 1/*
2 * HvCallEvent.h 2 * HvCallEvent.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 3 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 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 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 7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 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 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 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19
20/* 19/*
21 * This file contains the "hypervisor call" interface which is used to 20 * This file contains the "hypervisor call" interface which is used to
22 * drive the hypervisor from the OS. 21 * drive the hypervisor from the OS.
23 */ 22 */
24#ifndef _HVCALLEVENT_H 23#ifndef _HVCALLEVENT_H
25#define _HVCALLEVENT_H 24#define _HVCALLEVENT_H
26 25
27/*
28 * Standard Includes
29 */
30#include <asm/iSeries/HvCallSc.h> 26#include <asm/iSeries/HvCallSc.h>
31#include <asm/iSeries/HvTypes.h> 27#include <asm/iSeries/HvTypes.h>
32#include <asm/abs_addr.h> 28#include <asm/abs_addr.h>
@@ -71,7 +67,7 @@ typedef u64 HvLpDma_Rc;
71#define HvCallEventCloseLpEventPath HvCallEvent + 2 67#define HvCallEventCloseLpEventPath HvCallEvent + 2
72#define HvCallEventDmaBufList HvCallEvent + 3 68#define HvCallEventDmaBufList HvCallEvent + 3
73#define HvCallEventDmaSingle HvCallEvent + 4 69#define HvCallEventDmaSingle HvCallEvent + 4
74#define HvCallEventDmaToSp HvCallEvent + 5 70#define HvCallEventDmaToSp HvCallEvent + 5
75#define HvCallEventGetOverflowLpEvents HvCallEvent + 6 71#define HvCallEventGetOverflowLpEvents HvCallEvent + 6
76#define HvCallEventGetSourceLpInstanceId HvCallEvent + 7 72#define HvCallEventGetSourceLpInstanceId HvCallEvent + 7
77#define HvCallEventGetTargetLpInstanceId HvCallEvent + 8 73#define HvCallEventGetTargetLpInstanceId HvCallEvent + 8
@@ -85,14 +81,12 @@ typedef u64 HvLpDma_Rc;
85 81
86static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex) 82static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex)
87{ 83{
88 HvCall1(HvCallEventGetOverflowLpEvents,queueIndex); 84 HvCall1(HvCallEventGetOverflowLpEvents, queueIndex);
89 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
90} 85}
91 86
92static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex) 87static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
93{ 88{
94 HvCall1(HvCallEventSetInterLpQueueIndex,queueIndex); 89 HvCall1(HvCallEventSetInterLpQueueIndex, queueIndex);
95 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
96} 90}
97 91
98static inline void HvCallEvent_setLpEventStack(u8 queueIndex, 92static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
@@ -103,7 +97,6 @@ static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
103 abs_addr = virt_to_abs(eventStackAddr); 97 abs_addr = virt_to_abs(eventStackAddr);
104 HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr, 98 HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr,
105 eventStackSize); 99 eventStackSize);
106 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
107} 100}
108 101
109static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex, 102static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
@@ -111,22 +104,18 @@ static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
111{ 104{
112 HvCall2(HvCallEventSetLpEventQueueInterruptProc, queueIndex, 105 HvCall2(HvCallEventSetLpEventQueueInterruptProc, queueIndex,
113 lpLogicalProcIndex); 106 lpLogicalProcIndex);
114 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
115} 107}
116 108
117static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event) 109static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event)
118{ 110{
119 u64 abs_addr; 111 u64 abs_addr;
120 HvLpEvent_Rc retVal;
121 112
122#ifdef DEBUG_SENDEVENT 113#ifdef DEBUG_SENDEVENT
123 printk("HvCallEvent_signalLpEvent: *event = %016lx\n ", 114 printk("HvCallEvent_signalLpEvent: *event = %016lx\n ",
124 (unsigned long)event); 115 (unsigned long)event);
125#endif 116#endif
126 abs_addr = virt_to_abs(event); 117 abs_addr = virt_to_abs(event);
127 retVal = (HvLpEvent_Rc)HvCall1(HvCallEventSignalLpEvent, abs_addr); 118 return HvCall1(HvCallEventSignalLpEvent, abs_addr);
128 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
129 return retVal;
130} 119}
131 120
132static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp, 121static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
@@ -136,9 +125,7 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
136 u64 eventData1, u64 eventData2, u64 eventData3, 125 u64 eventData1, u64 eventData2, u64 eventData3,
137 u64 eventData4, u64 eventData5) 126 u64 eventData4, u64 eventData5)
138{ 127{
139 HvLpEvent_Rc retVal; 128 /* Pack the misc bits into a single Dword to pass to PLIC */
140
141 // Pack the misc bits into a single Dword to pass to PLIC
142 union { 129 union {
143 struct HvCallEvent_PackedParms parms; 130 struct HvCallEvent_PackedParms parms;
144 u64 dword; 131 u64 dword;
@@ -152,67 +139,49 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
152 packed.parms.xSourceInstId = sourceInstanceId; 139 packed.parms.xSourceInstId = sourceInstanceId;
153 packed.parms.xTargetInstId = targetInstanceId; 140 packed.parms.xTargetInstId = targetInstanceId;
154 141
155 retVal = (HvLpEvent_Rc)HvCall7(HvCallEventSignalLpEventParms, 142 return HvCall7(HvCallEventSignalLpEventParms, packed.dword,
156 packed.dword, correlationToken, eventData1,eventData2, 143 correlationToken, eventData1, eventData2,
157 eventData3,eventData4, eventData5); 144 eventData3, eventData4, eventData5);
158 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
159 return retVal;
160} 145}
161 146
162static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event) 147static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event)
163{ 148{
164 u64 abs_addr; 149 u64 abs_addr;
165 HvLpEvent_Rc retVal;
166 150
167 abs_addr = virt_to_abs(event); 151 abs_addr = virt_to_abs(event);
168 retVal = (HvLpEvent_Rc)HvCall1(HvCallEventAckLpEvent, abs_addr); 152 return HvCall1(HvCallEventAckLpEvent, abs_addr);
169 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
170 return retVal;
171} 153}
172 154
173static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event) 155static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event)
174{ 156{
175 u64 abs_addr; 157 u64 abs_addr;
176 HvLpEvent_Rc retVal;
177 158
178 abs_addr = virt_to_abs(event); 159 abs_addr = virt_to_abs(event);
179 retVal = (HvLpEvent_Rc)HvCall1(HvCallEventCancelLpEvent, abs_addr); 160 return HvCall1(HvCallEventCancelLpEvent, abs_addr);
180 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
181 return retVal;
182} 161}
183 162
184static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId( 163static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId(
185 HvLpIndex targetLp, HvLpEvent_Type type) 164 HvLpIndex targetLp, HvLpEvent_Type type)
186{ 165{
187 HvLpInstanceId retVal; 166 return HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type);
188
189 retVal = HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type);
190 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
191 return retVal;
192} 167}
193 168
194static inline HvLpInstanceId HvCallEvent_getTargetLpInstanceId( 169static inline HvLpInstanceId HvCallEvent_getTargetLpInstanceId(
195 HvLpIndex targetLp, HvLpEvent_Type type) 170 HvLpIndex targetLp, HvLpEvent_Type type)
196{ 171{
197 HvLpInstanceId retVal; 172 return HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type);
198
199 retVal = HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type);
200 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
201 return retVal;
202} 173}
203 174
204static inline void HvCallEvent_openLpEventPath(HvLpIndex targetLp, 175static inline void HvCallEvent_openLpEventPath(HvLpIndex targetLp,
205 HvLpEvent_Type type) 176 HvLpEvent_Type type)
206{ 177{
207 HvCall2(HvCallEventOpenLpEventPath, targetLp, type); 178 HvCall2(HvCallEventOpenLpEventPath, targetLp, type);
208 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
209} 179}
210 180
211static inline void HvCallEvent_closeLpEventPath(HvLpIndex targetLp, 181static inline void HvCallEvent_closeLpEventPath(HvLpIndex targetLp,
212 HvLpEvent_Type type) 182 HvLpEvent_Type type)
213{ 183{
214 HvCall2(HvCallEventCloseLpEventPath, targetLp, type); 184 HvCall2(HvCallEventCloseLpEventPath, targetLp, type);
215 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
216} 185}
217 186
218static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type, 187static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
@@ -224,8 +193,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
224 /* Do these need to be converted to absolute addresses? */ 193 /* Do these need to be converted to absolute addresses? */
225 u64 localBufList, u64 remoteBufList, u32 transferLength) 194 u64 localBufList, u64 remoteBufList, u32 transferLength)
226{ 195{
227 HvLpDma_Rc retVal; 196 /* Pack the misc bits into a single Dword to pass to PLIC */
228 // Pack the misc bits into a single Dword to pass to PLIC
229 union { 197 union {
230 struct HvCallEvent_PackedDmaParms parms; 198 struct HvCallEvent_PackedDmaParms parms;
231 u64 dword; 199 u64 dword;
@@ -241,11 +209,8 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
241 packed.parms.xLocalInstId = localInstanceId; 209 packed.parms.xLocalInstId = localInstanceId;
242 packed.parms.xRemoteInstId = remoteInstanceId; 210 packed.parms.xRemoteInstId = remoteInstanceId;
243 211
244 retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaBufList, 212 return HvCall4(HvCallEventDmaBufList, packed.dword, localBufList,
245 packed.dword, localBufList, remoteBufList, 213 remoteBufList, transferLength);
246 transferLength);
247 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
248 return retVal;
249} 214}
250 215
251static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type, 216static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
@@ -256,8 +221,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
256 HvLpDma_AddressType remoteAddressType, 221 HvLpDma_AddressType remoteAddressType,
257 u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength) 222 u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength)
258{ 223{
259 HvLpDma_Rc retVal; 224 /* Pack the misc bits into a single Dword to pass to PLIC */
260 // Pack the misc bits into a single Dword to pass to PLIC
261 union { 225 union {
262 struct HvCallEvent_PackedDmaParms parms; 226 struct HvCallEvent_PackedDmaParms parms;
263 u64 dword; 227 u64 dword;
@@ -273,25 +237,17 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
273 packed.parms.xLocalInstId = localInstanceId; 237 packed.parms.xLocalInstId = localInstanceId;
274 packed.parms.xRemoteInstId = remoteInstanceId; 238 packed.parms.xRemoteInstId = remoteInstanceId;
275 239
276 retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle, 240 return (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle, packed.dword,
277 packed.dword, localAddrOrTce, remoteAddrOrTce, 241 localAddrOrTce, remoteAddrOrTce, transferLength);
278 transferLength);
279 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
280 return retVal;
281} 242}
282 243
283static inline HvLpDma_Rc HvCallEvent_dmaToSp(void* local, u32 remote, 244static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote,
284 u32 length, HvLpDma_Direction dir) 245 u32 length, HvLpDma_Direction dir)
285{ 246{
286 u64 abs_addr; 247 u64 abs_addr;
287 HvLpDma_Rc retVal;
288 248
289 abs_addr = virt_to_abs(local); 249 abs_addr = virt_to_abs(local);
290 retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaToSp, abs_addr, remote, 250 return HvCall4(HvCallEventDmaToSp, abs_addr, remote, length, dir);
291 length, dir);
292 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
293 return retVal;
294} 251}
295 252
296
297#endif /* _HVCALLEVENT_H */ 253#endif /* _HVCALLEVENT_H */