[TG3]: Add tagged status support.
[linux-2.6/verdex.git] / include / asm-ppc64 / iSeries / HvCallHpt.h
blobda769873d18b030920c785ac531cc48b730b1cdc
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.
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
19 #ifndef _HVCALLHPT_H
20 #define _HVCALLHPT_H
22 //============================================================================
24 // This file contains the "hypervisor call" interface which is used to
25 // drive the hypervisor from the OS.
27 //============================================================================
29 #include <asm/iSeries/HvCallSc.h>
30 #include <asm/iSeries/HvTypes.h>
31 #include <asm/mmu.h>
33 //-----------------------------------------------------------------------------
34 // Constants
35 //-----------------------------------------------------------------------------
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
50 //============================================================================
51 static inline u64 HvCallHpt_getHptAddress(void)
53 u64 retval = HvCall0(HvCallHptGetHptAddress);
54 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
55 return retval;
57 //============================================================================
58 static inline u64 HvCallHpt_getHptPages(void)
60 u64 retval = HvCall0(HvCallHptGetHptPages);
61 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
62 return retval;
64 //=============================================================================
65 static inline void HvCallHpt_setPp(u32 hpteIndex, u8 value)
67 HvCall2( HvCallHptSetPp, hpteIndex, value );
68 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
70 //=============================================================================
71 static inline void HvCallHpt_setSwBits(u32 hpteIndex, u8 bitson, u8 bitsoff )
73 HvCall3( HvCallHptSetSwBits, hpteIndex, bitson, bitsoff );
74 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
76 //=============================================================================
77 static inline void HvCallHpt_invalidateNoSyncICache(u32 hpteIndex)
80 HvCall1( HvCallHptInvalidateNoSyncICache, hpteIndex );
81 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
83 //=============================================================================
84 static inline u64 HvCallHpt_invalidateSetSwBitsGet(u32 hpteIndex, u8 bitson, u8 bitsoff )
87 u64 compressedStatus;
88 compressedStatus = HvCall4( HvCallHptInvalidateSetSwBitsGet, hpteIndex, bitson, bitsoff, 1 );
89 HvCall1( HvCallHptInvalidateNoSyncICache, hpteIndex );
90 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
91 return compressedStatus;
93 //=============================================================================
94 static inline u64 HvCallHpt_findValid( HPTE *hpte, u64 vpn )
96 u64 retIndex = HvCall3Ret16( HvCallHptFindValid, hpte, vpn, 0, 0 );
97 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
98 return retIndex;
100 //=============================================================================
101 static inline u64 HvCallHpt_findNextValid( HPTE *hpte, u32 hpteIndex, u8 bitson, u8 bitsoff )
103 u64 retIndex = HvCall3Ret16( HvCallHptFindNextValid, hpte, hpteIndex, bitson, bitsoff );
104 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
105 return retIndex;
107 //=============================================================================
108 static inline void HvCallHpt_get( HPTE *hpte, u32 hpteIndex )
110 HvCall2Ret16( HvCallHptGet, hpte, hpteIndex, 0 );
111 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
113 //============================================================================
114 static inline void HvCallHpt_addValidate( u32 hpteIndex,
115 u32 hBit,
116 HPTE *hpte )
119 HvCall4( HvCallHptAddValidate, hpteIndex,
120 hBit, (*((u64 *)hpte)), (*(((u64 *)hpte)+1)) );
121 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
125 //=============================================================================
127 #endif /* _HVCALLHPT_H */