aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/iSeries/HvCallXm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCallXm.h')
-rw-r--r--include/asm-ppc64/iSeries/HvCallXm.h113
1 files changed, 48 insertions, 65 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallXm.h b/include/asm-ppc64/iSeries/HvCallXm.h
index bfb898f4db8d..8b9ba608daaf 100644
--- a/include/asm-ppc64/iSeries/HvCallXm.h
+++ b/include/asm-ppc64/iSeries/HvCallXm.h
@@ -1,30 +1,13 @@
1//============================================================================ 1/*
2// Header File Id 2 * This file contains the "hypervisor call" interface which is used to
3// Name______________: HvCallXm.H 3 * drive the hypervisor from SLIC.
4// 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 5#ifndef _HVCALLXM_H
12#define _HVCALLXM_H 6#define _HVCALLXM_H
13 7
14//-------------------------------------------------------------------
15// Forward declarations
16//-------------------------------------------------------------------
17
18//-------------------------------------------------------------------
19// Standard Includes
20//-------------------------------------------------------------------
21#include <asm/iSeries/HvCallSc.h> 8#include <asm/iSeries/HvCallSc.h>
22#include <asm/iSeries/HvTypes.h> 9#include <asm/iSeries/HvTypes.h>
23 10
24//-----------------------------------------------------------------------------
25// Constants
26//-----------------------------------------------------------------------------
27
28#define HvCallXmGetTceTableParms HvCallXm + 0 11#define HvCallXmGetTceTableParms HvCallXm + 0
29#define HvCallXmTestBus HvCallXm + 1 12#define HvCallXmTestBus HvCallXm + 1
30#define HvCallXmConnectBusUnit HvCallXm + 2 13#define HvCallXmConnectBusUnit HvCallXm + 2
@@ -33,63 +16,63 @@
33#define HvCallXmSetTce HvCallXm + 11 16#define HvCallXmSetTce HvCallXm + 11
34#define HvCallXmSetTces HvCallXm + 13 17#define HvCallXmSetTces HvCallXm + 13
35 18
19/*
20 * Structure passed to HvCallXm_getTceTableParms
21 */
22struct iommu_table_cb {
23 unsigned long itc_busno; /* Bus number for this tce table */
24 unsigned long itc_start; /* Will be NULL for secondary */
25 unsigned long itc_totalsize; /* Size (in pages) of whole table */
26 unsigned long itc_offset; /* Index into real tce table of the
27 start of our section */
28 unsigned long itc_size; /* Size (in pages) of our section */
29 unsigned long itc_index; /* Index of this tce table */
30 unsigned short itc_maxtables; /* Max num of tables for partition */
31 unsigned char itc_virtbus; /* Flag to indicate virtual bus */
32 unsigned char itc_slotno; /* IOA Tce Slot Index */
33 unsigned char itc_rsvd[4];
34};
36 35
37 36static inline void HvCallXm_getTceTableParms(u64 cb)
38//============================================================================
39static inline void HvCallXm_getTceTableParms(u64 cb)
40{ 37{
41 HvCall1(HvCallXmGetTceTableParms, cb); 38 HvCall1(HvCallXmGetTceTableParms, cb);
42 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
43} 39}
44//============================================================================ 40
45static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce) 41static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
46{ 42{
47 u64 retval = HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce ); 43 return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce);
48 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
49 return retval;
50}
51//============================================================================
52static 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} 44}
59//============================================================================= 45
60static inline u64 HvCallXm_testBus(u16 busNumber) 46static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
47 u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
61{ 48{
62 u64 retVal = HvCall1(HvCallXmTestBus, busNumber); 49 return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
63 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 50 tce1, tce2, tce3, tce4);
64 return retVal;
65} 51}
66//===================================================================================== 52
67static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId) 53static inline u64 HvCallXm_testBus(u16 busNumber)
68{ 54{
69 u64 busUnitNumber = (subBusNumber << 8) | deviceId; 55 return HvCall1(HvCallXmTestBus, busNumber);
70 u64 retVal = HvCall2(HvCallXmTestBusUnit, busNumber, busUnitNumber);
71 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
72 return retVal;
73} 56}
74//===================================================================================== 57
75static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, u8 deviceId, 58static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
76 u64 interruptToken) 59 u8 deviceId)
77{ 60{
78 u64 busUnitNumber = (subBusNumber << 8) | deviceId; 61 return HvCall2(HvCallXmTestBusUnit, busNumber,
79 u64 queueIndex = 0; // HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)); 62 (subBusNumber << 8) | deviceId);
63}
80 64
81 u64 retVal = HvCall5(HvCallXmConnectBusUnit, busNumber, busUnitNumber, 65static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
82 interruptToken, 0, queueIndex); 66 u8 deviceId, u64 interruptToken)
83 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 67{
84 return retVal; 68 return HvCall5(HvCallXmConnectBusUnit, busNumber,
69 (subBusNumber << 8) | deviceId, interruptToken, 0,
70 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */);
85} 71}
86//===================================================================================== 72
87static inline u64 HvCallXm_loadTod(void) 73static inline u64 HvCallXm_loadTod(void)
88{ 74{
89 u64 retVal = HvCall0(HvCallXmLoadTod); 75 return HvCall0(HvCallXmLoadTod);
90 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
91 return retVal;
92} 76}
93//=====================================================================================
94 77
95#endif /* _HVCALLXM_H */ 78#endif /* _HVCALLXM_H */