aboutsummaryrefslogtreecommitdiff
path: root/include/asm-ppc64/iSeries/HvCallEvent.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-06-21 17:15:35 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 18:46:27 -0700
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 a5954785512..5d9a327d012 100644
--- a/include/asm-ppc64/iSeries/HvCallEvent.h
+++ b/include/asm-ppc64/iSeries/HvCallEvent.h
@@ -82,13 +82,11 @@ typedef u64 HvLpDma_Rc;
static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex)
{
HvCall1(HvCallEventGetOverflowLpEvents, queueIndex);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
{
HvCall1(HvCallEventSetInterLpQueueIndex, queueIndex);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
@@ -99,7 +97,6 @@ static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
abs_addr = virt_to_abs(eventStackAddr);
HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr,
eventStackSize);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
@@ -107,22 +104,18 @@ static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
{
HvCall2(HvCallEventSetLpEventQueueInterruptProc, queueIndex,
lpLogicalProcIndex);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event)
{
u64 abs_addr;
- HvLpEvent_Rc retVal;
#ifdef DEBUG_SENDEVENT
printk("HvCallEvent_signalLpEvent: *event = %016lx\n ",
(unsigned long)event);
#endif
abs_addr = virt_to_abs(event);
- retVal = (HvLpEvent_Rc)HvCall1(HvCallEventSignalLpEvent, abs_addr);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall1(HvCallEventSignalLpEvent, abs_addr);
}
static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
@@ -132,8 +125,6 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
u64 eventData1, u64 eventData2, u64 eventData3,
u64 eventData4, u64 eventData5)
{
- HvLpEvent_Rc retVal;
-
/* Pack the misc bits into a single Dword to pass to PLIC */
union {
struct HvCallEvent_PackedParms parms;
@@ -148,67 +139,49 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
packed.parms.xSourceInstId = sourceInstanceId;
packed.parms.xTargetInstId = targetInstanceId;
- retVal = (HvLpEvent_Rc)HvCall7(HvCallEventSignalLpEventParms,
- packed.dword, correlationToken, eventData1,eventData2,
- eventData3,eventData4, eventData5);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall7(HvCallEventSignalLpEventParms, packed.dword,
+ correlationToken, eventData1, eventData2,
+ eventData3, eventData4, eventData5);
}
static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event)
{
u64 abs_addr;
- HvLpEvent_Rc retVal;
abs_addr = virt_to_abs(event);
- retVal = (HvLpEvent_Rc)HvCall1(HvCallEventAckLpEvent, abs_addr);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall1(HvCallEventAckLpEvent, abs_addr);
}
static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event)
{
u64 abs_addr;
- HvLpEvent_Rc retVal;
abs_addr = virt_to_abs(event);
- retVal = (HvLpEvent_Rc)HvCall1(HvCallEventCancelLpEvent, abs_addr);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall1(HvCallEventCancelLpEvent, abs_addr);
}
static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId(
HvLpIndex targetLp, HvLpEvent_Type type)
{
- HvLpInstanceId retVal;
-
- retVal = HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type);
}
static inline HvLpInstanceId HvCallEvent_getTargetLpInstanceId(
HvLpIndex targetLp, HvLpEvent_Type type)
{
- HvLpInstanceId retVal;
-
- retVal = HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type);
}
static inline void HvCallEvent_openLpEventPath(HvLpIndex targetLp,
HvLpEvent_Type type)
{
HvCall2(HvCallEventOpenLpEventPath, targetLp, type);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
static inline void HvCallEvent_closeLpEventPath(HvLpIndex targetLp,
HvLpEvent_Type type)
{
HvCall2(HvCallEventCloseLpEventPath, targetLp, type);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
@@ -220,7 +193,6 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
/* Do these need to be converted to absolute addresses? */
u64 localBufList, u64 remoteBufList, u32 transferLength)
{
- HvLpDma_Rc retVal;
/* Pack the misc bits into a single Dword to pass to PLIC */
union {
struct HvCallEvent_PackedDmaParms parms;
@@ -237,11 +209,8 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
packed.parms.xLocalInstId = localInstanceId;
packed.parms.xRemoteInstId = remoteInstanceId;
- retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaBufList,
- packed.dword, localBufList, remoteBufList,
- transferLength);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall4(HvCallEventDmaBufList, packed.dword, localBufList,
+ remoteBufList, transferLength);
}
static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
@@ -252,7 +221,6 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
HvLpDma_AddressType remoteAddressType,
u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength)
{
- HvLpDma_Rc retVal;
/* Pack the misc bits into a single Dword to pass to PLIC */
union {
struct HvCallEvent_PackedDmaParms parms;
@@ -269,24 +237,17 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
packed.parms.xLocalInstId = localInstanceId;
packed.parms.xRemoteInstId = remoteInstanceId;
- retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle,
- packed.dword, localAddrOrTce, remoteAddrOrTce,
- transferLength);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle, packed.dword,
+ localAddrOrTce, remoteAddrOrTce, transferLength);
}
static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote,
u32 length, HvLpDma_Direction dir)
{
u64 abs_addr;
- HvLpDma_Rc retVal;
abs_addr = virt_to_abs(local);
- retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaToSp, abs_addr, remote,
- length, dir);
- // getPaca()->adjustHmtForNoOfSpinLocksHeld();
- return retVal;
+ return HvCall4(HvCallEventDmaToSp, abs_addr, remote, length, dir);
}
#endif /* _HVCALLEVENT_H */