diff options
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCallXm.h')
-rw-r--r-- | include/asm-ppc64/iSeries/HvCallXm.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallXm.h b/include/asm-ppc64/iSeries/HvCallXm.h new file mode 100644 index 000000000000..bfb898f4db8d --- /dev/null +++ b/include/asm-ppc64/iSeries/HvCallXm.h | |||
@@ -0,0 +1,95 @@ | |||
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 | ||
13 | |||
14 | //------------------------------------------------------------------- | ||
15 | // Forward declarations | ||
16 | //------------------------------------------------------------------- | ||
17 | |||
18 | //------------------------------------------------------------------- | ||
19 | // Standard Includes | ||
20 | //------------------------------------------------------------------- | ||
21 | #include <asm/iSeries/HvCallSc.h> | ||
22 | #include <asm/iSeries/HvTypes.h> | ||
23 | |||
24 | //----------------------------------------------------------------------------- | ||
25 | // Constants | ||
26 | //----------------------------------------------------------------------------- | ||
27 | |||
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 | ||
35 | |||
36 | |||
37 | |||
38 | //============================================================================ | ||
39 | static inline void HvCallXm_getTceTableParms(u64 cb) | ||
40 | { | ||
41 | HvCall1(HvCallXmGetTceTableParms, cb); | ||
42 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
43 | } | ||
44 | //============================================================================ | ||
45 | static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce) | ||
46 | { | ||
47 | u64 retval = HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce ); | ||
48 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
49 | return retval; | ||
50 | } | ||
51 | //============================================================================ | ||
52 | static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4) | ||
53 | { | ||
54 | u64 retval = HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces, | ||
55 | tce1, tce2, tce3, tce4 ); | ||
56 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
57 | return retval; | ||
58 | } | ||
59 | //============================================================================= | ||
60 | static inline u64 HvCallXm_testBus(u16 busNumber) | ||
61 | { | ||
62 | u64 retVal = HvCall1(HvCallXmTestBus, busNumber); | ||
63 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
64 | return retVal; | ||
65 | } | ||
66 | //===================================================================================== | ||
67 | static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId) | ||
68 | { | ||
69 | u64 busUnitNumber = (subBusNumber << 8) | deviceId; | ||
70 | u64 retVal = HvCall2(HvCallXmTestBusUnit, busNumber, busUnitNumber); | ||
71 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
72 | return retVal; | ||
73 | } | ||
74 | //===================================================================================== | ||
75 | static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId, | ||
76 | u64 interruptToken) | ||
77 | { | ||
78 | u64 busUnitNumber = (subBusNumber << 8) | deviceId; | ||
79 | u64 queueIndex = 0; // HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)); | ||
80 | |||
81 | u64 retVal = HvCall5(HvCallXmConnectBusUnit, busNumber, busUnitNumber, | ||
82 | interruptToken, 0, queueIndex); | ||
83 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
84 | return retVal; | ||
85 | } | ||
86 | //===================================================================================== | ||
87 | static inline u64 HvCallXm_loadTod(void) | ||
88 | { | ||
89 | u64 retVal = HvCall0(HvCallXmLoadTod); | ||
90 | // getPaca()->adjustHmtForNoOfSpinLocksHeld(); | ||
91 | return retVal; | ||
92 | } | ||
93 | //===================================================================================== | ||
94 | |||
95 | #endif /* _HVCALLXM_H */ | ||