Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / arch / powerpc / include / asm / iseries / hv_call_xm.h
blob392ac3f54df085926358c7b53629efe4c7909f5c
1 /*
2 * This file contains the "hypervisor call" interface which is used to
3 * drive the hypervisor from SLIC.
4 */
5 #ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H
6 #define _ASM_POWERPC_ISERIES_HV_CALL_XM_H
8 #include <asm/iseries/hv_call_sc.h>
9 #include <asm/iseries/hv_types.h>
11 #define HvCallXmGetTceTableParms HvCallXm + 0
12 #define HvCallXmTestBus HvCallXm + 1
13 #define HvCallXmConnectBusUnit HvCallXm + 2
14 #define HvCallXmLoadTod HvCallXm + 8
15 #define HvCallXmTestBusUnit HvCallXm + 9
16 #define HvCallXmSetTce HvCallXm + 11
17 #define HvCallXmSetTces HvCallXm + 13
19 static inline void HvCallXm_getTceTableParms(u64 cb)
21 HvCall1(HvCallXmGetTceTableParms, cb);
24 static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
26 return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce);
29 static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
30 u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
32 return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
33 tce1, tce2, tce3, tce4);
36 static inline u64 HvCallXm_testBus(u16 busNumber)
38 return HvCall1(HvCallXmTestBus, busNumber);
41 static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
42 u8 deviceId)
44 return HvCall2(HvCallXmTestBusUnit, busNumber,
45 (subBusNumber << 8) | deviceId);
48 static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
49 u8 deviceId, u64 interruptToken)
51 return HvCall5(HvCallXmConnectBusUnit, busNumber,
52 (subBusNumber << 8) | deviceId, interruptToken, 0,
53 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */);
56 static inline u64 HvCallXm_loadTod(void)
58 return HvCall0(HvCallXmLoadTod);
61 #endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */