initial commit with v2.6.9
[linux-2.6.9-moxart.git] / include / asm-ppc64 / iSeries / HvCallXm.h
blobbfb898f4db8d0e3b91a8da5c7a96950a88ca6609
1 //============================================================================
2 // Header File Id
3 // Name______________: HvCallXm.H
4 //
5 // Description_______:
6 //
7 // This file contains the "hypervisor call" interface which is used to
8 // drive the hypervisor from SLIC.
9 //
10 //============================================================================
11 #ifndef _HVCALLXM_H
12 #define _HVCALLXM_H
14 //-------------------------------------------------------------------
15 // Forward declarations
16 //-------------------------------------------------------------------
18 //-------------------------------------------------------------------
19 // Standard Includes
20 //-------------------------------------------------------------------
21 #include <asm/iSeries/HvCallSc.h>
22 #include <asm/iSeries/HvTypes.h>
24 //-----------------------------------------------------------------------------
25 // Constants
26 //-----------------------------------------------------------------------------
28 #define HvCallXmGetTceTableParms HvCallXm + 0
29 #define HvCallXmTestBus HvCallXm + 1
30 #define HvCallXmConnectBusUnit HvCallXm + 2
31 #define HvCallXmLoadTod HvCallXm + 8
32 #define HvCallXmTestBusUnit HvCallXm + 9
33 #define HvCallXmSetTce HvCallXm + 11
34 #define HvCallXmSetTces HvCallXm + 13
38 //============================================================================
39 static inline void HvCallXm_getTceTableParms(u64 cb)
41 HvCall1(HvCallXmGetTceTableParms, cb);
42 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
44 //============================================================================
45 static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
47 u64 retval = HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce );
48 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
49 return retval;
51 //============================================================================
52 static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
54 u64 retval = HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
55 tce1, tce2, tce3, tce4 );
56 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
57 return retval;
59 //=============================================================================
60 static inline u64 HvCallXm_testBus(u16 busNumber)
62 u64 retVal = HvCall1(HvCallXmTestBus, busNumber);
63 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
64 return retVal;
66 //=====================================================================================
67 static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId)
69 u64 busUnitNumber = (subBusNumber << 8) | deviceId;
70 u64 retVal = HvCall2(HvCallXmTestBusUnit, busNumber, busUnitNumber);
71 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
72 return retVal;
74 //=====================================================================================
75 static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId,
76 u64 interruptToken)
78 u64 busUnitNumber = (subBusNumber << 8) | deviceId;
79 u64 queueIndex = 0; // HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard));
81 u64 retVal = HvCall5(HvCallXmConnectBusUnit, busNumber, busUnitNumber,
82 interruptToken, 0, queueIndex);
83 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
84 return retVal;
86 //=====================================================================================
87 static inline u64 HvCallXm_loadTod(void)
89 u64 retVal = HvCall0(HvCallXmLoadTod);
90 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
91 return retVal;
93 //=====================================================================================
95 #endif /* _HVCALLXM_H */