Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This file contains the "hypervisor call" interface which is used to |
| 3 | * drive the hypervisor from SLIC. |
| 4 | */ |
Kelly Daly | ecb3ca27 | 2005-11-02 15:53:01 +1100 | [diff] [blame] | 5 | #ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H |
| 6 | #define _ASM_POWERPC_ISERIES_HV_CALL_XM_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | |
Kelly Daly | 50592f5 | 2005-11-02 11:37:22 +1100 | [diff] [blame] | 8 | #include <asm/iseries/hv_call_sc.h> |
Kelly Daly | 1ec65d7 | 2005-11-02 13:46:07 +1100 | [diff] [blame] | 9 | #include <asm/iseries/hv_types.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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 |
| 18 | |
Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 19 | static inline void HvCallXm_getTceTableParms(u64 cb) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | { |
| 21 | HvCall1(HvCallXmGetTceTableParms, cb); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | } |
Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 23 | |
| 24 | static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce) |
| 25 | { |
Stephen Rothwell | 6b7feec | 2005-06-21 17:15:35 -0700 | [diff] [blame] | 26 | return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | } |
Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 28 | |
| 29 | static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, |
| 30 | u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4) |
| 31 | { |
Stephen Rothwell | 6b7feec | 2005-06-21 17:15:35 -0700 | [diff] [blame] | 32 | return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces, |
| 33 | tce1, tce2, tce3, tce4); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | } |
Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 35 | |
| 36 | static inline u64 HvCallXm_testBus(u16 busNumber) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | { |
Stephen Rothwell | 6b7feec | 2005-06-21 17:15:35 -0700 | [diff] [blame] | 38 | return HvCall1(HvCallXmTestBus, busNumber); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | } |
Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 40 | |
| 41 | static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, |
| 42 | u8 deviceId) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | { |
Stephen Rothwell | 6b7feec | 2005-06-21 17:15:35 -0700 | [diff] [blame] | 44 | return HvCall2(HvCallXmTestBusUnit, busNumber, |
| 45 | (subBusNumber << 8) | deviceId); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 46 | } |
Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 47 | |
| 48 | static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, |
| 49 | u8 deviceId, u64 interruptToken) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | { |
Stephen Rothwell | 6b7feec | 2005-06-21 17:15:35 -0700 | [diff] [blame] | 51 | return HvCall5(HvCallXmConnectBusUnit, busNumber, |
| 52 | (subBusNumber << 8) | deviceId, interruptToken, 0, |
| 53 | 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | } |
Stephen Rothwell | 45dc76a | 2005-06-21 17:15:33 -0700 | [diff] [blame] | 55 | |
| 56 | static inline u64 HvCallXm_loadTod(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | { |
Stephen Rothwell | 6b7feec | 2005-06-21 17:15:35 -0700 | [diff] [blame] | 58 | return HvCall0(HvCallXmLoadTod); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | |
Kelly Daly | ecb3ca27 | 2005-11-02 15:53:01 +1100 | [diff] [blame] | 61 | #endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */ |