aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/iSeries/HvCallEvent.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-06-21 20:15:35 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 21:46:27 -0400
commit6b7feecb2f8fcab184a38916d10349bd6648e0bc (patch)
tree5c51827e85eff96d6c50b41fea428bcf0f1ba71a /include/asm-ppc64/iSeries/HvCallEvent.h
parentfcee38952609fccb2bdfe166b3b96bd75a292aa6 (diff)
[PATCH] ppc64 iSeries: obvious code simplifications
This patch does some obvious code cleanups in the iSeries headers files. - simplifies the bodies of lots of inline functions - parenthesises a macros result - removes C++ wrapping - adds "extern" to some function declarations There are no semantic changes. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCallEvent.h')
-rw-r--r--include/asm-ppc64/iSeries/HvCallEvent.h65
1 files changed, 13 insertions, 52 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallEvent.h b/include/asm-ppc64/iSeries/HvCallEvent.h
index a5954785512d..5d9a327d0122 100644
--- a/include/asm-ppc64/iSeries/HvCallEvent.h
+++ b/include/asm-ppc64/iSeries/HvCallEvent.h
@@ -82,13 +82,11 @@ typedef u64 HvLpDma_Rc;
82static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex) 82static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex)
83{ 83{
84 HvCall1(HvCallEventGetOverflowLpEvents, queueIndex); 84 HvCall1(HvCallEventGetOverflowLpEvents, queueIndex);
85 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
86} 85}
87 86
88static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex) 87static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
89{ 88{
90 HvCall1(HvCallEventSetInterLpQueueIndex, queueIndex); 89 HvCall1(HvCallEventSetInterLpQueueIndex, queueIndex);
91 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
92} 90}
93 91
94static inline void HvCallEvent_setLpEventStack(u8 queueIndex, 92static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
@@ -99,7 +97,6 @@ static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
99 abs_addr = virt_to_abs(eventStackAddr); 97 abs_addr = virt_to_abs(eventStackAddr);
100 HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr, 98 HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr,
101 eventStackSize); 99 eventStackSize);
102 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
103} 100}
104 101
105static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex, 102static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
@@ -107,22 +104,18 @@ static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
107{ 104{
108 HvCall2(HvCallEventSetLpEventQueueInterruptProc, queueIndex, 105 HvCall2(HvCallEventSetLpEventQueueInterruptProc, queueIndex,
109 lpLogicalProcIndex); 106 lpLogicalProcIndex);
110 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
111} 107}
112 108
113static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event) 109static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event)
114{ 110{
115 u64 abs_addr; 111 u64 abs_addr;
116 HvLpEvent_Rc retVal;
117 112
118#ifdef DEBUG_SENDEVENT 113#ifdef DEBUG_SENDEVENT
119 printk("HvCallEvent_signalLpEvent: *event = %016lx\n ", 114 printk("HvCallEvent_signalLpEvent: *event = %016lx\n ",
120 (unsigned long)event); 115 (unsigned long)event);
121#endif 116#endif
122 abs_addr = virt_to_abs(event); 117 abs_addr = virt_to_abs(event);
123 retVal = (HvLpEvent_Rc)HvCall1(HvCallEventSignalLpEvent, abs_addr); 118 return HvCall1(HvCallEventSignalLpEvent, abs_addr);
124 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
125 return retVal;
126} 119}
127 120
128static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp, 121static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
@@ -132,8 +125,6 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
132 u64 eventData1, u64 eventData2, u64 eventData3, 125 u64 eventData1, u64 eventData2, u64 eventData3,
133 u64 eventData4, u64 eventData5) 126 u64 eventData4, u64 eventData5)
134{ 127{
135 HvLpEvent_Rc retVal;
136
137 /* Pack the misc bits into a single Dword to pass to PLIC */ 128 /* Pack the misc bits into a single Dword to pass to PLIC */
138 union { 129 union {
139 struct HvCallEvent_PackedParms parms; 130 struct HvCallEvent_PackedParms parms;
@@ -148,67 +139,49 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
148 packed.parms.xSourceInstId = sourceInstanceId; 139 packed.parms.xSourceInstId = sourceInstanceId;
149 packed.parms.xTargetInstId = targetInstanceId; 140 packed.parms.xTargetInstId = targetInstanceId;
150 141
151 retVal = (HvLpEvent_Rc)HvCall7(HvCallEventSignalLpEventParms, 142 return HvCall7(HvCallEventSignalLpEventParms, packed.dword,
152 packed.dword, correlationToken, eventData1,eventData2, 143 correlationToken, eventData1, eventData2,
153 eventData3,eventData4, eventData5); 144 eventData3, eventData4, eventData5);
154 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
155 return retVal;
156} 145}
157 146
158static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event) 147static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event)
159{ 148{
160 u64 abs_addr; 149 u64 abs_addr;
161 HvLpEvent_Rc retVal;
162 150
163 abs_addr = virt_to_abs(event); 151 abs_addr = virt_to_abs(event);
164 retVal = (HvLpEvent_Rc)HvCall1(HvCallEventAckLpEvent, abs_addr); 152 return HvCall1(HvCallEventAckLpEvent, abs_addr);
165 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
166 return retVal;
167} 153}
168 154
169static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event) 155static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event)
170{ 156{
171 u64 abs_addr; 157 u64 abs_addr;
172 HvLpEvent_Rc retVal;
173 158
174 abs_addr = virt_to_abs(event); 159 abs_addr = virt_to_abs(event);
175 retVal = (HvLpEvent_Rc)HvCall1(HvCallEventCancelLpEvent, abs_addr); 160 return HvCall1(HvCallEventCancelLpEvent, abs_addr);
176 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
177 return retVal;
178} 161}
179 162
180static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId( 163static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId(
181 HvLpIndex targetLp, HvLpEvent_Type type) 164 HvLpIndex targetLp, HvLpEvent_Type type)
182{ 165{
183 HvLpInstanceId retVal; 166 return HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type);
184
185 retVal = HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type);
186 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
187 return retVal;
188} 167}
189 168
190static inline HvLpInstanceId HvCallEvent_getTargetLpInstanceId( 169static inline HvLpInstanceId HvCallEvent_getTargetLpInstanceId(
191 HvLpIndex targetLp, HvLpEvent_Type type) 170 HvLpIndex targetLp, HvLpEvent_Type type)
192{ 171{
193 HvLpInstanceId retVal; 172 return HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type);
194
195 retVal = HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type);
196 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
197 return retVal;
198} 173}
199 174
200static inline void HvCallEvent_openLpEventPath(HvLpIndex targetLp, 175static inline void HvCallEvent_openLpEventPath(HvLpIndex targetLp,
201 HvLpEvent_Type type) 176 HvLpEvent_Type type)
202{ 177{
203 HvCall2(HvCallEventOpenLpEventPath, targetLp, type); 178 HvCall2(HvCallEventOpenLpEventPath, targetLp, type);
204 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
205} 179}
206 180
207static inline void HvCallEvent_closeLpEventPath(HvLpIndex targetLp, 181static inline void HvCallEvent_closeLpEventPath(HvLpIndex targetLp,
208 HvLpEvent_Type type) 182 HvLpEvent_Type type)
209{ 183{
210 HvCall2(HvCallEventCloseLpEventPath, targetLp, type); 184 HvCall2(HvCallEventCloseLpEventPath, targetLp, type);
211 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
212} 185}
213 186
214static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type, 187static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
@@ -220,7 +193,6 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
220 /* Do these need to be converted to absolute addresses? */ 193 /* Do these need to be converted to absolute addresses? */
221 u64 localBufList, u64 remoteBufList, u32 transferLength) 194 u64 localBufList, u64 remoteBufList, u32 transferLength)
222{ 195{
223 HvLpDma_Rc retVal;
224 /* Pack the misc bits into a single Dword to pass to PLIC */ 196 /* Pack the misc bits into a single Dword to pass to PLIC */
225 union { 197 union {
226 struct HvCallEvent_PackedDmaParms parms; 198 struct HvCallEvent_PackedDmaParms parms;
@@ -237,11 +209,8 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
237 packed.parms.xLocalInstId = localInstanceId; 209 packed.parms.xLocalInstId = localInstanceId;
238 packed.parms.xRemoteInstId = remoteInstanceId; 210 packed.parms.xRemoteInstId = remoteInstanceId;
239 211
240 retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaBufList, 212 return HvCall4(HvCallEventDmaBufList, packed.dword, localBufList,
241 packed.dword, localBufList, remoteBufList, 213 remoteBufList, transferLength);
242 transferLength);
243 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
244 return retVal;
245} 214}
246 215
247static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type, 216static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
@@ -252,7 +221,6 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
252 HvLpDma_AddressType remoteAddressType, 221 HvLpDma_AddressType remoteAddressType,
253 u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength) 222 u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength)
254{ 223{
255 HvLpDma_Rc retVal;
256 /* Pack the misc bits into a single Dword to pass to PLIC */ 224 /* Pack the misc bits into a single Dword to pass to PLIC */
257 union { 225 union {
258 struct HvCallEvent_PackedDmaParms parms; 226 struct HvCallEvent_PackedDmaParms parms;
@@ -269,24 +237,17 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
269 packed.parms.xLocalInstId = localInstanceId; 237 packed.parms.xLocalInstId = localInstanceId;
270 packed.parms.xRemoteInstId = remoteInstanceId; 238 packed.parms.xRemoteInstId = remoteInstanceId;
271 239
272 retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle, 240 return (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle, packed.dword,
273 packed.dword, localAddrOrTce, remoteAddrOrTce, 241 localAddrOrTce, remoteAddrOrTce, transferLength);
274 transferLength);
275 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
276 return retVal;
277} 242}
278 243
279static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote, 244static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote,
280 u32 length, HvLpDma_Direction dir) 245 u32 length, HvLpDma_Direction dir)
281{ 246{
282 u64 abs_addr; 247 u64 abs_addr;
283 HvLpDma_Rc retVal;
284 248
285 abs_addr = virt_to_abs(local); 249 abs_addr = virt_to_abs(local);
286 retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaToSp, abs_addr, remote, 250 return HvCall4(HvCallEventDmaToSp, abs_addr, remote, length, dir);
287 length, dir);
288 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
289 return retVal;
290} 251}
291 252
292#endif /* _HVCALLEVENT_H */ 253#endif /* _HVCALLEVENT_H */