aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/iSeries/HvCallCfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ppc64/iSeries/HvCallCfg.h')
-rw-r--r--include/asm-ppc64/iSeries/HvCallCfg.h116
1 files changed, 55 insertions, 61 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallCfg.h b/include/asm-ppc64/iSeries/HvCallCfg.h
index 9f40f16de533..2223a9647d0e 100644
--- a/include/asm-ppc64/iSeries/HvCallCfg.h
+++ b/include/asm-ppc64/iSeries/HvCallCfg.h
@@ -1,43 +1,32 @@
1/* 1/*
2 * HvCallCfg.h 2 * HvCallCfg.h
3 * Copyright (C) 2001 Mike Corrigan IBM Corporation 3 * Copyright (C) 2001 Mike Corrigan IBM Corporation
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 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 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 7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 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 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 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19/*
20//===================================================================================== 20 * This file contains the "hypervisor call" interface which is used to
21// 21 * drive the hypervisor from the OS.
22// This file contains the "hypervisor call" interface which is used to 22 */
23// drive the hypervisor from the OS.
24//
25//=====================================================================================
26#ifndef _HVCALLCFG_H 23#ifndef _HVCALLCFG_H
27#define _HVCALLCFG_H 24#define _HVCALLCFG_H
28 25
29//-------------------------------------------------------------------
30// Standard Includes
31//-------------------------------------------------------------------
32#include <asm/iSeries/HvCallSc.h> 26#include <asm/iSeries/HvCallSc.h>
33#include <asm/iSeries/HvTypes.h> 27#include <asm/iSeries/HvTypes.h>
34 28
35//------------------------------------------------------------------------------------- 29enum HvCallCfg_ReqQual {
36// Constants
37//-------------------------------------------------------------------------------------
38
39enum HvCallCfg_ReqQual
40{
41 HvCallCfg_Cur = 0, 30 HvCallCfg_Cur = 0,
42 HvCallCfg_Init = 1, 31 HvCallCfg_Init = 1,
43 HvCallCfg_Max = 2, 32 HvCallCfg_Max = 2,
@@ -49,7 +38,7 @@ enum HvCallCfg_ReqQual
49#define HvCallCfgGetLpVrmIndex HvCallCfg + 2 38#define HvCallCfgGetLpVrmIndex HvCallCfg + 2
50#define HvCallCfgGetLpMinSupportedPlicVrmIndex HvCallCfg + 3 39#define HvCallCfgGetLpMinSupportedPlicVrmIndex HvCallCfg + 3
51#define HvCallCfgGetLpMinCompatablePlicVrmIndex HvCallCfg + 4 40#define HvCallCfgGetLpMinCompatablePlicVrmIndex HvCallCfg + 4
52#define HvCallCfgGetLpVrmName HvCallCfg + 5 41#define HvCallCfgGetLpVrmName HvCallCfg + 5
53#define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6 42#define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6
54#define HvCallCfgGetPhysicalProcessors HvCallCfg + 7 43#define HvCallCfgGetPhysicalProcessors HvCallCfg + 7
55#define HvCallCfgGetSystemMsChunks HvCallCfg + 8 44#define HvCallCfgGetSystemMsChunks HvCallCfg + 8
@@ -76,108 +65,113 @@ enum HvCallCfg_ReqQual
76#define HvCallCfgSetMinRuntimeMsChunks HvCallCfg + 29 65#define HvCallCfgSetMinRuntimeMsChunks HvCallCfg + 29
77#define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30 66#define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30
78#define HvCallCfgGetLpExecutionMode HvCallCfg + 31 67#define HvCallCfgGetLpExecutionMode HvCallCfg + 31
79#define HvCallCfgGetHostingLpIndex HvCallCfg + 32 68#define HvCallCfgGetHostingLpIndex HvCallCfg + 32
80 69
81//====================================================================
82static inline HvLpIndex HvCallCfg_getLps(void) 70static inline HvLpIndex HvCallCfg_getLps(void)
83{ 71{
84 HvLpIndex retVal = HvCall0(HvCallCfgGetLps); 72 HvLpIndex retVal = HvCall0(HvCallCfgGetLps);
85 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 73 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
86 return retVal; 74 return retVal;
87} 75}
88//==================================================================== 76
89static inline int HvCallCfg_isBusDedicated(u64 busIndex) 77static inline int HvCallCfg_isBusDedicated(u64 busIndex)
90{ 78{
91 int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex); 79 int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex);
92 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 80 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
93 return retVal; 81 return retVal;
94} 82}
95//==================================================================== 83
96static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex) 84static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex)
97{ 85{
98 HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex); 86 HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex);
99 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 87 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
100 return retVal; 88 return retVal;
101} 89}
102//==================================================================== 90
103static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex) 91static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex)
104{ 92{
105 HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex); 93 HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex);
106 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 94 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
107 return retVal; 95 return retVal;
108} 96}
109//==================================================================== 97
110static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void) 98static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void)
111{ 99{
112 HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap); 100 HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap);
113 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 101 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
114 return retVal; 102 return retVal;
115} 103}
116//==================================================================== 104
117static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(HvLpIndex lp) 105static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(
106 HvLpIndex lp)
118{ 107{
119 // This is a new function in V5R1 so calls to this on older 108 /*
120 // hypervisors will return -1 109 * This is a new function in V5R1 so calls to this on older
110 * hypervisors will return -1
111 */
121 u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp); 112 u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
122 if(retVal == -1) 113 if (retVal == -1)
123 retVal = 0; 114 retVal = 0;
124 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 115 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
125 return retVal; 116 return retVal;
126} 117}
127//=================================================================== 118
128static inline u64 HvCallCfg_getSystemMsChunks(void) 119static inline u64 HvCallCfg_getSystemMsChunks(void)
129{ 120{
130 u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks); 121 u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks);
131 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 122 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
132 return retVal; 123 return retVal;
133} 124}
134//=================================================================== 125
135static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp,enum HvCallCfg_ReqQual qual) 126static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp,
127 enum HvCallCfg_ReqQual qual)
136{ 128{
137 u64 retVal = HvCall2(HvCallCfgGetMsChunks,lp,qual); 129 u64 retVal = HvCall2(HvCallCfgGetMsChunks,lp,qual);
138 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 130 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
139 return retVal; 131 return retVal;
140} 132}
141//=================================================================== 133
142static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp) 134static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp)
143{ 135{
144 // NOTE: This function was added in v5r1 so older hypervisors will return a -1 value 136 /*
145 u64 retVal = HvCall1(HvCallCfgGetMinRuntimeMsChunks,lp); 137 * NOTE: This function was added in v5r1 so older hypervisors
146 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 138 * will return a -1 value
147 return retVal; 139 */
140 return HvCall1(HvCallCfgGetMinRuntimeMsChunks, lp);
148} 141}
149//=================================================================== 142
150static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks) 143static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks)
151{ 144{
152 u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks); 145 u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks);
153 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 146 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
154 return retVal; 147 return retVal;
155} 148}
156//=================================================================== 149
157static inline u64 HvCallCfg_getSystemPhysicalProcessors(void) 150static inline u64 HvCallCfg_getSystemPhysicalProcessors(void)
158{ 151{
159 u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors); 152 u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors);
160 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 153 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
161 return retVal; 154 return retVal;
162} 155}
163//=================================================================== 156
164static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp,enum HvCallCfg_ReqQual qual) 157static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp,
158 enum HvCallCfg_ReqQual qual)
165{ 159{
166 u64 retVal = HvCall2(HvCallCfgGetPhysicalProcessors,lp,qual); 160 u64 retVal = HvCall2(HvCallCfgGetPhysicalProcessors,lp,qual);
167 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 161 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
168 return retVal; 162 return retVal;
169} 163}
170//=================================================================== 164
171static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp, 165static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
172 u16 hvLogicalProcIndex) 166 u16 hvLogicalProcIndex)
173{ 167{
174 u64 retVal = HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc,lp,hvLogicalProcIndex); 168 u64 retVal = HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc,lp,hvLogicalProcIndex);
175 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 169 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
176 return retVal; 170 return retVal;
177 171
178} 172}
179//================================================================== 173
180static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) 174static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
181{ 175{
182 HvLpSharedPoolIndex retVal = 176 HvLpSharedPoolIndex retVal =
183 HvCall1(HvCallCfgGetSharedPoolIndex,lp); 177 HvCall1(HvCallCfgGetSharedPoolIndex,lp);
@@ -185,29 +179,29 @@ static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
185 return retVal; 179 return retVal;
186 180
187} 181}
188//================================================================== 182
189static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp,enum HvCallCfg_ReqQual qual) 183static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp,
184 enum HvCallCfg_ReqQual qual)
190{ 185{
191 u64 retVal = HvCall2(HvCallCfgGetSharedProcUnits,lp,qual); 186 u64 retVal = HvCall2(HvCallCfgGetSharedProcUnits,lp,qual);
192 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 187 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
193 return retVal; 188 return retVal;
194 189
195} 190}
196//================================================================== 191
197static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) 192static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
198{ 193{
199 u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI); 194 u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI);
200 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 195 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
201 return retVal; 196 return retVal;
202 197
203} 198}
204//================================================================== 199
205static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) 200static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp)
206{ 201{
207 u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp); 202 u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp);
208 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 203 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
209 return retVal; 204 return retVal;
210
211} 205}
212 206
213#endif /* _HVCALLCFG_H */ 207#endif /* _HVCALLCFG_H */