Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45dc76aa authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds
Browse files

[PATCH] ppc64 iSeries: header file white space cleanups



This patch just contains white space and comment cleanups in the iSeries
headers files.  There are no semantic changes.

Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0e3e4a1c
Loading
Loading
Loading
Loading
+44 −56
Original line number Diff line number Diff line
@@ -16,19 +16,13 @@
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

//===========================================================================
//
//	This file contains the "hypervisor call" interface which is used to
//	drive the hypervisor from the OS.
//
//===========================================================================
/*
 * This file contains the "hypervisor call" interface which is used to
 * drive the hypervisor from the OS.
 */
#ifndef _HVCALL_H
#define _HVCALL_H

//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h>
#include <asm/paca.h>
@@ -76,9 +70,9 @@ enum HvCall_VaryOffChunkRc
*/

/* Type of yield for HvCallBaseYieldProcessor */
#define HvCall_YieldTimed 	0	// Yield until specified time (tb)
#define HvCall_YieldToActive	1	// Yield until all active procs have run
#define HvCall_YieldToProc	2	// Yield until the specified processor has run
#define HvCall_YieldTimed	0	/* Yield until specified time (tb) */
#define HvCall_YieldToActive	1	/* Yield until all active procs have run */
#define HvCall_YieldToProc	2	/* Yield until the specified processor has run */

/* interrupt masks for setEnabledInterrupts */
#define HvCall_MaskIPI		0x00000001
@@ -125,68 +119,62 @@ enum HvCall_VaryOffChunkRc

#define HvCallCcSetDABR					HvCallCc + 7

//=====================================================================================
static inline void HvCall_setVirtualDecr(void)
{
	/* Ignore any error return codes - most likely means that the target value for the
	 * LP has been increased and this vary off would bring us below the new target. */
	/*
	 * Ignore any error return codes - most likely means that the
	 * target value for the LP has been increased and this vary off
	 * would bring us below the new target.
	 */
	HvCall0(HvCallBaseSetVirtualDecr);
}
//=====================================================================

static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm)
{
	HvCall2(HvCallBaseYieldProcessor, typeOfYield, yieldParm);
}
//=====================================================================

static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts)
{
	HvCall1(HvCallBaseSetEnabledInterrupts, enabledInterrupts);
}

//=====================================================================
static inline void HvCall_clearLogBuffer(HvLpIndex lpindex)
{
	HvCall1(HvCallBaseClearLogBuffer, lpindex);
}

//=====================================================================
static inline u32 HvCall_getLogBufferCodePage(HvLpIndex lpindex)
{
	u32 retVal = HvCall1(HvCallBaseGetLogBufferCodePage, lpindex);
	return retVal;
}

//=====================================================================
static inline int HvCall_getLogBufferFormat(HvLpIndex lpindex)
{
	int retVal = HvCall1(HvCallBaseGetLogBufferFormat, lpindex);
	return retVal;
}

//=====================================================================
static inline u32 HvCall_getLogBufferLength(HvLpIndex lpindex)
{
	u32 retVal = HvCall1(HvCallBaseGetLogBufferLength, lpindex);
	return retVal;
}

//=====================================================================
static inline void HvCall_setLogBufferFormatAndCodepage(int format, u32 codePage)
{
	HvCall2(HvCallBaseSetLogBufferFormatAndCodePage, format, codePage);
}

//=====================================================================
int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen);
void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);
extern int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen);
extern void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);

//=====================================================================
static inline void HvCall_sendIPI(struct paca_struct *targetPaca)
{
	HvCall1(HvCallBaseSendIPI, targetPaca->paca_index);
}

//=====================================================================
static inline void HvCall_terminateMachineSrc(void)
{
	HvCall0(HvCallBaseTerminateMachineSrc);
+55 −61
Original line number Diff line number Diff line
@@ -16,28 +16,17 @@
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

//=====================================================================================
//
//	This file contains the "hypervisor call" interface which is used to
//	drive the hypervisor from the OS.
//
//=====================================================================================
/*
 * This file contains the "hypervisor call" interface which is used to
 * drive the hypervisor from the OS.
 */
#ifndef _HVCALLCFG_H
#define _HVCALLCFG_H

//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h>

//-------------------------------------------------------------------------------------
// Constants
//-------------------------------------------------------------------------------------

enum HvCallCfg_ReqQual
{
enum HvCallCfg_ReqQual {
	HvCallCfg_Cur	= 0,
	HvCallCfg_Init	= 1,
	HvCallCfg_Max	= 2,
@@ -78,96 +67,101 @@ enum HvCallCfg_ReqQual
#define HvCallCfgGetLpExecutionMode			HvCallCfg + 31
#define HvCallCfgGetHostingLpIndex			HvCallCfg + 32

//====================================================================
static inline HvLpIndex	HvCallCfg_getLps(void)
{
	HvLpIndex retVal = HvCall0(HvCallCfgGetLps);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//====================================================================

static inline int HvCallCfg_isBusDedicated(u64 busIndex)
{
	int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//====================================================================

static inline HvLpIndex	HvCallCfg_getBusOwner(u64 busIndex)
{
	HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//====================================================================

static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex)
{
	HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//====================================================================

static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void)
{
	HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//====================================================================
static inline HvLpVirtualLanIndexMap	HvCallCfg_getVirtualLanIndexMap(HvLpIndex lp)

static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(
		HvLpIndex lp)
{
	// This is a new function in V5R1 so calls to this on older 
	// hypervisors will return -1
	/*
	 * This is a new function in V5R1 so calls to this on older
	 * hypervisors will return -1
	 */
	u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
	if (retVal == -1)
		retVal = 0;
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//===================================================================

static inline u64 HvCallCfg_getSystemMsChunks(void)
{
	u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//===================================================================
static inline u64		HvCallCfg_getMsChunks(HvLpIndex lp,enum HvCallCfg_ReqQual qual)

static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp,
		enum HvCallCfg_ReqQual qual)
{
	u64 retVal = HvCall2(HvCallCfgGetMsChunks,lp,qual);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//===================================================================

static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp)
{
	// NOTE: This function was added in v5r1 so older hypervisors will return a -1 value
	u64 retVal = HvCall1(HvCallCfgGetMinRuntimeMsChunks,lp);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
	/*
	 * NOTE: This function was added in v5r1 so older hypervisors
	 * will return a -1 value
	 */
	return HvCall1(HvCallCfgGetMinRuntimeMsChunks, lp);
}
//===================================================================

static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks)
{
	u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//===================================================================

static inline u64 HvCallCfg_getSystemPhysicalProcessors(void)
{
	u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//===================================================================
static inline u64		HvCallCfg_getPhysicalProcessors(HvLpIndex lp,enum HvCallCfg_ReqQual qual)

static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp,
		enum HvCallCfg_ReqQual qual)
{
	u64 retVal = HvCall2(HvCallCfgGetPhysicalProcessors,lp,qual);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;
}
//===================================================================

static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
		u16 hvLogicalProcIndex)
{
@@ -176,7 +170,7 @@ static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
	return retVal;

}
//==================================================================

static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
{
	HvLpSharedPoolIndex retVal =
@@ -185,15 +179,16 @@ static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
	return retVal;

}
//==================================================================
static inline u64	HvCallCfg_getSharedProcUnits(HvLpIndex lp,enum HvCallCfg_ReqQual qual)

static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp,
		enum HvCallCfg_ReqQual qual)
{
	u64 retVal = HvCall2(HvCallCfgGetSharedProcUnits,lp,qual);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;

}
//==================================================================

static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
{
	u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI);
@@ -201,13 +196,12 @@ static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
	return retVal;

}
//==================================================================

static inline HvLpIndex	HvCallCfg_getHostingLpIndex(HvLpIndex lp)
{
	u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retVal;

}

#endif /* _HVCALLCFG_H */
+12 −17
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

/*
 * This file contains the "hypervisor call" interface which is used to
 * drive the hypervisor from the OS.
@@ -24,9 +23,6 @@
#ifndef _HVCALLEVENT_H
#define _HVCALLEVENT_H

/*
 * Standard Includes
 */
#include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h>
#include <asm/abs_addr.h>
@@ -138,7 +134,7 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
{
	HvLpEvent_Rc retVal;

	// Pack the misc bits into a single Dword to pass to PLIC
	/* Pack the misc bits into a single Dword to pass to PLIC */
	union {
		struct HvCallEvent_PackedParms	parms;
		u64		dword;
@@ -225,7 +221,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
		u64 localBufList, u64 remoteBufList, u32 transferLength)
{
	HvLpDma_Rc retVal;
	// Pack the misc bits into a single Dword to pass to PLIC
	/* Pack the misc bits into a single Dword to pass to PLIC */
	union {
		struct HvCallEvent_PackedDmaParms	parms;
		u64		dword;
@@ -257,7 +253,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
		u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength)
{
	HvLpDma_Rc retVal;
	// Pack the misc bits into a single Dword to pass to PLIC
	/* Pack the misc bits into a single Dword to pass to PLIC */
	union {
		struct HvCallEvent_PackedDmaParms	parms;
		u64		dword;
@@ -293,5 +289,4 @@ static inline HvLpDma_Rc HvCallEvent_dmaToSp(void* local, u32 remote,
	return retVal;
}


#endif /* _HVCALLEVENT_H */
+39 −50
Original line number Diff line number Diff line
@@ -19,21 +19,15 @@
#ifndef _HVCALLHPT_H
#define _HVCALLHPT_H

//============================================================================
//
//	This file contains the "hypervisor call" interface which is used to
//	drive the hypervisor from the OS.
//
//============================================================================
/*
 * This file contains the "hypervisor call" interface which is used to
 * drive the hypervisor from the OS.
 */

#include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h>
#include <asm/mmu.h>

//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------

#define HvCallHptGetHptAddress		HvCallHpt +  0
#define HvCallHptGetHptPages		HvCallHpt +  1
#define HvCallHptSetPp			HvCallHpt +  5
@@ -47,81 +41,76 @@
#define HvCallHptInvalidateSetSwBitsGet HvCallHpt + 18


//============================================================================
static inline u64 HvCallHpt_getHptAddress(void)
{
	u64 retval = HvCall0(HvCallHptGetHptAddress);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retval;
}
//============================================================================

static inline u64 HvCallHpt_getHptPages(void)
{
	u64 retval = HvCall0(HvCallHptGetHptPages);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retval;
}
//=============================================================================

static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value)
{
	HvCall2(HvCallHptSetPp, hpteIndex, value);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
//=============================================================================

static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff)
{
	HvCall3(HvCallHptSetSwBits, hpteIndex, bitson, bitsoff);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
//=============================================================================
static inline void		HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)

static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)
{
	HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
//=============================================================================
static inline u64		HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, u8 bitsoff )

static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson,
		u8 bitsoff)
{
	u64 compressedStatus;
	compressedStatus = HvCall4( HvCallHptInvalidateSetSwBitsGet, hpteIndex, bitson, bitsoff, 1 );

	compressedStatus = HvCall4(HvCallHptInvalidateSetSwBitsGet,
			hpteIndex, bitson, bitsoff, 1);
	HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return compressedStatus;
}
//=============================================================================

static inline u64 HvCallHpt_findValid(HPTE *hpte, u64 vpn)
{
	u64 retIndex = HvCall3Ret16( HvCallHptFindValid, hpte, vpn, 0, 0 );
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retIndex;
}
//=============================================================================
static inline u64		HvCallHpt_findNextValid( HPTE *hpte, u32 hpteIndex, u8 bitson, u8 bitsoff )

static inline u64 HvCallHpt_findNextValid(HPTE *hpte, u32 hpteIndex,
		u8 bitson, u8 bitsoff)
{
	u64 retIndex = HvCall3Ret16( HvCallHptFindNextValid, hpte, hpteIndex, bitson, bitsoff );
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
	return retIndex;
}
//=============================================================================

static inline void HvCallHpt_get(HPTE *hpte, u32 hpteIndex)
{
	HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0);
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
}
//============================================================================
static inline void		HvCallHpt_addValidate( u32 hpteIndex,
						       u32 hBit,
						       HPTE *hpte )

static inline void HvCallHpt_addValidate(u32 hpteIndex, u32 hBit, HPTE *hpte)
{
	HvCall4( HvCallHptAddValidate, hpteIndex,
		 hBit, (*((u64 *)hpte)), (*(((u64 *)hpte)+1)) );
	HvCall4(HvCallHptAddValidate, hpteIndex, hBit, (*((u64 *)hpte)),
			(*(((u64 *)hpte)+1)));
	// getPaca()->adjustHmtForNoOfSpinLocksHeld();
}


//=============================================================================

#endif /* _HVCALLHPT_H */
+145 −195

File changed.

Preview size limit exceeded, changes collapsed.

Loading