提交 45dc76aa 编写于 作者: S Stephen Rothwell 提交者: Linus Torvalds

[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: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 0e3e4a1c
...@@ -16,19 +16,13 @@ ...@@ -16,19 +16,13 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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 #ifndef _HVCALL_H
#define _HVCALL_H #define _HVCALL_H
//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/iSeries/HvCallSc.h> #include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#include <asm/paca.h> #include <asm/paca.h>
...@@ -76,9 +70,9 @@ enum HvCall_VaryOffChunkRc ...@@ -76,9 +70,9 @@ enum HvCall_VaryOffChunkRc
*/ */
/* Type of yield for HvCallBaseYieldProcessor */ /* Type of yield for HvCallBaseYieldProcessor */
#define HvCall_YieldTimed 0 // Yield until specified time (tb) #define HvCall_YieldTimed 0 /* Yield until specified time (tb) */
#define HvCall_YieldToActive 1 // Yield until all active procs have run #define HvCall_YieldToActive 1 /* Yield until all active procs have run */
#define HvCall_YieldToProc 2 // Yield until the specified processor has run #define HvCall_YieldToProc 2 /* Yield until the specified processor has run */
/* interrupt masks for setEnabledInterrupts */ /* interrupt masks for setEnabledInterrupts */
#define HvCall_MaskIPI 0x00000001 #define HvCall_MaskIPI 0x00000001
...@@ -125,71 +119,65 @@ enum HvCall_VaryOffChunkRc ...@@ -125,71 +119,65 @@ enum HvCall_VaryOffChunkRc
#define HvCallCcSetDABR HvCallCc + 7 #define HvCallCcSetDABR HvCallCc + 7
//=====================================================================================
static inline void HvCall_setVirtualDecr(void) 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); HvCall0(HvCallBaseSetVirtualDecr);
} }
//=====================================================================
static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm) static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm)
{ {
HvCall2( HvCallBaseYieldProcessor, typeOfYield, yieldParm ); HvCall2(HvCallBaseYieldProcessor, typeOfYield, yieldParm);
} }
//=====================================================================
static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts) static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts)
{ {
HvCall1(HvCallBaseSetEnabledInterrupts,enabledInterrupts); HvCall1(HvCallBaseSetEnabledInterrupts, enabledInterrupts);
} }
//=====================================================================
static inline void HvCall_clearLogBuffer(HvLpIndex lpindex) static inline void HvCall_clearLogBuffer(HvLpIndex lpindex)
{ {
HvCall1(HvCallBaseClearLogBuffer,lpindex); HvCall1(HvCallBaseClearLogBuffer, lpindex);
} }
//=====================================================================
static inline u32 HvCall_getLogBufferCodePage(HvLpIndex lpindex) static inline u32 HvCall_getLogBufferCodePage(HvLpIndex lpindex)
{ {
u32 retVal = HvCall1(HvCallBaseGetLogBufferCodePage,lpindex); u32 retVal = HvCall1(HvCallBaseGetLogBufferCodePage, lpindex);
return retVal; return retVal;
} }
//=====================================================================
static inline int HvCall_getLogBufferFormat(HvLpIndex lpindex) static inline int HvCall_getLogBufferFormat(HvLpIndex lpindex)
{ {
int retVal = HvCall1(HvCallBaseGetLogBufferFormat,lpindex); int retVal = HvCall1(HvCallBaseGetLogBufferFormat, lpindex);
return retVal; return retVal;
} }
//=====================================================================
static inline u32 HvCall_getLogBufferLength(HvLpIndex lpindex) static inline u32 HvCall_getLogBufferLength(HvLpIndex lpindex)
{ {
u32 retVal = HvCall1(HvCallBaseGetLogBufferLength,lpindex); u32 retVal = HvCall1(HvCallBaseGetLogBufferLength, lpindex);
return retVal; return retVal;
} }
//=====================================================================
static inline void HvCall_setLogBufferFormatAndCodepage(int format, u32 codePage) static inline void HvCall_setLogBufferFormatAndCodepage(int format, u32 codePage)
{ {
HvCall2(HvCallBaseSetLogBufferFormatAndCodePage,format, codePage); HvCall2(HvCallBaseSetLogBufferFormatAndCodePage, format, codePage);
} }
//===================================================================== extern int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen);
int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen); extern void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);
void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);
//===================================================================== static inline void HvCall_sendIPI(struct paca_struct *targetPaca)
static inline void HvCall_sendIPI(struct paca_struct * targetPaca)
{ {
HvCall1( HvCallBaseSendIPI, targetPaca->paca_index ); HvCall1(HvCallBaseSendIPI, targetPaca->paca_index);
} }
//=====================================================================
static inline void HvCall_terminateMachineSrc(void) static inline void HvCall_terminateMachineSrc(void)
{ {
HvCall0( HvCallBaseTerminateMachineSrc ); HvCall0(HvCallBaseTerminateMachineSrc);
} }
static inline void HvCall_setDABR(unsigned long val) static inline void HvCall_setDABR(unsigned long val)
......
...@@ -16,28 +16,17 @@ ...@@ -16,28 +16,17 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * 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 #ifndef _HVCALLCFG_H
#define _HVCALLCFG_H #define _HVCALLCFG_H
//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/iSeries/HvCallSc.h> #include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
//------------------------------------------------------------------------------------- enum HvCallCfg_ReqQual {
// Constants
//-------------------------------------------------------------------------------------
enum HvCallCfg_ReqQual
{
HvCallCfg_Cur = 0, HvCallCfg_Cur = 0,
HvCallCfg_Init = 1, HvCallCfg_Init = 1,
HvCallCfg_Max = 2, HvCallCfg_Max = 2,
...@@ -78,96 +67,101 @@ enum HvCallCfg_ReqQual ...@@ -78,96 +67,101 @@ enum HvCallCfg_ReqQual
#define HvCallCfgGetLpExecutionMode HvCallCfg + 31 #define HvCallCfgGetLpExecutionMode HvCallCfg + 31
#define HvCallCfgGetHostingLpIndex HvCallCfg + 32 #define HvCallCfgGetHostingLpIndex HvCallCfg + 32
//====================================================================
static inline HvLpIndex HvCallCfg_getLps(void) static inline HvLpIndex HvCallCfg_getLps(void)
{ {
HvLpIndex retVal = HvCall0(HvCallCfgGetLps); HvLpIndex retVal = HvCall0(HvCallCfgGetLps);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//====================================================================
static inline int HvCallCfg_isBusDedicated(u64 busIndex) static inline int HvCallCfg_isBusDedicated(u64 busIndex)
{ {
int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex); int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//====================================================================
static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex) static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex)
{ {
HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex); HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//====================================================================
static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex) static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex)
{ {
HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex); HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//====================================================================
static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void) static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void)
{ {
HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap); HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; 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); u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
if(retVal == -1) if (retVal == -1)
retVal = 0; retVal = 0;
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//===================================================================
static inline u64 HvCallCfg_getSystemMsChunks(void) static inline u64 HvCallCfg_getSystemMsChunks(void)
{ {
u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks); u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; 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); u64 retVal = HvCall2(HvCallCfgGetMsChunks,lp,qual);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//===================================================================
static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp) 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); * NOTE: This function was added in v5r1 so older hypervisors
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); * will return a -1 value
return retVal; */
return HvCall1(HvCallCfgGetMinRuntimeMsChunks, lp);
} }
//===================================================================
static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks) static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks)
{ {
u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks); u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//===================================================================
static inline u64 HvCallCfg_getSystemPhysicalProcessors(void) static inline u64 HvCallCfg_getSystemPhysicalProcessors(void)
{ {
u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors); u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; 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); u64 retVal = HvCall2(HvCallCfgGetPhysicalProcessors,lp,qual);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//===================================================================
static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp, static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
u16 hvLogicalProcIndex) u16 hvLogicalProcIndex)
{ {
...@@ -176,7 +170,7 @@ static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp, ...@@ -176,7 +170,7 @@ static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
return retVal; return retVal;
} }
//==================================================================
static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
{ {
HvLpSharedPoolIndex retVal = HvLpSharedPoolIndex retVal =
...@@ -185,15 +179,16 @@ static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) ...@@ -185,15 +179,16 @@ static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
return retVal; 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); u64 retVal = HvCall2(HvCallCfgGetSharedProcUnits,lp,qual);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//==================================================================
static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
{ {
u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI); u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI);
...@@ -201,13 +196,12 @@ static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) ...@@ -201,13 +196,12 @@ static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
return retVal; return retVal;
} }
//==================================================================
static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp)
{ {
u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp); u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
#endif /* _HVCALLCFG_H */ #endif /* _HVCALLCFG_H */
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
/* /*
* This file contains the "hypervisor call" interface which is used to * This file contains the "hypervisor call" interface which is used to
* drive the hypervisor from the OS. * drive the hypervisor from the OS.
...@@ -24,9 +23,6 @@ ...@@ -24,9 +23,6 @@
#ifndef _HVCALLEVENT_H #ifndef _HVCALLEVENT_H
#define _HVCALLEVENT_H #define _HVCALLEVENT_H
/*
* Standard Includes
*/
#include <asm/iSeries/HvCallSc.h> #include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#include <asm/abs_addr.h> #include <asm/abs_addr.h>
...@@ -85,13 +81,13 @@ typedef u64 HvLpDma_Rc; ...@@ -85,13 +81,13 @@ typedef u64 HvLpDma_Rc;
static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex) static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex)
{ {
HvCall1(HvCallEventGetOverflowLpEvents,queueIndex); HvCall1(HvCallEventGetOverflowLpEvents, queueIndex);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
} }
static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex) static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
{ {
HvCall1(HvCallEventSetInterLpQueueIndex,queueIndex); HvCall1(HvCallEventSetInterLpQueueIndex, queueIndex);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
} }
...@@ -138,7 +134,7 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp, ...@@ -138,7 +134,7 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
{ {
HvLpEvent_Rc retVal; 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 { union {
struct HvCallEvent_PackedParms parms; struct HvCallEvent_PackedParms parms;
u64 dword; u64 dword;
...@@ -225,7 +221,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type, ...@@ -225,7 +221,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
u64 localBufList, u64 remoteBufList, u32 transferLength) u64 localBufList, u64 remoteBufList, u32 transferLength)
{ {
HvLpDma_Rc retVal; 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 { union {
struct HvCallEvent_PackedDmaParms parms; struct HvCallEvent_PackedDmaParms parms;
u64 dword; u64 dword;
...@@ -257,7 +253,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type, ...@@ -257,7 +253,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength) u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength)
{ {
HvLpDma_Rc retVal; 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 { union {
struct HvCallEvent_PackedDmaParms parms; struct HvCallEvent_PackedDmaParms parms;
u64 dword; u64 dword;
...@@ -280,7 +276,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type, ...@@ -280,7 +276,7 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
return retVal; return retVal;
} }
static inline HvLpDma_Rc HvCallEvent_dmaToSp(void* local, u32 remote, static inline HvLpDma_Rc HvCallEvent_dmaToSp(void *local, u32 remote,
u32 length, HvLpDma_Direction dir) u32 length, HvLpDma_Direction dir)
{ {
u64 abs_addr; u64 abs_addr;
...@@ -293,5 +289,4 @@ static inline HvLpDma_Rc HvCallEvent_dmaToSp(void* local, u32 remote, ...@@ -293,5 +289,4 @@ static inline HvLpDma_Rc HvCallEvent_dmaToSp(void* local, u32 remote,
return retVal; return retVal;
} }
#endif /* _HVCALLEVENT_H */ #endif /* _HVCALLEVENT_H */
...@@ -19,21 +19,15 @@ ...@@ -19,21 +19,15 @@
#ifndef _HVCALLHPT_H #ifndef _HVCALLHPT_H
#define _HVCALLHPT_H #define _HVCALLHPT_H
//============================================================================ /*
// * This file contains the "hypervisor call" interface which is used to
// This file contains the "hypervisor call" interface which is used to * drive the hypervisor from the OS.
// drive the hypervisor from the OS. */
//
//============================================================================
#include <asm/iSeries/HvCallSc.h> #include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#include <asm/mmu.h> #include <asm/mmu.h>
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
#define HvCallHptGetHptAddress HvCallHpt + 0 #define HvCallHptGetHptAddress HvCallHpt + 0
#define HvCallHptGetHptPages HvCallHpt + 1 #define HvCallHptGetHptPages HvCallHpt + 1
#define HvCallHptSetPp HvCallHpt + 5 #define HvCallHptSetPp HvCallHpt + 5
...@@ -47,81 +41,76 @@ ...@@ -47,81 +41,76 @@
#define HvCallHptInvalidateSetSwBitsGet HvCallHpt + 18 #define HvCallHptInvalidateSetSwBitsGet HvCallHpt + 18
//============================================================================
static inline u64 HvCallHpt_getHptAddress(void) static inline u64 HvCallHpt_getHptAddress(void)
{ {
u64 retval = HvCall0(HvCallHptGetHptAddress); u64 retval = HvCall0(HvCallHptGetHptAddress);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retval; return retval;
} }
//============================================================================
static inline u64 HvCallHpt_getHptPages(void) static inline u64 HvCallHpt_getHptPages(void)
{ {
u64 retval = HvCall0(HvCallHptGetHptPages); u64 retval = HvCall0(HvCallHptGetHptPages);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retval; return retval;
} }
//=============================================================================
static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value) static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value)
{ {
HvCall2( HvCallHptSetPp, hpteIndex, value ); HvCall2(HvCallHptSetPp, hpteIndex, value);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
} }
//=============================================================================
static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff ) static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff)
{ {
HvCall3( HvCallHptSetSwBits, hpteIndex, bitson, bitsoff ); HvCall3(HvCallHptSetSwBits, hpteIndex, bitson, bitsoff);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
} }
//=============================================================================
static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)
static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)
{ {
HvCall1( HvCallHptInvalidateNoSyncICache, hpteIndex ); HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // 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; u64 compressedStatus;
compressedStatus = HvCall4( HvCallHptInvalidateSetSwBitsGet, hpteIndex, bitson, bitsoff, 1 );
HvCall1( HvCallHptInvalidateNoSyncICache, hpteIndex ); compressedStatus = HvCall4(HvCallHptInvalidateSetSwBitsGet,
hpteIndex, bitson, bitsoff, 1);
HvCall1(HvCallHptInvalidateNoSyncICache, hpteIndex);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return compressedStatus; return compressedStatus;
} }
//=============================================================================
static inline u64 HvCallHpt_findValid( HPTE *hpte, u64 vpn ) static inline u64 HvCallHpt_findValid(HPTE *hpte, u64 vpn)
{ {
u64 retIndex = HvCall3Ret16( HvCallHptFindValid, hpte, vpn, 0, 0 ); u64 retIndex = HvCall3Ret16( HvCallHptFindValid, hpte, vpn, 0, 0 );
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retIndex; 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 ); u64 retIndex = HvCall3Ret16( HvCallHptFindNextValid, hpte, hpteIndex, bitson, bitsoff );
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retIndex; return retIndex;
} }
//=============================================================================
static inline void HvCallHpt_get( HPTE *hpte, u32 hpteIndex ) static inline void HvCallHpt_get(HPTE *hpte, u32 hpteIndex)
{ {
HvCall2Ret16( HvCallHptGet, hpte, hpteIndex, 0 ); HvCall2Ret16(HvCallHptGet, hpte, hpteIndex, 0);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // 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, HvCall4(HvCallHptAddValidate, hpteIndex, hBit, (*((u64 *)hpte)),
hBit, (*((u64 *)hpte)), (*(((u64 *)hpte)+1)) ); (*(((u64 *)hpte)+1)));
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
} }
//=============================================================================
#endif /* _HVCALLHPT_H */ #endif /* _HVCALLHPT_H */
/************************************************************************/ /*
/* Provides the Hypervisor PCI calls for iSeries Linux Parition. */ * Provides the Hypervisor PCI calls for iSeries Linux Parition.
/* Copyright (C) 2001 <Wayne G Holm> <IBM Corporation> */ * Copyright (C) 2001 <Wayne G Holm> <IBM Corporation>
/* */ *
/* This program is free software; you can redistribute it and/or modify */ * This program is free software; you can redistribute it and/or modify
/* it under the terms of the GNU General Public License as published by */ * it under the terms of the GNU General Public License as published by
/* the Free Software Foundation; either version 2 of the License, or */ * the Free Software Foundation; either version 2 of the License, or
/* (at your option) any later version. */ * (at your option) any later version.
/* */ *
/* This program is distributed in the hope that it will be useful, */ * This program is distributed in the hope that it will be useful,
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ * but WITHOUT ANY WARRANTY; without even the implied warranty of
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/* GNU General Public License for more details. */ * GNU General Public License for more details.
/* */ *
/* You should have received a copy of the GNU General Public License */ * You should have received a copy of the GNU General Public License
/* along with this program; if not, write to the: */ * along with this program; if not, write to the:
/* Free Software Foundation, Inc., */ * Free Software Foundation, Inc.,
/* 59 Temple Place, Suite 330, */ * 59 Temple Place, Suite 330,
/* Boston, MA 02111-1307 USA */ * Boston, MA 02111-1307 USA
/************************************************************************/ *
/* Change Activity: */ * Change Activity:
/* Created, Jan 9, 2001 */ * Created, Jan 9, 2001
/************************************************************************/ */
#ifndef _HVCALLPCI_H #ifndef _HVCALLPCI_H
#define _HVCALLPCI_H #define _HVCALLPCI_H
...@@ -61,25 +61,28 @@ enum HvCallPci_DeviceType { ...@@ -61,25 +61,28 @@ enum HvCallPci_DeviceType {
struct HvCallPci_DeviceInfo { struct HvCallPci_DeviceInfo {
u32 deviceType; // See DeviceType enum for values u32 deviceType; /* See DeviceType enum for values */
}; };
struct HvCallPci_BusUnitInfo { struct HvCallPci_BusUnitInfo {
u32 sizeReturned; // length of data returned u32 sizeReturned; /* length of data returned */
u32 deviceType; // see DeviceType enum for values u32 deviceType; /* see DeviceType enum for values */
}; };
struct HvCallPci_BridgeInfo { struct HvCallPci_BridgeInfo {
struct HvCallPci_BusUnitInfo busUnitInfo; // Generic bus unit info struct HvCallPci_BusUnitInfo busUnitInfo; /* Generic bus unit info */
u8 subBusNumber; // Bus number of secondary bus u8 subBusNumber; /* Bus number of secondary bus */
u8 maxAgents; // Max idsels on secondary bus u8 maxAgents; /* Max idsels on secondary bus */
u8 maxSubBusNumber; // Max Sub Bus u8 maxSubBusNumber; /* Max Sub Bus */
u8 logicalSlotNumber; // Logical Slot Number for IOA u8 logicalSlotNumber; /* Logical Slot Number for IOA */
}; };
// Maximum BusUnitInfo buffer size. Provided for clients so they can allocate /*
// a buffer big enough for any type of bus unit. Increase as needed. * Maximum BusUnitInfo buffer size. Provided for clients so
* they can allocate a buffer big enough for any type of bus
* unit. Increase as needed.
*/
enum {HvCallPci_MaxBusUnitInfoSize = 128}; enum {HvCallPci_MaxBusUnitInfoSize = 128};
struct HvCallPci_BarParms { struct HvCallPci_BarParms {
...@@ -123,10 +126,8 @@ enum HvCallPci_VpdType { ...@@ -123,10 +126,8 @@ enum HvCallPci_VpdType {
#define HvCallPciUnmaskInterrupts HvCallPci + 49 #define HvCallPciUnmaskInterrupts HvCallPci + 49
#define HvCallPciGetBusUnitInfo HvCallPci + 50 #define HvCallPciGetBusUnitInfo HvCallPci + 50
//============================================================================
static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber, static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber,
u8 deviceId, u32 offset, u8 deviceId, u32 offset, u8 *value)
u8 *value)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
struct HvCallPci_LoadReturn retVal; struct HvCallPci_LoadReturn retVal;
...@@ -145,10 +146,9 @@ static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber, ...@@ -145,10 +146,9 @@ static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber,
u8 deviceId, u32 offset, u8 deviceId, u32 offset, u16 *value)
u16 *value)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
struct HvCallPci_LoadReturn retVal; struct HvCallPci_LoadReturn retVal;
...@@ -167,10 +167,9 @@ static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber, ...@@ -167,10 +167,9 @@ static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber, static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber,
u8 deviceId, u32 offset, u8 deviceId, u32 offset, u32 *value)
u32 *value)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
struct HvCallPci_LoadReturn retVal; struct HvCallPci_LoadReturn retVal;
...@@ -189,10 +188,9 @@ static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber, ...@@ -189,10 +188,9 @@ static inline u64 HvCallPci_configLoad32(u16 busNumber, u8 subBusNumber,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber,
u8 deviceId, u32 offset, u8 deviceId, u32 offset, u8 value)
u8 value)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -209,10 +207,9 @@ static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber, ...@@ -209,10 +207,9 @@ static inline u64 HvCallPci_configStore8(u16 busNumber, u8 subBusNumber,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber, static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber,
u8 deviceId, u32 offset, u8 deviceId, u32 offset, u16 value)
u16 value)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -229,10 +226,9 @@ static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber, ...@@ -229,10 +226,9 @@ static inline u64 HvCallPci_configStore16(u16 busNumber, u8 subBusNumber,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber, static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber,
u8 deviceId, u32 offset, u8 deviceId, u32 offset, u32 value)
u32 value)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -249,13 +245,10 @@ static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber, ...@@ -249,13 +245,10 @@ static inline u64 HvCallPci_configStore32(u16 busNumber, u8 subBusNumber,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_barLoad8(u16 busNumberParm, static inline u64 HvCallPci_barLoad8(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm, u8 *valueParm)
u8 barNumberParm,
u64 offsetParm,
u8* valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
struct HvCallPci_LoadReturn retVal; struct HvCallPci_LoadReturn retVal;
...@@ -275,13 +268,10 @@ static inline u64 HvCallPci_barLoad8(u16 busNumberParm, ...@@ -275,13 +268,10 @@ static inline u64 HvCallPci_barLoad8(u16 busNumberParm,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_barLoad16(u16 busNumberParm, static inline u64 HvCallPci_barLoad16(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm, u16 *valueParm)
u8 barNumberParm,
u64 offsetParm,
u16* valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
struct HvCallPci_LoadReturn retVal; struct HvCallPci_LoadReturn retVal;
...@@ -301,13 +291,10 @@ static inline u64 HvCallPci_barLoad16(u16 busNumberParm, ...@@ -301,13 +291,10 @@ static inline u64 HvCallPci_barLoad16(u16 busNumberParm,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_barLoad32(u16 busNumberParm, static inline u64 HvCallPci_barLoad32(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm, u32 *valueParm)
u8 barNumberParm,
u64 offsetParm,
u32* valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
struct HvCallPci_LoadReturn retVal; struct HvCallPci_LoadReturn retVal;
...@@ -327,13 +314,10 @@ static inline u64 HvCallPci_barLoad32(u16 busNumberParm, ...@@ -327,13 +314,10 @@ static inline u64 HvCallPci_barLoad32(u16 busNumberParm,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_barLoad64(u16 busNumberParm, static inline u64 HvCallPci_barLoad64(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm, u64 *valueParm)
u8 barNumberParm,
u64 offsetParm,
u64* valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
struct HvCallPci_LoadReturn retVal; struct HvCallPci_LoadReturn retVal;
...@@ -353,12 +337,9 @@ static inline u64 HvCallPci_barLoad64(u16 busNumberParm, ...@@ -353,12 +337,9 @@ static inline u64 HvCallPci_barLoad64(u16 busNumberParm,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_barStore8(u16 busNumberParm, static inline u64 HvCallPci_barStore8(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm,
u8 barNumberParm,
u64 offsetParm,
u8 valueParm) u8 valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
...@@ -377,12 +358,9 @@ static inline u64 HvCallPci_barStore8(u16 busNumberParm, ...@@ -377,12 +358,9 @@ static inline u64 HvCallPci_barStore8(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_barStore16(u16 busNumberParm, static inline u64 HvCallPci_barStore16(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm,
u8 barNumberParm,
u64 offsetParm,
u16 valueParm) u16 valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
...@@ -401,12 +379,9 @@ static inline u64 HvCallPci_barStore16(u16 busNumberParm, ...@@ -401,12 +379,9 @@ static inline u64 HvCallPci_barStore16(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_barStore32(u16 busNumberParm, static inline u64 HvCallPci_barStore32(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm,
u8 barNumberParm,
u64 offsetParm,
u32 valueParm) u32 valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
...@@ -425,12 +400,9 @@ static inline u64 HvCallPci_barStore32(u16 busNumberParm, ...@@ -425,12 +400,9 @@ static inline u64 HvCallPci_barStore32(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_barStore64(u16 busNumberParm, static inline u64 HvCallPci_barStore64(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 offsetParm,
u8 deviceIdParm,
u8 barNumberParm,
u64 offsetParm,
u64 valueParm) u64 valueParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
...@@ -449,9 +421,8 @@ static inline u64 HvCallPci_barStore64(u16 busNumberParm, ...@@ -449,9 +421,8 @@ static inline u64 HvCallPci_barStore64(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_eoi(u16 busNumberParm, static inline u64 HvCallPci_eoi(u16 busNumberParm, u8 subBusParm,
u8 subBusParm,
u8 deviceIdParm) u8 deviceIdParm)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
...@@ -469,13 +440,9 @@ static inline u64 HvCallPci_eoi(u16 busNumberParm, ...@@ -469,13 +440,9 @@ static inline u64 HvCallPci_eoi(u16 busNumberParm,
return retVal.rc; return retVal.rc;
} }
//============================================================================
static inline u64 HvCallPci_getBarParms(u16 busNumberParm, static inline u64 HvCallPci_getBarParms(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u8 barNumberParm, u64 parms, u32 sizeofParms)
u8 deviceIdParm,
u8 barNumberParm,
u64 parms,
u32 sizeofParms)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -493,11 +460,9 @@ static inline u64 HvCallPci_getBarParms(u16 busNumberParm, ...@@ -493,11 +460,9 @@ static inline u64 HvCallPci_getBarParms(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_maskFisr(u16 busNumberParm, static inline u64 HvCallPci_maskFisr(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u64 fisrMask)
u8 deviceIdParm,
u64 fisrMask)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -514,11 +479,9 @@ static inline u64 HvCallPci_maskFisr(u16 busNumberParm, ...@@ -514,11 +479,9 @@ static inline u64 HvCallPci_maskFisr(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u64 fisrMask)
u8 deviceIdParm,
u64 fisrMask)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -535,11 +498,9 @@ static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm, ...@@ -535,11 +498,9 @@ static inline u64 HvCallPci_unmaskFisr(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u64 onNotOff)
u8 deviceIdParm,
u64 onNotOff)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -556,12 +517,9 @@ static inline u64 HvCallPci_setSlotReset(u16 busNumberParm, ...@@ -556,12 +517,9 @@ static inline u64 HvCallPci_setSlotReset(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceNumberParm, u64 parms, u32 sizeofParms)
u8 deviceNumberParm,
u64 parms,
u32 sizeofParms)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -578,11 +536,9 @@ static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm, ...@@ -578,11 +536,9 @@ static inline u64 HvCallPci_getDeviceInfo(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm, static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u64 interruptMask)
u8 deviceIdParm,
u64 interruptMask)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -599,11 +555,9 @@ static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm, ...@@ -599,11 +555,9 @@ static inline u64 HvCallPci_maskInterrupts(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm, static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u64 interruptMask)
u8 deviceIdParm,
u64 interruptMask)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -620,13 +574,9 @@ static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm, ...@@ -620,13 +574,9 @@ static inline u64 HvCallPci_unmaskInterrupts(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm, static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm, u8 subBusParm,
u8 subBusParm, u8 deviceIdParm, u64 parms, u32 sizeofParms)
u8 deviceIdParm,
u64 parms,
u32 sizeofParms)
{ {
struct HvCallPci_DsaAddr dsa; struct HvCallPci_DsaAddr dsa;
u64 retVal; u64 retVal;
...@@ -643,9 +593,9 @@ static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm, ...@@ -643,9 +593,9 @@ static inline u64 HvCallPci_getBusUnitInfo(u16 busNumberParm,
return retVal; return retVal;
} }
//============================================================================
static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm, u16 sizeParm) static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm,
u16 sizeParm)
{ {
int xRetSize; int xRetSize;
u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusVpd); u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusVpd);
...@@ -656,9 +606,9 @@ static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm, u16 sizeParm ...@@ -656,9 +606,9 @@ static inline int HvCallPci_getBusVpd(u16 busNumParm, u64 destParm, u16 sizeParm
xRetSize = xRc & 0xFFFF; xRetSize = xRc & 0xFFFF;
return xRetSize; return xRetSize;
} }
//============================================================================
static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, u16 sizeParm) static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm,
u16 sizeParm)
{ {
int xRetSize; int xRetSize;
u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusAdapterVpd); u64 xRc = HvCall4(HvCallPciGetCardVpd, busNumParm, destParm, sizeParm, HvCallPci_BusAdapterVpd);
...@@ -669,5 +619,5 @@ static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, u16 s ...@@ -669,5 +619,5 @@ static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, u16 s
xRetSize = xRc & 0xFFFF; xRetSize = xRc & 0xFFFF;
return xRetSize; return xRetSize;
} }
//============================================================================
#endif /* _HVCALLPCI_H */ #endif /* _HVCALLPCI_H */
...@@ -30,22 +30,22 @@ ...@@ -30,22 +30,22 @@
#define HvCallSm 0x8007000000000000ul #define HvCallSm 0x8007000000000000ul
#define HvCallXm 0x8009000000000000ul #define HvCallXm 0x8009000000000000ul
u64 HvCall0( u64 ); u64 HvCall0(u64);
u64 HvCall1( u64, u64 ); u64 HvCall1(u64, u64);
u64 HvCall2( u64, u64, u64 ); u64 HvCall2(u64, u64, u64);
u64 HvCall3( u64, u64, u64, u64 ); u64 HvCall3(u64, u64, u64, u64);
u64 HvCall4( u64, u64, u64, u64, u64 ); u64 HvCall4(u64, u64, u64, u64, u64);
u64 HvCall5( u64, u64, u64, u64, u64, u64 ); u64 HvCall5(u64, u64, u64, u64, u64, u64);
u64 HvCall6( u64, u64, u64, u64, u64, u64, u64 ); u64 HvCall6(u64, u64, u64, u64, u64, u64, u64);
u64 HvCall7( u64, u64, u64, u64, u64, u64, u64, u64 ); u64 HvCall7(u64, u64, u64, u64, u64, u64, u64, u64);
u64 HvCall0Ret16( u64, void * ); u64 HvCall0Ret16(u64, void *);
u64 HvCall1Ret16( u64, void *, u64 ); u64 HvCall1Ret16(u64, void *, u64);
u64 HvCall2Ret16( u64, void *, u64, u64 ); u64 HvCall2Ret16(u64, void *, u64, u64);
u64 HvCall3Ret16( u64, void *, u64, u64, u64 ); u64 HvCall3Ret16(u64, void *, u64, u64, u64);
u64 HvCall4Ret16( u64, void *, u64, u64, u64, u64 ); u64 HvCall4Ret16(u64, void *, u64, u64, u64, u64);
u64 HvCall5Ret16( u64, void *, u64, u64, u64, u64, u64 ); u64 HvCall5Ret16(u64, void *, u64, u64, u64, u64, u64);
u64 HvCall6Ret16( u64, void *, u64, u64, u64, u64, u64, u64 ); u64 HvCall6Ret16(u64, void *, u64, u64, u64, u64, u64, u64);
u64 HvCall7Ret16( u64, void *, u64, u64 ,u64 ,u64 ,u64 ,u64 ,u64 ); u64 HvCall7Ret16(u64, void *, u64, u64 ,u64 ,u64 ,u64 ,u64 ,u64);
#endif /* _HVCALLSC_H */ #endif /* _HVCALLSC_H */
...@@ -19,34 +19,23 @@ ...@@ -19,34 +19,23 @@
#ifndef _HVCALLSM_H #ifndef _HVCALLSM_H
#define _HVCALLSM_H #define _HVCALLSM_H
//============================================================================ /*
// * This file contains the "hypervisor call" interface which is used to
// This file contains the "hypervisor call" interface which is used to * drive the hypervisor from the OS.
// drive the hypervisor from the OS. */
//
//============================================================================
//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/iSeries/HvCallSc.h> #include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
#define HvCallSmGet64BitsOfAccessMap HvCallSm + 11 #define HvCallSmGet64BitsOfAccessMap HvCallSm + 11
static inline u64 HvCallSm_get64BitsOfAccessMap(HvLpIndex lpIndex,
//============================================================================ u64 indexIntoBitMap)
static inline u64 HvCallSm_get64BitsOfAccessMap(
HvLpIndex lpIndex, u64 indexIntoBitMap )
{ {
u64 retval = HvCall2(HvCallSmGet64BitsOfAccessMap, lpIndex, u64 retval = HvCall2(HvCallSmGet64BitsOfAccessMap, lpIndex,
indexIntoBitMap ); indexIntoBitMap );
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retval; return retval;
} }
//============================================================================
#endif /* _HVCALLSM_H */ #endif /* _HVCALLSM_H */
//============================================================================ /*
// Header File Id * This file contains the "hypervisor call" interface which is used to
// Name______________: HvCallXm.H * drive the hypervisor from SLIC.
// */
// Description_______:
//
// This file contains the "hypervisor call" interface which is used to
// drive the hypervisor from SLIC.
//
//============================================================================
#ifndef _HVCALLXM_H #ifndef _HVCALLXM_H
#define _HVCALLXM_H #define _HVCALLXM_H
//-------------------------------------------------------------------
// Forward declarations
//-------------------------------------------------------------------
//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/iSeries/HvCallSc.h> #include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
#define HvCallXmGetTceTableParms HvCallXm + 0 #define HvCallXmGetTceTableParms HvCallXm + 0
#define HvCallXmTestBus HvCallXm + 1 #define HvCallXmTestBus HvCallXm + 1
#define HvCallXmConnectBusUnit HvCallXm + 2 #define HvCallXmConnectBusUnit HvCallXm + 2
...@@ -33,47 +16,46 @@ ...@@ -33,47 +16,46 @@
#define HvCallXmSetTce HvCallXm + 11 #define HvCallXmSetTce HvCallXm + 11
#define HvCallXmSetTces HvCallXm + 13 #define HvCallXmSetTces HvCallXm + 13
//============================================================================
static inline void HvCallXm_getTceTableParms(u64 cb) static inline void HvCallXm_getTceTableParms(u64 cb)
{ {
HvCall1(HvCallXmGetTceTableParms, cb); HvCall1(HvCallXmGetTceTableParms, cb);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
} }
//============================================================================
static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce) static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
{ {
u64 retval = HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce ); u64 retval = HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce );
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retval; return retval;
} }
//============================================================================
static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4) static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
{ {
u64 retval = HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces, u64 retval = HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
tce1, tce2, tce3, tce4 ); tce1, tce2, tce3, tce4 );
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retval; return retval;
} }
//=============================================================================
static inline u64 HvCallXm_testBus(u16 busNumber) static inline u64 HvCallXm_testBus(u16 busNumber)
{ {
u64 retVal = HvCall1(HvCallXmTestBus, busNumber); u64 retVal = HvCall1(HvCallXmTestBus, busNumber);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//=====================================================================================
static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId) static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
u8 deviceId)
{ {
u64 busUnitNumber = (subBusNumber << 8) | deviceId; u64 busUnitNumber = (subBusNumber << 8) | deviceId;
u64 retVal = HvCall2(HvCallXmTestBusUnit, busNumber, busUnitNumber); u64 retVal = HvCall2(HvCallXmTestBusUnit, busNumber, busUnitNumber);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//=====================================================================================
static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId, static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
u64 interruptToken) u8 deviceId, u64 interruptToken)
{ {
u64 busUnitNumber = (subBusNumber << 8) | deviceId; u64 busUnitNumber = (subBusNumber << 8) | deviceId;
u64 queueIndex = 0; // HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)); u64 queueIndex = 0; // HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard));
...@@ -83,13 +65,12 @@ static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, u8 dev ...@@ -83,13 +65,12 @@ static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, u8 dev
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//=====================================================================================
static inline u64 HvCallXm_loadTod(void) static inline u64 HvCallXm_loadTod(void)
{ {
u64 retVal = HvCall0(HvCallXmLoadTod); u64 retVal = HvCall0(HvCallXmLoadTod);
// getPaca()->adjustHmtForNoOfSpinLocksHeld(); // getPaca()->adjustHmtForNoOfSpinLocksHeld();
return retVal; return retVal;
} }
//=====================================================================================
#endif /* _HVCALLXM_H */ #endif /* _HVCALLXM_H */
...@@ -19,262 +19,285 @@ ...@@ -19,262 +19,285 @@
#ifndef _HVLPCONFIG_H #ifndef _HVLPCONFIG_H
#define _HVLPCONFIG_H #define _HVLPCONFIG_H
//=========================================================================== /*
// * This file contains the interface to the LPAR configuration data
// This file contains the interface to the LPAR configuration data * to determine which resources should be allocated to each partition.
// to determine which resources should be allocated to each partition. */
//
//===========================================================================
#include <asm/iSeries/HvCallCfg.h> #include <asm/iSeries/HvCallCfg.h>
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#include <asm/iSeries/ItLpNaca.h> #include <asm/iSeries/ItLpNaca.h>
#include <asm/iSeries/LparData.h> #include <asm/iSeries/LparData.h>
//-------------------------------------------------------------------
// Constants
//-------------------------------------------------------------------
extern HvLpIndex HvLpConfig_getLpIndex_outline(void); extern HvLpIndex HvLpConfig_getLpIndex_outline(void);
//===================================================================
static inline HvLpIndex HvLpConfig_getLpIndex(void) static inline HvLpIndex HvLpConfig_getLpIndex(void)
{ {
return itLpNaca.xLpIndex; return itLpNaca.xLpIndex;
} }
//===================================================================
static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void)
{ {
return itLpNaca.xPrimaryLpIndex; return itLpNaca.xPrimaryLpIndex;
} }
//=================================================================
static inline HvLpIndex HvLpConfig_getLps(void) static inline HvLpIndex HvLpConfig_getLps(void)
{ {
return HvCallCfg_getLps(); return HvCallCfg_getLps();
} }
//=================================================================
static inline HvLpIndexMap HvLpConfig_getActiveLpMap(void) static inline HvLpIndexMap HvLpConfig_getActiveLpMap(void)
{ {
return HvCallCfg_getActiveLpMap(); return HvCallCfg_getActiveLpMap();
} }
//=================================================================
static inline u64 HvLpConfig_getSystemMsMegs(void) static inline u64 HvLpConfig_getSystemMsMegs(void)
{ {
return HvCallCfg_getSystemMsChunks() / HVCHUNKSPERMEG; return HvCallCfg_getSystemMsChunks() / HVCHUNKSPERMEG;
} }
//=================================================================
static inline u64 HvLpConfig_getSystemMsChunks(void) static inline u64 HvLpConfig_getSystemMsChunks(void)
{ {
return HvCallCfg_getSystemMsChunks(); return HvCallCfg_getSystemMsChunks();
} }
//=================================================================
static inline u64 HvLpConfig_getSystemMsPages(void) static inline u64 HvLpConfig_getSystemMsPages(void)
{ {
return HvCallCfg_getSystemMsChunks() * HVPAGESPERCHUNK; return HvCallCfg_getSystemMsChunks() * HVPAGESPERCHUNK;
} }
//================================================================
static inline u64 HvLpConfig_getMsMegs(void) static inline u64 HvLpConfig_getMsMegs(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur) / HVCHUNKSPERMEG; return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur)
/ HVCHUNKSPERMEG;
} }
//================================================================
static inline u64 HvLpConfig_getMsChunks(void) static inline u64 HvLpConfig_getMsChunks(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur); return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur);
} }
//================================================================
static inline u64 HvLpConfig_getMsPages(void) static inline u64 HvLpConfig_getMsPages(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur) * HVPAGESPERCHUNK; return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur)
* HVPAGESPERCHUNK;
} }
//================================================================
static inline u64 HvLpConfig_getMinMsMegs(void) static inline u64 HvLpConfig_getMinMsMegs(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min) / HVCHUNKSPERMEG; return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min)
/ HVCHUNKSPERMEG;
} }
//================================================================
static inline u64 HvLpConfig_getMinMsChunks(void) static inline u64 HvLpConfig_getMinMsChunks(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min); return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min);
} }
//================================================================
static inline u64 HvLpConfig_getMinMsPages(void) static inline u64 HvLpConfig_getMinMsPages(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min) * HVPAGESPERCHUNK; return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min)
* HVPAGESPERCHUNK;
} }
//================================================================
static inline u64 HvLpConfig_getMinRuntimeMsMegs(void) static inline u64 HvLpConfig_getMinRuntimeMsMegs(void)
{ {
return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) / HVCHUNKSPERMEG; return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex())
/ HVCHUNKSPERMEG;
} }
//===============================================================
static inline u64 HvLpConfig_getMinRuntimeMsChunks(void) static inline u64 HvLpConfig_getMinRuntimeMsChunks(void)
{ {
return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()); return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex());
} }
//===============================================================
static inline u64 HvLpConfig_getMinRuntimeMsPages(void) static inline u64 HvLpConfig_getMinRuntimeMsPages(void)
{ {
return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) * HVPAGESPERCHUNK; return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex())
* HVPAGESPERCHUNK;
} }
//===============================================================
static inline u64 HvLpConfig_getMaxMsMegs(void) static inline u64 HvLpConfig_getMaxMsMegs(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max) / HVCHUNKSPERMEG; return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max)
/ HVCHUNKSPERMEG;
} }
//===============================================================
static inline u64 HvLpConfig_getMaxMsChunks(void) static inline u64 HvLpConfig_getMaxMsChunks(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max); return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max);
} }
//===============================================================
static inline u64 HvLpConfig_getMaxMsPages(void) static inline u64 HvLpConfig_getMaxMsPages(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max) * HVPAGESPERCHUNK; return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max)
* HVPAGESPERCHUNK;
} }
//===============================================================
static inline u64 HvLpConfig_getInitMsMegs(void) static inline u64 HvLpConfig_getInitMsMegs(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init) / HVCHUNKSPERMEG; return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init)
/ HVCHUNKSPERMEG;
} }
//===============================================================
static inline u64 HvLpConfig_getInitMsChunks(void) static inline u64 HvLpConfig_getInitMsChunks(void)
{ {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init); return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init);
} }
//===============================================================
static inline u64 HvLpConfig_getInitMsPages(void) static inline u64 HvLpConfig_getInitMsPages(void)
{ return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init) * HVPAGESPERCHUNK; {
return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init)
* HVPAGESPERCHUNK;
} }
//===============================================================
static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) static inline u64 HvLpConfig_getSystemPhysicalProcessors(void)
{ {
return HvCallCfg_getSystemPhysicalProcessors(); return HvCallCfg_getSystemPhysicalProcessors();
} }
//===============================================================
static inline u64 HvLpConfig_getSystemLogicalProcessors(void) static inline u64 HvLpConfig_getSystemLogicalProcessors(void)
{ {
return HvCallCfg_getSystemPhysicalProcessors() * (/*getPaca()->getSecondaryThreadCount() +*/ 1); return HvCallCfg_getSystemPhysicalProcessors()
* (/*getPaca()->getSecondaryThreadCount() +*/ 1);
} }
//===============================================================
static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
{ {
return HvCallCfg_getNumProcsInSharedPool(sPI); return HvCallCfg_getNumProcsInSharedPool(sPI);
} }
//===============================================================
static inline u64 HvLpConfig_getPhysicalProcessors(void) static inline u64 HvLpConfig_getPhysicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Cur); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Cur);
} }
//===============================================================
static inline u64 HvLpConfig_getLogicalProcessors(void) static inline u64 HvLpConfig_getLogicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Cur) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Cur)
* (/*getPaca()->getSecondaryThreadCount() +*/ 1);
} }
//===============================================================
static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void)
{ {
return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex()); return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex());
} }
//===============================================================
static inline u64 HvLpConfig_getSharedProcUnits(void) static inline u64 HvLpConfig_getSharedProcUnits(void)
{ {
return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Cur); return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),
HvCallCfg_Cur);
} }
//===============================================================
static inline u64 HvLpConfig_getMinSharedProcUnits(void) static inline u64 HvLpConfig_getMinSharedProcUnits(void)
{ {
return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Min); return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),
HvCallCfg_Min);
} }
//===============================================================
static inline u64 HvLpConfig_getMaxSharedProcUnits(void) static inline u64 HvLpConfig_getMaxSharedProcUnits(void)
{ {
return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Max); return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),
HvCallCfg_Max);
} }
//===============================================================
static inline u64 HvLpConfig_getMinPhysicalProcessors(void) static inline u64 HvLpConfig_getMinPhysicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Min); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Min);
} }
//===============================================================
static inline u64 HvLpConfig_getMinLogicalProcessors(void) static inline u64 HvLpConfig_getMinLogicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Min) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Min)
* (/*getPaca()->getSecondaryThreadCount() +*/ 1);
} }
//===============================================================
static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) static inline u64 HvLpConfig_getMaxPhysicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Max); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Max);
} }
//===============================================================
static inline u64 HvLpConfig_getMaxLogicalProcessors(void) static inline u64 HvLpConfig_getMaxLogicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Max) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Max)
* (/*getPaca()->getSecondaryThreadCount() +*/ 1);
} }
//===============================================================
static inline u64 HvLpConfig_getInitPhysicalProcessors(void) static inline u64 HvLpConfig_getInitPhysicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Init); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Init);
} }
//===============================================================
static inline u64 HvLpConfig_getInitLogicalProcessors(void) static inline u64 HvLpConfig_getInitLogicalProcessors(void)
{ {
return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Init) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
HvCallCfg_Init)
* (/*getPaca()->getSecondaryThreadCount() +*/ 1);
} }
//================================================================
static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void)
{ {
return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline()); return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline());
} }
//===============================================================
static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp(HvLpIndex lp) static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp(
HvLpIndex lp)
{ {
return HvCallCfg_getVirtualLanIndexMap(lp); return HvCallCfg_getVirtualLanIndexMap(lp);
} }
//================================================================
static inline HvLpIndex HvLpConfig_getBusOwner(HvBusNumber busNumber) static inline HvLpIndex HvLpConfig_getBusOwner(HvBusNumber busNumber)
{ {
return HvCallCfg_getBusOwner(busNumber); return HvCallCfg_getBusOwner(busNumber);
} }
//===============================================================
static inline int HvLpConfig_isBusDedicated(HvBusNumber busNumber) static inline int HvLpConfig_isBusDedicated(HvBusNumber busNumber)
{ {
return HvCallCfg_isBusDedicated(busNumber); return HvCallCfg_isBusDedicated(busNumber);
} }
//================================================================
static inline HvLpIndexMap HvLpConfig_getBusAllocation(HvBusNumber busNumber) static inline HvLpIndexMap HvLpConfig_getBusAllocation(HvBusNumber busNumber)
{ {
return HvCallCfg_getBusAllocation(busNumber); return HvCallCfg_getBusAllocation(busNumber);
} }
//================================================================
// returns the absolute real address of the load area /* returns the absolute real address of the load area */
static inline u64 HvLpConfig_getLoadAddress(void) static inline u64 HvLpConfig_getLoadAddress(void)
{ {
return itLpNaca.xLoadAreaAddr & 0x7fffffffffffffff; return itLpNaca.xLoadAreaAddr & 0x7fffffffffffffff;
} }
//================================================================
static inline u64 HvLpConfig_getLoadPages(void) static inline u64 HvLpConfig_getLoadPages(void)
{ {
return itLpNaca.xLoadAreaChunks * HVPAGESPERCHUNK; return itLpNaca.xLoadAreaChunks * HVPAGESPERCHUNK;
} }
//================================================================
static inline int HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber) static inline int HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber)
{ {
HvLpIndex busOwner = HvLpConfig_getBusOwner(busNumber); HvLpIndex busOwner = HvLpConfig_getBusOwner(busNumber);
return (busOwner == HvLpConfig_getLpIndex()); return (busOwner == HvLpConfig_getLpIndex());
} }
//================================================================
static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, HvLpIndex lp2) static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1,
HvLpIndex lp2)
{ {
HvLpVirtualLanIndexMap virtualLanIndexMap1 = HvCallCfg_getVirtualLanIndexMap( lp1 ); HvLpVirtualLanIndexMap virtualLanIndexMap1 =
HvLpVirtualLanIndexMap virtualLanIndexMap2 = HvCallCfg_getVirtualLanIndexMap( lp2 ); HvCallCfg_getVirtualLanIndexMap(lp1);
HvLpVirtualLanIndexMap virtualLanIndexMap2 =
HvCallCfg_getVirtualLanIndexMap(lp2);
return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0); return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0);
} }
//================================================================
static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp) static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp)
{ {
return HvCallCfg_getHostingLpIndex(lp); return HvCallCfg_getHostingLpIndex(lp);
} }
//================================================================
#endif /* _HVLPCONFIG_H */ #endif /* _HVLPCONFIG_H */
...@@ -17,11 +17,8 @@ ...@@ -17,11 +17,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
//====================================================================== /* This file contains the class for HV events in the system. */
//
// This file contains the class for HV events in the system.
//
//=====================================================================
#ifndef _HVLPEVENT_H #ifndef _HVLPEVENT_H
#define _HVLPEVENT_H #define _HVLPEVENT_H
...@@ -30,69 +27,70 @@ ...@@ -30,69 +27,70 @@
#include <asm/iSeries/HvTypes.h> #include <asm/iSeries/HvTypes.h>
#include <asm/iSeries/HvCallEvent.h> #include <asm/iSeries/HvCallEvent.h>
//===================================================================== /*
// * HvLpEvent is the structure for Lp Event messages passed between
// HvLpEvent is the structure for Lp Event messages passed between * partitions through PLIC.
// partitions through PLIC. */
//
//===================================================================== struct HvEventFlags {
u8 xValid:1; /* Indicates a valid request x00-x00 */
struct HvEventFlags u8 xRsvd1:4; /* Reserved ... */
{ u8 xAckType:1; /* Immediate or deferred ... */
u8 xValid:1; // Indicates a valid request x00-x00 u8 xAckInd:1; /* Indicates if ACK required ... */
u8 xRsvd1:4; // Reserved ... u8 xFunction:1; /* Interrupt or Acknowledge ... */
u8 xAckType:1; // Immediate or deferred ...
u8 xAckInd:1; // Indicates if ACK required ...
u8 xFunction:1; // Interrupt or Acknowledge ...
}; };
struct HvLpEvent struct HvLpEvent {
{ struct HvEventFlags xFlags; /* Event flags x00-x00 */
struct HvEventFlags xFlags; // Event flags x00-x00 u8 xType; /* Type of message x01-x01 */
u8 xType; // Type of message x01-x01 u16 xSubtype; /* Subtype for event x02-x03 */
u16 xSubtype; // Subtype for event x02-x03 u8 xSourceLp; /* Source LP x04-x04 */
u8 xSourceLp; // Source LP x04-x04 u8 xTargetLp; /* Target LP x05-x05 */
u8 xTargetLp; // Target LP x05-x05 u8 xSizeMinus1; /* Size of Derived class - 1 x06-x06 */
u8 xSizeMinus1; // Size of Derived class - 1 x06-x06 u8 xRc; /* RC for Ack flows x07-x07 */
u8 xRc; // RC for Ack flows x07-x07 u16 xSourceInstanceId; /* Source sides instance id x08-x09 */
u16 xSourceInstanceId; // Source sides instance id x08-x09 u16 xTargetInstanceId; /* Target sides instance id x0A-x0B */
u16 xTargetInstanceId; // Target sides instance id x0A-x0B
union { union {
u32 xSubtypeData; // Data usable by the subtype x0C-x0F u32 xSubtypeData; /* Data usable by the subtype x0C-x0F */
u16 xSubtypeDataShort[2]; // Data as 2 shorts u16 xSubtypeDataShort[2]; /* Data as 2 shorts */
u8 xSubtypeDataChar[4]; // Data as 4 chars u8 xSubtypeDataChar[4]; /* Data as 4 chars */
} x; } x;
u64 xCorrelationToken; // Unique value for source/type x10-x17 u64 xCorrelationToken; /* Unique value for source/type x10-x17 */
}; };
// Lp Event handler function
typedef void (*LpEventHandler)(struct HvLpEvent *, struct pt_regs *); typedef void (*LpEventHandler)(struct HvLpEvent *, struct pt_regs *);
// Register a handler for an event type /* Register a handler for an event type - returns 0 on success */
// returns 0 on success extern int HvLpEvent_registerHandler(HvLpEvent_Type eventType,
extern int HvLpEvent_registerHandler( HvLpEvent_Type eventType, LpEventHandler hdlr); LpEventHandler hdlr);
// Unregister a handler for an event type /*
// This call will sleep until the handler being removed is guaranteed to * Unregister a handler for an event type
// be no longer executing on any CPU. Do not call with locks held. *
// * This call will sleep until the handler being removed is guaranteed to
// returns 0 on success * be no longer executing on any CPU. Do not call with locks held.
// Unregister will fail if there are any paths open for the type *
extern int HvLpEvent_unregisterHandler( HvLpEvent_Type eventType ); * returns 0 on success
* Unregister will fail if there are any paths open for the type
// Open an Lp Event Path for an event type */
// returns 0 on success extern int HvLpEvent_unregisterHandler(HvLpEvent_Type eventType);
// openPath will fail if there is no handler registered for the event type.
// The lpIndex specified is the partition index for the target partition
// (for VirtualIo, VirtualLan and SessionMgr) other types specify zero)
extern int HvLpEvent_openPath( HvLpEvent_Type eventType, HvLpIndex lpIndex );
/*
* Open an Lp Event Path for an event type
* returns 0 on success
* openPath will fail if there is no handler registered for the event type.
* The lpIndex specified is the partition index for the target partition
* (for VirtualIo, VirtualLan and SessionMgr) other types specify zero)
*/
extern int HvLpEvent_openPath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
// Close an Lp Event Path for a type and partition /*
// returns 0 on sucess * Close an Lp Event Path for a type and partition
extern int HvLpEvent_closePath( HvLpEvent_Type eventType, HvLpIndex lpIndex ); * returns 0 on sucess
*/
extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex);
#define HvLpEvent_Type_Hypervisor 0 #define HvLpEvent_Type_Hypervisor 0
#define HvLpEvent_Type_MachineFac 1 #define HvLpEvent_Type_MachineFac 1
...@@ -141,4 +139,4 @@ extern int HvLpEvent_closePath( HvLpEvent_Type eventType, HvLpIndex lpIndex ); ...@@ -141,4 +139,4 @@ extern int HvLpEvent_closePath( HvLpEvent_Type eventType, HvLpIndex lpIndex );
#define HvLpDma_Rc_InvalidAddress 4 #define HvLpDma_Rc_InvalidAddress 4
#define HvLpDma_Rc_InvalidLength 5 #define HvLpDma_Rc_InvalidLength 5
#endif // _HVLPEVENT_H #endif /* _HVLPEVENT_H */
...@@ -19,47 +19,43 @@ ...@@ -19,47 +19,43 @@
#ifndef _HVRELEASEDATA_H #ifndef _HVRELEASEDATA_H
#define _HVRELEASEDATA_H #define _HVRELEASEDATA_H
//============================================================================= /*
// * This control block contains the critical information about the
// This control block contains the critical information about the * release so that it can be changed in the future (ie, the virtual
// release so that it can be changed in the future (ie, the virtual * address of the OS's NACA).
// address of the OS's NACA). */
//
#include <asm/types.h> #include <asm/types.h>
#include <asm/naca.h> #include <asm/naca.h>
//============================================================================= /*
// * When we IPL a secondary partition, we will check if if the
// When we IPL a secondary partition, we will check if if the * secondary xMinPlicVrmIndex > the primary xVrmIndex.
// secondary xMinPlicVrmIndex > the primary xVrmIndex. * If it is then this tells PLIC that this secondary is not
// If it is then this tells PLIC that this secondary is not * supported running on this "old" of a level of PLIC.
// supported running on this "old" of a level of PLIC. *
// * Likewise, we will compare the primary xMinSlicVrmIndex to
// Likewise, we will compare the primary xMinSlicVrmIndex to * the secondary xVrmIndex.
// the secondary xVrmIndex. * If the primary xMinSlicVrmDelta > secondary xVrmDelta then we
// If the primary xMinSlicVrmDelta > secondary xVrmDelta then we * know that this PLIC does not support running an OS "that old".
// know that this PLIC does not support running an OS "that old". */
//
//=============================================================================
struct HvReleaseData struct HvReleaseData {
{ u32 xDesc; /* Descriptor "HvRD" ebcdic x00-x03 */
u32 xDesc; // Descriptor "HvRD" ebcdic x00-x03 u16 xSize; /* Size of this control block x04-x05 */
u16 xSize; // Size of this control block x04-x05 u16 xVpdAreasPtrOffset; /* Offset in NACA of ItVpdAreas x06-x07 */
u16 xVpdAreasPtrOffset; // Offset in NACA of ItVpdAreas x06-x07 struct naca_struct *xSlicNacaAddr; /* Virt addr of SLIC NACA x08-x0F */
struct naca_struct * xSlicNacaAddr; // Virt addr of SLIC NACA x08-x0F u32 xMsNucDataOffset; /* Offset of Linux Mapping Data x10-x13 */
u32 xMsNucDataOffset; // Offset of Linux Mapping Data x10-x13 u32 xRsvd1; /* Reserved x14-x17 */
u32 xRsvd1; // Reserved x14-x17 u16 xTagsMode:1; /* 0 == tags active, 1 == tags inactive */
u16 xTagsMode:1; // 0 == tags active, 1 == tags inactive u16 xAddressSize:1; /* 0 == 64-bit, 1 == 32-bit */
u16 xAddressSize:1; // 0 == 64-bit, 1 == 32-bit u16 xNoSharedProcs:1; /* 0 == shared procs, 1 == no shared */
u16 xNoSharedProcs:1; // 0 == shared procs, 1 == no shared u16 xNoHMT:1; /* 0 == allow HMT, 1 == no HMT */
u16 xNoHMT:1; // 0 == allow HMT, 1 == no HMT u16 xRsvd2:12; /* Reserved x18-x19 */
u16 xRsvd2:12; // Reserved x18-x19 u16 xVrmIndex; /* VRM Index of OS image x1A-x1B */
u16 xVrmIndex; // VRM Index of OS image x1A-x1B u16 xMinSupportedPlicVrmIndex; /* Min PLIC level (soft) x1C-x1D */
u16 xMinSupportedPlicVrmIndex;// Min PLIC level (soft) x1C-x1D u16 xMinCompatablePlicVrmIndex; /* Min PLIC levelP (hard) x1E-x1F */
u16 xMinCompatablePlicVrmIndex;// Min PLIC levelP (hard) x1E-x1F char xVrmName[12]; /* Displayable name x20-x2B */
char xVrmName[12]; // Displayable name x20-x2B char xRsvd3[20]; /* Reserved x2C-x3F */
char xRsvd3[20]; // Reserved x2C-x3F
}; };
#endif /* _HVRELEASEDATA_H */ #endif /* _HVRELEASEDATA_H */
...@@ -19,23 +19,12 @@ ...@@ -19,23 +19,12 @@
#ifndef _HVTYPES_H #ifndef _HVTYPES_H
#define _HVTYPES_H #define _HVTYPES_H
//=========================================================================== /*
// Header File Id * General typedefs for the hypervisor.
// Name______________: HvTypes.H */
//
// Description_______:
//
// General typedefs for the hypervisor.
//
// Declared Class(es):
//
//===========================================================================
#include <asm/types.h> #include <asm/types.h>
//-------------------------------------------------------------------
// Typedefs
//-------------------------------------------------------------------
typedef u8 HvLpIndex; typedef u8 HvLpIndex;
typedef u16 HvLpInstanceId; typedef u16 HvLpInstanceId;
typedef u64 HvLpTOD; typedef u64 HvLpTOD;
...@@ -51,17 +40,17 @@ typedef u64 HvIoToken; ...@@ -51,17 +40,17 @@ typedef u64 HvIoToken;
typedef u8 HvLpName[8]; typedef u8 HvLpName[8];
typedef u32 HvIoId; typedef u32 HvIoId;
typedef u64 HvRealMemoryIndex; typedef u64 HvRealMemoryIndex;
typedef u32 HvLpIndexMap; // Must hold HvMaxArchitectedLps bits!!! typedef u32 HvLpIndexMap; /* Must hold HvMaxArchitectedLps bits!!! */
typedef u16 HvLpVrmIndex; typedef u16 HvLpVrmIndex;
typedef u32 HvXmGenerationId; typedef u32 HvXmGenerationId;
typedef u8 HvLpBusPool; typedef u8 HvLpBusPool;
typedef u8 HvLpSharedPoolIndex; typedef u8 HvLpSharedPoolIndex;
typedef u16 HvLpSharedProcUnitsX100; typedef u16 HvLpSharedProcUnitsX100;
typedef u8 HvLpVirtualLanIndex; typedef u8 HvLpVirtualLanIndex;
typedef u16 HvLpVirtualLanIndexMap; // Must hold HvMaxArchitectedVirtualLans bits!!! typedef u16 HvLpVirtualLanIndexMap; /* Must hold HvMaxArchitectedVirtualLans bits!!! */
typedef u16 HvBusNumber; // Hypervisor Bus Number typedef u16 HvBusNumber; /* Hypervisor Bus Number */
typedef u8 HvSubBusNumber; // Hypervisor SubBus Number typedef u8 HvSubBusNumber; /* Hypervisor SubBus Number */
typedef u8 HvAgentId; // Hypervisor DevFn typedef u8 HvAgentId; /* Hypervisor DevFn */
#define HVMAXARCHITECTEDLPS 32 #define HVMAXARCHITECTEDLPS 32
...@@ -69,8 +58,8 @@ typedef u8 HvAgentId; // Hypervisor DevFn ...@@ -69,8 +58,8 @@ typedef u8 HvAgentId; // Hypervisor DevFn
#define HVMAXARCHITECTEDVIRTUALDISKS 32 #define HVMAXARCHITECTEDVIRTUALDISKS 32
#define HVMAXARCHITECTEDVIRTUALCDROMS 8 #define HVMAXARCHITECTEDVIRTUALCDROMS 8
#define HVMAXARCHITECTEDVIRTUALTAPES 8 #define HVMAXARCHITECTEDVIRTUALTAPES 8
#define HVCHUNKSIZE 256 * 1024 #define HVCHUNKSIZE (256 * 1024)
#define HVPAGESIZE 4 * 1024 #define HVPAGESIZE (4 * 1024)
#define HVLPMINMEGSPRIMARY 256 #define HVLPMINMEGSPRIMARY 256
#define HVLPMINMEGSSECONDARY 64 #define HVLPMINMEGSSECONDARY 64
#define HVCHUNKSPERMEG 4 #define HVCHUNKSPERMEG 4
...@@ -81,12 +70,11 @@ typedef u8 HvAgentId; // Hypervisor DevFn ...@@ -81,12 +70,11 @@ typedef u8 HvAgentId; // Hypervisor DevFn
#define HvMaxArchitectedVirtualLans ((HvLpVirtualLanIndex)16) #define HvMaxArchitectedVirtualLans ((HvLpVirtualLanIndex)16)
#define HvLpIndexInvalid ((HvLpIndex)0xff) #define HvLpIndexInvalid ((HvLpIndex)0xff)
//-------------------------------------------------------------------- /*
// Enums for the sub-components under PLIC * Enums for the sub-components under PLIC
// Used in HvCall and HvPrimaryCall * Used in HvCall and HvPrimaryCall
//-------------------------------------------------------------------- */
enum HvCallCompIds enum HvCallCompIds {
{
HvCallCompId = 0, HvCallCompId = 0,
HvCallCpuCtlsCompId = 1, HvCallCpuCtlsCompId = 1,
HvCallCfgCompId = 2, HvCallCfgCompId = 2,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册