hv_call_xm.h 1.7 KB
Newer Older
1 2 3 4
/*
 * This file contains the "hypervisor call" interface which is used to
 * drive the hypervisor from SLIC.
 */
5 6
#ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H
#define _ASM_POWERPC_ISERIES_HV_CALL_XM_H
L
Linus Torvalds 已提交
7

8
#include <asm/iseries/hv_call_sc.h>
9
#include <asm/iseries/hv_types.h>
L
Linus Torvalds 已提交
10 11 12 13 14 15 16 17 18

#define HvCallXmGetTceTableParms	HvCallXm +  0
#define HvCallXmTestBus			HvCallXm +  1
#define HvCallXmConnectBusUnit		HvCallXm +  2
#define HvCallXmLoadTod			HvCallXm +  8
#define HvCallXmTestBusUnit		HvCallXm +  9
#define HvCallXmSetTce			HvCallXm + 11
#define HvCallXmSetTces			HvCallXm + 13

19
static inline void HvCallXm_getTceTableParms(u64 cb)
L
Linus Torvalds 已提交
20 21 22
{
	HvCall1(HvCallXmGetTceTableParms, cb);
}
23 24 25

static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce)
{
26
	return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce);
L
Linus Torvalds 已提交
27
}
28 29 30 31

static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset,
		u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4)
{
32 33
	return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces,
			     tce1, tce2, tce3, tce4);
L
Linus Torvalds 已提交
34
}
35 36

static inline u64 HvCallXm_testBus(u16 busNumber)
L
Linus Torvalds 已提交
37
{
38
	return HvCall1(HvCallXmTestBus, busNumber);
L
Linus Torvalds 已提交
39
}
40 41 42

static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber,
		u8 deviceId)
L
Linus Torvalds 已提交
43
{
44 45
	return HvCall2(HvCallXmTestBusUnit, busNumber,
			(subBusNumber << 8) | deviceId);
L
Linus Torvalds 已提交
46
}
47 48 49

static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber,
		u8 deviceId, u64 interruptToken)
L
Linus Torvalds 已提交
50
{
51 52 53
	return HvCall5(HvCallXmConnectBusUnit, busNumber,
			(subBusNumber << 8) | deviceId, interruptToken, 0,
			0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */);
L
Linus Torvalds 已提交
54
}
55 56

static inline u64 HvCallXm_loadTod(void)
L
Linus Torvalds 已提交
57
{
58
	return HvCall0(HvCallXmLoadTod);
L
Linus Torvalds 已提交
59 60
}

61
#endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */