aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/iSeries/HvCallHpt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCallHpt.h')
-rw-r--r--include/asm-ppc64/iSeries/HvCallHpt.h127
1 files changed, 127 insertions, 0 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallHpt.h b/include/asm-ppc64/iSeries/HvCallHpt.h
new file mode 100644
index 000000000000..da769873d18b
--- /dev/null
+++ b/include/asm-ppc64/iSeries/HvCallHpt.h
@@ -0,0 +1,127 @@
1/*
2 * HvCallHpt.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef _HVCALLHPT_H
20#define _HVCALLHPT_H
21
22//============================================================================
23//
24// This file contains the "hypervisor call" interface which is used to
25// drive the hypervisor from the OS.
26//
27//============================================================================
28
29#include <asm/iSeries/HvCallSc.h>
30#include <asm/iSeries/HvTypes.h>
31#include <asm/mmu.h>
32
33//-----------------------------------------------------------------------------
34// Constants
35//-----------------------------------------------------------------------------
36
37#define HvCallHptGetHptAddress HvCallHpt + 0
38#define HvCallHptGetHptPages HvCallHpt + 1
39#define HvCallHptSetPp HvCallHpt + 5
40#define HvCallHptSetSwBits HvCallHpt + 6
41#define HvCallHptUpdate HvCallHpt + 7
42#define HvCallHptInvalidateNoSyncICache HvCallHpt + 8
43#define HvCallHptGet HvCallHpt + 11
44#define HvCallHptFindNextValid HvCallHpt + 12
45#define HvCallHptFindValid HvCallHpt + 13
46#define HvCallHptAddValidate HvCallHpt + 16
47#define HvCallHptInvalidateSetSwBitsGet HvCallHpt + 18
48
49
50//============================================================================
51static inline u64 HvCallHpt_getHptAddress(void)
52{
53 u64 retval = HvCall0(HvCallHptGetHptAddress);
54 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
55 return retval;
56}
57//============================================================================
58static inline u64 HvCallHpt_getHptPages(void)
59{
60 u64 retval = HvCall0(HvCallHptGetHptPages);
61 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
62 return retval;
63}
64//=============================================================================
65static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value)
66{
67 HvCall2( HvCallHptSetPp, hpteIndex, value );
68 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
69}
70//=============================================================================
71static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff )
72{
73 HvCall3( HvCallHptSetSwBits, hpteIndex, bitson, bitsoff );
74 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
75}
76//=============================================================================
77static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)
78
79{
80 HvCall1( HvCallHptInvalidateNoSyncICache, hpteIndex );
81 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
82}
83//=============================================================================
84static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, u8 bitsoff )
85
86{
87 u64 compressedStatus;
88 compressedStatus = HvCall4( HvCallHptInvalidateSetSwBitsGet, hpteIndex, bitson, bitsoff, 1 );
89 HvCall1( HvCallHptInvalidateNoSyncICache, hpteIndex );
90 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
91 return compressedStatus;
92}
93//=============================================================================
94static inline u64 HvCallHpt_findValid( HPTE *hpte, u64 vpn )
95{
96 u64 retIndex = HvCall3Ret16( HvCallHptFindValid, hpte, vpn, 0, 0 );
97 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
98 return retIndex;
99}
100//=============================================================================
101static inline u64 HvCallHpt_findNextValid( HPTE *hpte, u32 hpteIndex, u8 bitson, u8 bitsoff )
102{
103 u64 retIndex = HvCall3Ret16( HvCallHptFindNextValid, hpte, hpteIndex, bitson, bitsoff );
104 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
105 return retIndex;
106}
107//=============================================================================
108static inline void HvCallHpt_get( HPTE *hpte, u32 hpteIndex )
109{
110 HvCall2Ret16( HvCallHptGet, hpte, hpteIndex, 0 );
111 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
112}
113//============================================================================
114static inline void HvCallHpt_addValidate( u32 hpteIndex,
115 u32 hBit,
116 HPTE *hpte )
117
118{
119 HvCall4( HvCallHptAddValidate, hpteIndex,
120 hBit, (*((u64 *)hpte)), (*(((u64 *)hpte)+1)) );
121 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
122}
123
124
125//=============================================================================
126
127#endif /* _HVCALLHPT_H */