aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64
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
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')
-rw-r--r--include/asm-ppc64/iSeries/HvCallCfg.h61
-rw-r--r--include/asm-ppc64/iSeries/HvCallEvent.h65
-rw-r--r--include/asm-ppc64/iSeries/HvCallHpt.h23
-rw-r--r--include/asm-ppc64/iSeries/HvCallPci.h146
-rw-r--r--include/asm-ppc64/iSeries/HvCallSm.h5
-rw-r--r--include/asm-ppc64/iSeries/HvCallXm.h35
-rw-r--r--include/asm-ppc64/iSeries/HvLpConfig.h3
-rw-r--r--include/asm-ppc64/iSeries/XmPciLpEvent.h12
-rw-r--r--include/asm-ppc64/iSeries/iSeries_irq.h18
-rw-r--r--include/asm-ppc64/iSeries/iSeries_pci.h2
-rw-r--r--include/asm-ppc64/iSeries/vio.h20
11 files changed, 92 insertions, 298 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallCfg.h b/include/asm-ppc64/iSeries/HvCallCfg.h
index 2223a9647d0e..aa491c3ad0a2 100644
--- a/include/asm-ppc64/iSeries/HvCallCfg.h
+++ b/include/asm-ppc64/iSeries/HvCallCfg.h
@@ -69,37 +69,27 @@ enum HvCallCfg_ReqQual {
69 69
70static inline HvLpIndex HvCallCfg_getLps(void) 70static inline HvLpIndex HvCallCfg_getLps(void)
71{ 71{
72 HvLpIndex retVal = HvCall0(HvCallCfgGetLps); 72 return HvCall0(HvCallCfgGetLps);
73 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
74 return retVal;
75} 73}
76 74
77static inline int HvCallCfg_isBusDedicated(u64 busIndex) 75static inline int HvCallCfg_isBusDedicated(u64 busIndex)
78{ 76{
79 int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex); 77 return HvCall1(HvCallCfgIsBusDedicated, busIndex);
80 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
81 return retVal;
82} 78}
83 79
84static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex) 80static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex)
85{ 81{
86 HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex); 82 return HvCall1(HvCallCfgGetBusOwner, busIndex);
87 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
88 return retVal;
89} 83}
90 84
91static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex) 85static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex)
92{ 86{
93 HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex); 87 return HvCall1(HvCallCfgGetBusAllocation, busIndex);
94 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
95 return retVal;
96} 88}
97 89
98static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void) 90static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void)
99{ 91{
100 HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap); 92 return HvCall0(HvCallCfgGetActiveLpMap);
101 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
102 return retVal;
103} 93}
104 94
105static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap( 95static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(
@@ -112,23 +102,18 @@ static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(
112 u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp); 102 u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
113 if (retVal == -1) 103 if (retVal == -1)
114 retVal = 0; 104 retVal = 0;
115 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
116 return retVal; 105 return retVal;
117} 106}
118 107
119static inline u64 HvCallCfg_getSystemMsChunks(void) 108static inline u64 HvCallCfg_getSystemMsChunks(void)
120{ 109{
121 u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks); 110 return HvCall0(HvCallCfgGetSystemMsChunks);
122 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
123 return retVal;
124} 111}
125 112
126static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp, 113static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp,
127 enum HvCallCfg_ReqQual qual) 114 enum HvCallCfg_ReqQual qual)
128{ 115{
129 u64 retVal = HvCall2(HvCallCfgGetMsChunks,lp,qual); 116 return HvCall2(HvCallCfgGetMsChunks, lp, qual);
130 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
131 return retVal;
132} 117}
133 118
134static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp) 119static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp)
@@ -142,65 +127,51 @@ static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp)
142 127
143static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks) 128static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks)
144{ 129{
145 u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks); 130 return HvCall1(HvCallCfgSetMinRuntimeMsChunks, chunks);
146 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
147 return retVal;
148} 131}
149 132
150static inline u64 HvCallCfg_getSystemPhysicalProcessors(void) 133static inline u64 HvCallCfg_getSystemPhysicalProcessors(void)
151{ 134{
152 u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors); 135 return HvCall0(HvCallCfgGetSystemPhysicalProcessors);
153 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
154 return retVal;
155} 136}
156 137
157static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp, 138static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp,
158 enum HvCallCfg_ReqQual qual) 139 enum HvCallCfg_ReqQual qual)
159{ 140{
160 u64 retVal = HvCall2(HvCallCfgGetPhysicalProcessors,lp,qual); 141 return HvCall2(HvCallCfgGetPhysicalProcessors, lp, qual);
161 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
162 return retVal;
163} 142}
164 143
165static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp, 144static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
166 u16 hvLogicalProcIndex) 145 u16 hvLogicalProcIndex)
167{ 146{
168 u64 retVal = HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc,lp,hvLogicalProcIndex); 147 return HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc, lp,
169 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 148 hvLogicalProcIndex);
170 return retVal;
171 149
172} 150}
173 151
174static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) 152static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
175{ 153{
176 HvLpSharedPoolIndex retVal = 154 return HvCall1(HvCallCfgGetSharedPoolIndex, lp);
177 HvCall1(HvCallCfgGetSharedPoolIndex,lp);
178 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
179 return retVal;
180 155
181} 156}
182 157
183static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp, 158static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp,
184 enum HvCallCfg_ReqQual qual) 159 enum HvCallCfg_ReqQual qual)
185{ 160{
186 u64 retVal = HvCall2(HvCallCfgGetSharedProcUnits,lp,qual); 161 return HvCall2(HvCallCfgGetSharedProcUnits, lp, qual);
187 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
188 return retVal;
189 162
190} 163}
191 164
192static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) 165static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
193{ 166{
194 u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI); 167 u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI);
195 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
196 return retVal; 168 return retVal;
197 169
198} 170}
199 171
200static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) 172static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp)
201{ 173{
202 u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp); 174 u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex, lp);
203 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
204 return retVal; 175 return retVal;
205} 176}
206 177
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 */
diff --git a/include/asm-ppc64/iSeries/HvCallHpt.h b/include/asm-ppc64/iSeries/HvCallHpt.h
index 827d26c60fc1..66f38222ff75 100644
--- a/include/asm-ppc64/iSeries/HvCallHpt.h
+++ b/include/asm-ppc64/iSeries/HvCallHpt.h
@@ -43,34 +43,27 @@
43 43
44static inline u64 HvCallHpt_getHptAddress(void) 44static inline u64 HvCallHpt_getHptAddress(void)
45{ 45{
46 u64 retval = HvCall0(HvCallHptGetHptAddress); 46 return HvCall0(HvCallHptGetHptAddress);
47 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
48 return retval;
49} 47}
50 48
51static inline u64 HvCallHpt_getHptPages(void) 49static inline u64 HvCallHpt_getHptPages(void)
52{ 50{
53 u64 retval = HvCall0(HvCallHptGetHptPages); 51 return HvCall0(HvCallHptGetHptPages);
54 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
55 return retval;
56} 52}
57 53
58static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value) 54static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value)
59{ 55{
60 HvCall2(HvCallHptSetPp, hpteIndex, value); 56 HvCall2(HvCallHptSetPp, hpteIndex, value);
61 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
62} 57}
63 58
64static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff) 59static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff)
65{ 60{
66 HvCall3(HvCallHptSetSwBits, hpteIndex, bitson, bitsoff); 61 HvCall3(HvCallHptSetSwBits, hpteIndex, bitson, bitsoff);
67 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
68} 62}
69 63
70static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex) 64static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)
71{ 65{
72 HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); 66 HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex);
73 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
74} 67}
75 68
76static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, 69static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson,
@@ -81,36 +74,30 @@ static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson,
81 compressedStatus = HvCall4(HvCallHptInvalidateSetSwBitsGet, 74 compressedStatus = HvCall4(HvCallHptInvalidateSetSwBitsGet,
82 hpteIndex, bitson, bitsoff, 1); 75 hpteIndex, bitson, bitsoff, 1);
83 HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex); 76 HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex);
84 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
85 return compressedStatus; 77 return compressedStatus;
86} 78}
87 79
88static inline u64 HvCallHpt_findValid(HPTE *hpte, u64 vpn) 80static inline u64 HvCallHpt_findValid(HPTE *hpte, u64 vpn)
89{ 81{
90 u64 retIndex = HvCall3Ret16( HvCallHptFindValid, hpte, vpn, 0, 0 ); 82 return HvCall3Ret16(HvCallHptFindValid, hpte, vpn, 0, 0);
91 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
92 return retIndex;
93} 83}
94 84
95static inline u64 HvCallHpt_findNextValid(HPTE *hpte, u32 hpteIndex, 85static inline u64 HvCallHpt_findNextValid(HPTE *hpte, u32 hpteIndex,
96 u8 bitson, u8 bitsoff) 86 u8 bitson, u8 bitsoff)
97{ 87{
98 u64 retIndex = HvCall3Ret16( HvCallHptFindNextValid, hpte, hpteIndex, bitson, bitsoff ); 88 return HvCall3Ret16(HvCallHptFindNextValid, hpte, hpteIndex,
99 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 89 bitson, bitsoff);
100 return retIndex;
101} 90}
102 91
103static inline void HvCallHpt_get(HPTE *hpte, u32 hpteIndex) 92static inline void HvCallHpt_get(HPTE *hpte, u32 hpteIndex)
104{ 93{
105 HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0); 94 HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0);
106 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
107} 95}
108 96
109static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, HPTE *hpte) 97static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, HPTE *hpte)
110{ 98{
111 HvCall4(HvCallHptAddValidate, hpteIndex, hBit, (*((u64 *)hpte)), 99 HvCall4(HvCallHptAddValidate, hpteIndex, hBit, (*((u64 *)hpte)),
112 (*(((u64 *)hpte)+1))); 100 (*(((u64 *)hpte)+1)));
113 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
114} 101}
115 102
116#endif /* _HVCALLHPT_H */ 103#endif /* _HVCALLHPT_H */
diff --git a/include/asm-ppc64/iSeries/HvCallPci.h b/include/asm-ppc64/iSeries/HvCallPci.h
index 346ab5d39dcd..c8d675c40f5e 100644
--- a/include/asm-ppc64/iSeries/HvCallPci.h
+++ b/include/asm-ppc64/iSeries/HvCallPci.h
@@ -140,8 +140,6 @@ static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber,
140 140
141 HvCall3Ret16(HvCallPciConfigLoad8, &retVal, *(u64 *)&dsa, offset, 0); 141 HvCall3Ret16(HvCallPciConfigLoad8, &retVal, *(u64 *)&dsa, offset, 0);
142 142
143 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
144
145 *value = retVal.value; 143 *value = retVal.value;
146 144
147 return retVal.rc; 145 return retVal.rc;
@@ -161,8 +159,6 @@ static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber,
161 159
162 HvCall3Ret16(HvCallPciConfigLoad16, &retVal, *(u64 *)&dsa, offset, 0); 160 HvCall3Ret16(HvCallPciConfigLoad16, &retVal, *(u64 *)&dsa, offset, 0);
163 161
164 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
165
166 *value = retVal.value; 162 *value = retVal.value;
167 163
168 return retVal.rc; 164 return retVal.rc;
@@ -182,8 +178,6 @@ static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber,
182 178
183 HvCall3Ret16(HvCallPciConfigLoad32, &retVal, *(u64 *)&dsa, offset, 0); 179 HvCall3Ret16(HvCallPciConfigLoad32, &retVal, *(u64 *)&dsa, offset, 0);
184 180
185 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
186
187 *value = retVal.value; 181 *value = retVal.value;
188 182
189 return retVal.rc; 183 return retVal.rc;
@@ -193,7 +187,6 @@ static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber,
193 u8 deviceId, u32 offset, u8 value) 187 u8 deviceId, u32 offset, u8 value)
194{ 188{
195 struct HvCallPci_DsaAddr dsa; 189 struct HvCallPci_DsaAddr dsa;
196 u64 retVal;
197 190
198 *((u64*)&dsa) = 0; 191 *((u64*)&dsa) = 0;
199 192
@@ -201,18 +194,13 @@ static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber,
201 dsa.subBusNumber = subBusNumber; 194 dsa.subBusNumber = subBusNumber;
202 dsa.deviceId = deviceId; 195 dsa.deviceId = deviceId;
203 196
204 retVal = HvCall4(HvCallPciConfigStore8, *(u64 *)&dsa, offset, value, 0); 197 return HvCall4(HvCallPciConfigStore8, *(u64 *)&dsa, offset, value, 0);
205
206 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
207
208 return retVal;
209} 198}
210 199
211static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber, 200static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber,
212 u8 deviceId, u32 offset, u16 value) 201 u8 deviceId, u32 offset, u16 value)
213{ 202{
214 struct HvCallPci_DsaAddr dsa; 203 struct HvCallPci_DsaAddr dsa;
215 u64 retVal;
216 204
217 *((u64*)&dsa) = 0; 205 *((u64*)&dsa) = 0;
218 206
@@ -220,18 +208,13 @@ static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber,
220 dsa.subBusNumber = subBusNumber; 208 dsa.subBusNumber = subBusNumber;
221 dsa.deviceId = deviceId; 209 dsa.deviceId = deviceId;
222 210
223 retVal = HvCall4(HvCallPciConfigStore16, *(u64 *)&dsa, offset, value, 0); 211 return HvCall4(HvCallPciConfigStore16, *(u64 *)&dsa, offset, value, 0);
224
225 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
226
227 return retVal;
228} 212}
229 213
230static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber, 214static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber,
231 u8 deviceId, u32 offset, u32 value) 215 u8 deviceId, u32 offset, u32 value)
232{ 216{
233 struct HvCallPci_DsaAddr dsa; 217 struct HvCallPci_DsaAddr dsa;
234 u64 retVal;
235 218
236 *((u64*)&dsa) = 0; 219 *((u64*)&dsa) = 0;
237 220
@@ -239,11 +222,7 @@ static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber,
239 dsa.subBusNumber = subBusNumber; 222 dsa.subBusNumber = subBusNumber;
240 dsa.deviceId = deviceId; 223 dsa.deviceId = deviceId;
241 224
242 retVal = HvCall4(HvCallPciConfigStore32, *(u64 *)&dsa, offset, value, 0); 225 return HvCall4(HvCallPciConfigStore32, *(u64 *)&dsa, offset, value, 0);
243
244 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
245
246 return retVal;
247} 226}
248 227
249static inline u64 HvCallPci_barLoad8(u16 busNumberParm, u8 subBusParm, 228static inline u64 HvCallPci_barLoad8(u16 busNumberParm, u8 subBusParm,
@@ -262,8 +241,6 @@ static inline u64 HvCallPci_barLoad8(u16 busNumberParm, u8 subBusParm,
262 241
263 HvCall3Ret16(HvCallPciBarLoad8, &retVal, *(u64 *)&dsa, offsetParm, 0); 242 HvCall3Ret16(HvCallPciBarLoad8, &retVal, *(u64 *)&dsa, offsetParm, 0);
264 243
265 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
266
267 *valueParm = retVal.value; 244 *valueParm = retVal.value;
268 245
269 return retVal.rc; 246 return retVal.rc;
@@ -285,8 +262,6 @@ static inline u64 HvCallPci_barLoad16(u16 busNumberParm, u8 subBusParm,
285 262
286 HvCall3Ret16(HvCallPciBarLoad16, &retVal, *(u64 *)&dsa, offsetParm, 0); 263 HvCall3Ret16(HvCallPciBarLoad16, &retVal, *(u64 *)&dsa, offsetParm, 0);
287 264
288 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
289
290 *valueParm = retVal.value; 265 *valueParm = retVal.value;
291 266
292 return retVal.rc; 267 return retVal.rc;
@@ -308,8 +283,6 @@ static inline u64 HvCallPci_barLoad32(u16 busNumberParm, u8 subBusParm,
308 283
309 HvCall3Ret16(HvCallPciBarLoad32, &retVal, *(u64 *)&dsa, offsetParm, 0); 284 HvCall3Ret16(HvCallPciBarLoad32, &retVal, *(u64 *)&dsa, offsetParm, 0);
310 285
311 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
312
313 *valueParm = retVal.value; 286 *valueParm = retVal.value;
314 287
315 return retVal.rc; 288 return retVal.rc;
@@ -331,8 +304,6 @@ static inline u64 HvCallPci_barLoad64(u16 busNumberParm, u8 subBusParm,
331 304
332 HvCall3Ret16(HvCallPciBarLoad64, &retVal, *(u64 *)&dsa, offsetParm, 0); 305 HvCall3Ret16(HvCallPciBarLoad64, &retVal, *(u64 *)&dsa, offsetParm, 0);
333 306
334 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
335
336 *valueParm = retVal.value; 307 *valueParm = retVal.value;
337 308
338 return retVal.rc; 309 return retVal.rc;
@@ -343,7 +314,6 @@ static inline u64 HvCallPci_barStore8(u16 busNumberParm, u8 subBusParm,
343 u8 valueParm) 314 u8 valueParm)
344{ 315{
345 struct HvCallPci_DsaAddr dsa; 316 struct HvCallPci_DsaAddr dsa;
346 u64 retVal;
347 317
348 *((u64*)&dsa) = 0; 318 *((u64*)&dsa) = 0;
349 319
@@ -352,11 +322,8 @@ static inline u64 HvCallPci_barStore8(u16 busNumberParm, u8 subBusParm,
352 dsa.deviceId = deviceIdParm; 322 dsa.deviceId = deviceIdParm;
353 dsa.barNumber = barNumberParm; 323 dsa.barNumber = barNumberParm;
354 324
355 retVal = HvCall4(HvCallPciBarStore8, *(u64 *)&dsa, offsetParm, valueParm, 0); 325 return HvCall4(HvCallPciBarStore8, *(u64 *)&dsa, offsetParm,
356 326 valueParm, 0);
357 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
358
359 return retVal;
360} 327}
361 328
362static inline u64 HvCallPci_barStore16(u16 busNumberParm, u8 subBusParm, 329static inline u64 HvCallPci_barStore16(u16 busNumberParm, u8 subBusParm,
@@ -364,7 +331,6 @@ static inline u64 HvCallPci_barStore16(u16 busNumberParm, u8 subBusParm,
364 u16 valueParm) 331 u16 valueParm)
365{ 332{
366 struct HvCallPci_DsaAddr dsa; 333 struct HvCallPci_DsaAddr dsa;
367 u64 retVal;
368 334
369 *((u64*)&dsa) = 0; 335 *((u64*)&dsa) = 0;
370 336
@@ -373,11 +339,8 @@ static inline u64 HvCallPci_barStore16(u16 busNumberParm, u8 subBusParm,
373 dsa.deviceId = deviceIdParm; 339 dsa.deviceId = deviceIdParm;
374 dsa.barNumber = barNumberParm; 340 dsa.barNumber = barNumberParm;
375 341
376 retVal = HvCall4(HvCallPciBarStore16, *(u64 *)&dsa, offsetParm, valueParm, 0); 342 return HvCall4(HvCallPciBarStore16, *(u64 *)&dsa, offsetParm,
377 343 valueParm, 0);
378 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
379
380 return retVal;
381} 344}
382 345
383static inline u64 HvCallPci_barStore32(u16 busNumberParm, u8 subBusParm, 346static inline u64 HvCallPci_barStore32(u16 busNumberParm, u8 subBusParm,
@@ -385,7 +348,6 @@ static inline u64 HvCallPci_barStore32(u16 busNumberParm, u8 subBusParm,
385 u32 valueParm) 348 u32 valueParm)
386{ 349{
387 struct HvCallPci_DsaAddr dsa; 350 struct HvCallPci_DsaAddr dsa;
388 u64 retVal;
389 351
390 *((u64*)&dsa) = 0; 352 *((u64*)&dsa) = 0;
391 353
@@ -394,11 +356,8 @@ static inline u64 HvCallPci_barStore32(u16 busNumberParm, u8 subBusParm,
394 dsa.deviceId = deviceIdParm; 356 dsa.deviceId = deviceIdParm;
395 dsa.barNumber = barNumberParm; 357 dsa.barNumber = barNumberParm;
396 358
397 retVal = HvCall4(HvCallPciBarStore32, *(u64 *)&dsa, offsetParm, valueParm, 0); 359 return HvCall4(HvCallPciBarStore32, *(u64 *)&dsa, offsetParm,
398 360 valueParm, 0);
399 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
400
401 return retVal;
402} 361}
403 362
404static inline u64 HvCallPci_barStore64(u16 busNumberParm, u8 subBusParm, 363static inline u64 HvCallPci_barStore64(u16 busNumberParm, u8 subBusParm,
@@ -406,7 +365,6 @@ static inline u64 HvCallPci_barStore64(u16 busNumberParm, u8 subBusParm,
406 u64 valueParm) 365 u64 valueParm)
407{ 366{
408 struct HvCallPci_DsaAddr dsa; 367 struct HvCallPci_DsaAddr dsa;
409 u64 retVal;
410 368
411 *((u64*)&dsa) = 0; 369 *((u64*)&dsa) = 0;
412 370
@@ -415,11 +373,8 @@ static inline u64 HvCallPci_barStore64(u16 busNumberParm, u8 subBusParm,
415 dsa.deviceId = deviceIdParm; 373 dsa.deviceId = deviceIdParm;
416 dsa.barNumber = barNumberParm; 374 dsa.barNumber = barNumberParm;
417 375
418 retVal = HvCall4(HvCallPciBarStore64, *(u64 *)&dsa, offsetParm, valueParm, 0); 376 return HvCall4(HvCallPciBarStore64, *(u64 *)&dsa, offsetParm,
419 377 valueParm, 0);
420 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
421
422 return retVal;
423} 378}
424 379
425static inline u64 HvCallPci_eoi(u16 busNumberParm, u8 subBusParm, 380static inline u64 HvCallPci_eoi(u16 busNumberParm, u8 subBusParm,
@@ -436,8 +391,6 @@ static inline u64 HvCallPci_eoi(u16 busNumberParm, u8 subBusParm,
436 391
437 HvCall1Ret16(HvCallPciEoi, &retVal, *(u64*)&dsa); 392 HvCall1Ret16(HvCallPciEoi, &retVal, *(u64*)&dsa);
438 393
439 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
440
441 return retVal.rc; 394 return retVal.rc;
442} 395}
443 396
@@ -445,7 +398,6 @@ static inline u64 HvCallPci_getBarParms(u16 busNumberParm, u8 subBusParm,
445 u8 deviceIdParm, u8 barNumberParm, u64 parms, u32 sizeofParms) 398 u8 deviceIdParm, u8 barNumberParm, u64 parms, u32 sizeofParms)
446{ 399{
447 struct HvCallPci_DsaAddr dsa; 400 struct HvCallPci_DsaAddr dsa;
448 u64 retVal;
449 401
450 *((u64*)&dsa) = 0; 402 *((u64*)&dsa) = 0;
451 403
@@ -454,18 +406,13 @@ static inline u64 HvCallPci_getBarParms(u16 busNumberParm, u8 subBusParm,
454 dsa.deviceId = deviceIdParm; 406 dsa.deviceId = deviceIdParm;
455 dsa.barNumber = barNumberParm; 407 dsa.barNumber = barNumberParm;
456 408
457 retVal = HvCall3(HvCallPciGetBarParms, *(u64*)&dsa, parms, sizeofParms); 409 return HvCall3(HvCallPciGetBarParms, *(u64*)&dsa, parms, sizeofParms);
458
459 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
460
461 return retVal;
462} 410}
463 411
464static inline u64 HvCallPci_maskFisr(u16 busNumberParm, u8 subBusParm, 412static inline u64 HvCallPci_maskFisr(u16 busNumberParm, u8 subBusParm,
465 u8 deviceIdParm, u64 fisrMask) 413 u8 deviceIdParm, u64 fisrMask)
466{ 414{
467 struct HvCallPci_DsaAddr dsa; 415 struct HvCallPci_DsaAddr dsa;
468 u64 retVal;
469 416
470 *((u64*)&dsa) = 0; 417 *((u64*)&dsa) = 0;
471 418
@@ -473,18 +420,13 @@ static inline u64 HvCallPci_maskFisr(u16 busNumberParm, u8 subBusParm,
473 dsa.subBusNumber = subBusParm; 420 dsa.subBusNumber = subBusParm;
474 dsa.deviceId = deviceIdParm; 421 dsa.deviceId = deviceIdParm;
475 422
476 retVal = HvCall2(HvCallPciMaskFisr, *(u64*)&dsa, fisrMask); 423 return HvCall2(HvCallPciMaskFisr, *(u64*)&dsa, fisrMask);
477
478 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
479
480 return retVal;
481} 424}
482 425
483static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, u8 subBusParm, 426static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, u8 subBusParm,
484 u8 deviceIdParm, u64 fisrMask) 427 u8 deviceIdParm, u64 fisrMask)
485{ 428{
486 struct HvCallPci_DsaAddr dsa; 429 struct HvCallPci_DsaAddr dsa;
487 u64 retVal;
488 430
489 *((u64*)&dsa) = 0; 431 *((u64*)&dsa) = 0;
490 432
@@ -492,18 +434,13 @@ static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, u8 subBusParm,
492 dsa.subBusNumber = subBusParm; 434 dsa.subBusNumber = subBusParm;
493 dsa.deviceId = deviceIdParm; 435 dsa.deviceId = deviceIdParm;
494 436
495 retVal = HvCall2(HvCallPciUnmaskFisr, *(u64*)&dsa, fisrMask); 437 return HvCall2(HvCallPciUnmaskFisr, *(u64*)&dsa, fisrMask);
496
497 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
498
499 return retVal;
500} 438}
501 439
502static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, u8 subBusParm, 440static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, u8 subBusParm,
503 u8 deviceIdParm, u64 onNotOff) 441 u8 deviceIdParm, u64 onNotOff)
504{ 442{
505 struct HvCallPci_DsaAddr dsa; 443 struct HvCallPci_DsaAddr dsa;
506 u64 retVal;
507 444
508 *((u64*)&dsa) = 0; 445 *((u64*)&dsa) = 0;
509 446
@@ -511,18 +448,13 @@ static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, u8 subBusParm,
511 dsa.subBusNumber = subBusParm; 448 dsa.subBusNumber = subBusParm;
512 dsa.deviceId = deviceIdParm; 449 dsa.deviceId = deviceIdParm;
513 450
514 retVal = HvCall2(HvCallPciSetSlotReset, *(u64*)&dsa, onNotOff); 451 return HvCall2(HvCallPciSetSlotReset, *(u64*)&dsa, onNotOff);
515
516 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
517
518 return retVal;
519} 452}
520 453
521static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, u8 subBusParm, 454static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, u8 subBusParm,
522 u8 deviceNumberParm, u64 parms, u32 sizeofParms) 455 u8 deviceNumberParm, u64 parms, u32 sizeofParms)
523{ 456{
524 struct HvCallPci_DsaAddr dsa; 457 struct HvCallPci_DsaAddr dsa;
525 u64 retVal;
526 458
527 *((u64*)&dsa) = 0; 459 *((u64*)&dsa) = 0;
528 460
@@ -530,18 +462,13 @@ static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, u8 subBusParm,
530 dsa.subBusNumber = subBusParm; 462 dsa.subBusNumber = subBusParm;
531 dsa.deviceId = deviceNumberParm << 4; 463 dsa.deviceId = deviceNumberParm << 4;
532 464
533 retVal = HvCall3(HvCallPciGetDeviceInfo, *(u64*)&dsa, parms, sizeofParms); 465 return HvCall3(HvCallPciGetDeviceInfo, *(u64*)&dsa, parms, sizeofParms);
534
535 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
536
537 return retVal;
538} 466}
539 467
540static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm, u8 subBusParm, 468static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm, u8 subBusParm,
541 u8 deviceIdParm, u64 interruptMask) 469 u8 deviceIdParm, u64 interruptMask)
542{ 470{
543 struct HvCallPci_DsaAddr dsa; 471 struct HvCallPci_DsaAddr dsa;
544 u64 retVal;
545 472
546 *((u64*)&dsa) = 0; 473 *((u64*)&dsa) = 0;
547 474
@@ -549,18 +476,13 @@ static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm, u8 subBusParm,
549 dsa.subBusNumber = subBusParm; 476 dsa.subBusNumber = subBusParm;
550 dsa.deviceId = deviceIdParm; 477 dsa.deviceId = deviceIdParm;
551 478
552 retVal = HvCall2(HvCallPciMaskInterrupts, *(u64*)&dsa, interruptMask); 479 return HvCall2(HvCallPciMaskInterrupts, *(u64*)&dsa, interruptMask);
553
554 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
555
556 return retVal;
557} 480}
558 481
559static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm, u8 subBusParm, 482static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm, u8 subBusParm,
560 u8 deviceIdParm, u64 interruptMask) 483 u8 deviceIdParm, u64 interruptMask)
561{ 484{
562 struct HvCallPci_DsaAddr dsa; 485 struct HvCallPci_DsaAddr dsa;
563 u64 retVal;
564 486
565 *((u64*)&dsa) = 0; 487 *((u64*)&dsa) = 0;
566 488
@@ -568,18 +490,13 @@ static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm, u8 subBusParm,
568 dsa.subBusNumber = subBusParm; 490 dsa.subBusNumber = subBusParm;
569 dsa.deviceId = deviceIdParm; 491 dsa.deviceId = deviceIdParm;
570 492
571 retVal = HvCall2(HvCallPciUnmaskInterrupts, *(u64*)&dsa, interruptMask); 493 return HvCall2(HvCallPciUnmaskInterrupts, *(u64*)&dsa, interruptMask);
572
573 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
574
575 return retVal;
576} 494}
577 495
578static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm, u8 subBusParm, 496static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm, u8 subBusParm,
579 u8 deviceIdParm, u64 parms, u32 sizeofParms) 497 u8 deviceIdParm, u64 parms, u32 sizeofParms)
580{ 498{
581 struct HvCallPci_DsaAddr dsa; 499 struct HvCallPci_DsaAddr dsa;
582 u64 retVal;
583 500
584 *((u64*)&dsa) = 0; 501 *((u64*)&dsa) = 0;
585 502
@@ -587,37 +504,30 @@ static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm, u8 subBusParm,
587 dsa.subBusNumber = subBusParm; 504 dsa.subBusNumber = subBusParm;
588 dsa.deviceId = deviceIdParm; 505 dsa.deviceId = deviceIdParm;
589 506
590 retVal = HvCall3(HvCallPciGetBusUnitInfo, *(u64*)&dsa, parms, sizeofParms); 507 return HvCall3(HvCallPciGetBusUnitInfo, *(u64*)&dsa, parms,
591 508 sizeofParms);
592 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
593
594 return retVal;
595} 509}
596 510
597static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm, 511static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm,
598 u16 sizeParm) 512 u16 sizeParm)
599{ 513{
600 int xRetSize; 514 u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm,
601 u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusVpd); 515 sizeParm, HvCallPci_BusVpd);
602 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
603 if (xRc == -1) 516 if (xRc == -1)
604 xRetSize = -1; 517 return -1;
605 else 518 else
606 xRetSize = xRc & 0xFFFF; 519 return xRc & 0xFFFF;
607 return xRetSize;
608} 520}
609 521
610static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, 522static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm,
611 u16 sizeParm) 523 u16 sizeParm)
612{ 524{
613 int xRetSize; 525 u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm,
614 u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusAdapterVpd); 526 sizeParm, HvCallPci_BusAdapterVpd);
615 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
616 if (xRc == -1) 527 if (xRc == -1)
617 xRetSize = -1; 528 return -1;
618 else 529 else
619 xRetSize = xRc & 0xFFFF; 530 return xRc & 0xFFFF;
620 return xRetSize;
621} 531}
622 532
623#endif /* _HVCALLPCI_H */ 533#endif /* _HVCALLPCI_H */
diff --git a/include/asm-ppc64/iSeries/HvCallSm.h b/include/asm-ppc64/iSeries/HvCallSm.h
index ef6b303e4d28..8a3dbb071a43 100644
--- a/include/asm-ppc64/iSeries/HvCallSm.h
+++ b/include/asm-ppc64/iSeries/HvCallSm.h
@@ -32,10 +32,7 @@
32static inline u64 HvCallSm_get64BitsOfAccessMap(HvLpIndex lpIndex, 32static inline u64 HvCallSm_get64BitsOfAccessMap(HvLpIndex lpIndex,
33 u64 indexIntoBitMap) 33 u64 indexIntoBitMap)
34{ 34{
35 u64 retval = HvCall2(HvCallSmGet64BitsOfAccessMap, lpIndex, 35 return HvCall2(HvCallSmGet64BitsOfAccessMap, lpIndex, indexIntoBitMap);
36 indexIntoBitMap );
37 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
38 return retval;
39} 36}
40 37
41#endif /* _HVCALLSM_H */ 38#endif /* _HVCALLSM_H */
diff --git a/include/asm-ppc64/iSeries/HvCallXm.h b/include/asm-ppc64/iSeries/HvCallXm.h
index a99f29b93611..1362a425913f 100644
--- a/include/asm-ppc64/iSeries/HvCallXm.h
+++ b/include/asm-ppc64/iSeries/HvCallXm.h
@@ -19,58 +19,43 @@
19static inline void HvCallXm_getTceTableParms(u64 cb) 19static inline void HvCallXm_getTceTableParms(u64 cb)
20{ 20{
21 HvCall1(HvCallXmGetTceTableParms, cb); 21 HvCall1(HvCallXmGetTceTableParms, cb);
22 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
23} 22}
24 23
25static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce) 24static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
26{ 25{
27 u64 retval = HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce ); 26 return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce);
28 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
29 return retval;
30} 27}
31 28
32static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, 29static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
33 u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4) 30 u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
34{ 31{
35 u64 retval = HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces, 32 return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
36 tce1, tce2, tce3, tce4 ); 33 tce1, tce2, tce3, tce4);
37 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
38 return retval;
39} 34}
40 35
41static inline u64 HvCallXm_testBus(u16 busNumber) 36static inline u64 HvCallXm_testBus(u16 busNumber)
42{ 37{
43 u64 retVal = HvCall1(HvCallXmTestBus, busNumber); 38 return HvCall1(HvCallXmTestBus, busNumber);
44 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
45 return retVal;
46} 39}
47 40
48static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, 41static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
49 u8 deviceId) 42 u8 deviceId)
50{ 43{
51 u64 busUnitNumber = (subBusNumber << 8) | deviceId; 44 return HvCall2(HvCallXmTestBusUnit, busNumber,
52 u64 retVal = HvCall2(HvCallXmTestBusUnit, busNumber, busUnitNumber); 45 (subBusNumber << 8) | deviceId);
53 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
54 return retVal;
55} 46}
56 47
57static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, 48static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
58 u8 deviceId, u64 interruptToken) 49 u8 deviceId, u64 interruptToken)
59{ 50{
60 u64 busUnitNumber = (subBusNumber << 8) | deviceId; 51 return HvCall5(HvCallXmConnectBusUnit, busNumber,
61 u64 queueIndex = 0; // HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)); 52 (subBusNumber << 8) | deviceId, interruptToken, 0,
62 53 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */);
63 u64 retVal = HvCall5(HvCallXmConnectBusUnit, busNumber, busUnitNumber,
64 interruptToken, 0, queueIndex);
65 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
66 return retVal;
67} 54}
68 55
69static inline u64 HvCallXm_loadTod(void) 56static inline u64 HvCallXm_loadTod(void)
70{ 57{
71 u64 retVal = HvCall0(HvCallXmLoadTod); 58 return HvCall0(HvCallXmLoadTod);
72 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
73 return retVal;
74} 59}
75 60
76#endif /* _HVCALLXM_H */ 61#endif /* _HVCALLXM_H */
diff --git a/include/asm-ppc64/iSeries/HvLpConfig.h b/include/asm-ppc64/iSeries/HvLpConfig.h
index 47311cc952d9..817698052ea8 100644
--- a/include/asm-ppc64/iSeries/HvLpConfig.h
+++ b/include/asm-ppc64/iSeries/HvLpConfig.h
@@ -281,8 +281,7 @@ static inline u64 HvLpConfig_getLoadPages(void)
281 281
282static inline int HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber) 282static inline int HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber)
283{ 283{
284 HvLpIndex busOwner = HvLpConfig_getBusOwner(busNumber); 284 return (HvLpConfig_getBusOwner(busNumber) == HvLpConfig_getLpIndex());
285 return (busOwner == HvLpConfig_getLpIndex());
286} 285}
287 286
288static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, 287static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1,
diff --git a/include/asm-ppc64/iSeries/XmPciLpEvent.h b/include/asm-ppc64/iSeries/XmPciLpEvent.h
index 9c800792bc5c..4936627b26d0 100644
--- a/include/asm-ppc64/iSeries/XmPciLpEvent.h
+++ b/include/asm-ppc64/iSeries/XmPciLpEvent.h
@@ -1,15 +1,7 @@
1#ifndef __XMPCILPEVENT_H__ 1#ifndef __XMPCILPEVENT_H__
2#define __XMPCILPEVENT_H__ 2#define __XMPCILPEVENT_H__
3 3
4#ifdef __cplusplus 4extern int XmPciLpEvent_init(void);
5extern "C" { 5extern void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
6#endif
7
8int XmPciLpEvent_init(void);
9void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
10
11#ifdef __cplusplus
12}
13#endif
14 6
15#endif /* __XMPCILPEVENT_H__ */ 7#endif /* __XMPCILPEVENT_H__ */
diff --git a/include/asm-ppc64/iSeries/iSeries_irq.h b/include/asm-ppc64/iSeries/iSeries_irq.h
index ff8ddede038c..fbd5f523ba1d 100644
--- a/include/asm-ppc64/iSeries/iSeries_irq.h
+++ b/include/asm-ppc64/iSeries/iSeries_irq.h
@@ -1,19 +1,11 @@
1#ifndef __ISERIES_IRQ_H__ 1#ifndef __ISERIES_IRQ_H__
2#define __ISERIES_IRQ_H__ 2#define __ISERIES_IRQ_H__
3 3
4#ifdef __cplusplus 4extern void iSeries_init_IRQ(void);
5extern "C" { 5extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId);
6#endif 6extern int iSeries_assign_IRQ(int, HvBusNumber, HvSubBusNumber, HvAgentId);
7extern void iSeries_activate_IRQs(void);
7 8
8void iSeries_init_IRQ(void); 9extern int XmPciLpEvent_init(void);
9int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId);
10int iSeries_assign_IRQ(int, HvBusNumber, HvSubBusNumber, HvAgentId);
11void iSeries_activate_IRQs(void);
12
13int XmPciLpEvent_init(void);
14
15#ifdef __cplusplus
16}
17#endif
18 10
19#endif /* __ISERIES_IRQ_H__ */ 11#endif /* __ISERIES_IRQ_H__ */
diff --git a/include/asm-ppc64/iSeries/iSeries_pci.h b/include/asm-ppc64/iSeries/iSeries_pci.h
index 9c6d64526d59..f45cd8a2e7be 100644
--- a/include/asm-ppc64/iSeries/iSeries_pci.h
+++ b/include/asm-ppc64/iSeries/iSeries_pci.h
@@ -55,7 +55,7 @@ struct iSeries_Device_Node;
55 */ 55 */
56 56
57#define ISERIES_PCI_AGENTID(idsel, func) \ 57#define ISERIES_PCI_AGENTID(idsel, func) \
58 ((idsel & 0x0F) << 4) | (func & 0x07) 58 (((idsel & 0x0F) << 4) | (func & 0x07))
59#define ISERIES_ENCODE_DEVICE(agentid) \ 59#define ISERIES_ENCODE_DEVICE(agentid) \
60 ((0x10) | ((agentid & 0x20) >> 2) | (agentid & 0x07)) 60 ((0x10) | ((agentid & 0x20) >> 2) | (agentid & 0x07))
61 61
diff --git a/include/asm-ppc64/iSeries/vio.h b/include/asm-ppc64/iSeries/vio.h
index 614088f61b8f..6c05e6257f53 100644
--- a/include/asm-ppc64/iSeries/vio.h
+++ b/include/asm-ppc64/iSeries/vio.h
@@ -58,16 +58,16 @@
58 */ 58 */
59typedef void (vio_event_handler_t) (struct HvLpEvent * event); 59typedef void (vio_event_handler_t) (struct HvLpEvent * event);
60 60
61int viopath_open(HvLpIndex remoteLp, int subtype, int numReq); 61extern int viopath_open(HvLpIndex remoteLp, int subtype, int numReq);
62int viopath_close(HvLpIndex remoteLp, int subtype, int numReq); 62extern int viopath_close(HvLpIndex remoteLp, int subtype, int numReq);
63int vio_setHandler(int subtype, vio_event_handler_t * beh); 63extern int vio_setHandler(int subtype, vio_event_handler_t * beh);
64int vio_clearHandler(int subtype); 64extern int vio_clearHandler(int subtype);
65int viopath_isactive(HvLpIndex lp); 65extern int viopath_isactive(HvLpIndex lp);
66HvLpInstanceId viopath_sourceinst(HvLpIndex lp); 66extern HvLpInstanceId viopath_sourceinst(HvLpIndex lp);
67HvLpInstanceId viopath_targetinst(HvLpIndex lp); 67extern HvLpInstanceId viopath_targetinst(HvLpIndex lp);
68void vio_set_hostlp(void); 68extern void vio_set_hostlp(void);
69void *vio_get_event_buffer(int subtype); 69extern void *vio_get_event_buffer(int subtype);
70void vio_free_event_buffer(int subtype, void *buffer); 70extern void vio_free_event_buffer(int subtype, void *buffer);
71 71
72extern HvLpIndex viopath_hostLp; 72extern HvLpIndex viopath_hostLp;
73extern HvLpIndex viopath_ourLp; 73extern HvLpIndex viopath_ourLp;