diff options
Diffstat (limited to 'include/asm-ppc64/iSeries/HvLpConfig.h')
-rw-r--r-- | include/asm-ppc64/iSeries/HvLpConfig.h | 291 |
1 files changed, 157 insertions, 134 deletions
diff --git a/include/asm-ppc64/iSeries/HvLpConfig.h b/include/asm-ppc64/iSeries/HvLpConfig.h index bdbd70f42c9d..47311cc952d9 100644 --- a/include/asm-ppc64/iSeries/HvLpConfig.h +++ b/include/asm-ppc64/iSeries/HvLpConfig.h | |||
@@ -1,17 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | * HvLpConfig.h | 2 | * HvLpConfig.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 |
@@ -19,262 +19,285 @@ | |||
19 | #ifndef _HVLPCONFIG_H | 19 | #ifndef _HVLPCONFIG_H |
20 | #define _HVLPCONFIG_H | 20 | #define _HVLPCONFIG_H |
21 | 21 | ||
22 | //=========================================================================== | 22 | /* |
23 | // | 23 | * This file contains the interface to the LPAR configuration data |
24 | // This file contains the interface to the LPAR configuration data | 24 | * to determine which resources should be allocated to each partition. |
25 | // to determine which resources should be allocated to each partition. | 25 | */ |
26 | // | ||
27 | //=========================================================================== | ||
28 | 26 | ||
29 | #include <asm/iSeries/HvCallCfg.h> | 27 | #include <asm/iSeries/HvCallCfg.h> |
30 | #include <asm/iSeries/HvTypes.h> | 28 | #include <asm/iSeries/HvTypes.h> |
31 | #include <asm/iSeries/ItLpNaca.h> | 29 | #include <asm/iSeries/ItLpNaca.h> |
32 | #include <asm/iSeries/LparData.h> | 30 | #include <asm/iSeries/LparData.h> |
33 | 31 | ||
34 | //------------------------------------------------------------------- | ||
35 | // Constants | ||
36 | //------------------------------------------------------------------- | ||
37 | |||
38 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); | 32 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); |
39 | 33 | ||
40 | //=================================================================== | ||
41 | static inline HvLpIndex HvLpConfig_getLpIndex(void) | 34 | static inline HvLpIndex HvLpConfig_getLpIndex(void) |
42 | { | 35 | { |
43 | return itLpNaca.xLpIndex; | 36 | return itLpNaca.xLpIndex; |
44 | } | 37 | } |
45 | //=================================================================== | 38 | |
46 | static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) | 39 | static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) |
47 | { | 40 | { |
48 | return itLpNaca.xPrimaryLpIndex; | 41 | return itLpNaca.xPrimaryLpIndex; |
49 | } | 42 | } |
50 | //================================================================= | 43 | |
51 | static inline HvLpIndex HvLpConfig_getLps(void) | 44 | static inline HvLpIndex HvLpConfig_getLps(void) |
52 | { | 45 | { |
53 | return HvCallCfg_getLps(); | 46 | return HvCallCfg_getLps(); |
54 | } | 47 | } |
55 | //================================================================= | 48 | |
56 | static inline HvLpIndexMap HvLpConfig_getActiveLpMap(void) | 49 | static inline HvLpIndexMap HvLpConfig_getActiveLpMap(void) |
57 | { | 50 | { |
58 | return HvCallCfg_getActiveLpMap(); | 51 | return HvCallCfg_getActiveLpMap(); |
59 | } | 52 | } |
60 | //================================================================= | 53 | |
61 | static inline u64 HvLpConfig_getSystemMsMegs(void) | 54 | static inline u64 HvLpConfig_getSystemMsMegs(void) |
62 | { | 55 | { |
63 | return HvCallCfg_getSystemMsChunks() / HVCHUNKSPERMEG; | 56 | return HvCallCfg_getSystemMsChunks() / HVCHUNKSPERMEG; |
64 | } | 57 | } |
65 | //================================================================= | 58 | |
66 | static inline u64 HvLpConfig_getSystemMsChunks(void) | 59 | static inline u64 HvLpConfig_getSystemMsChunks(void) |
67 | { | 60 | { |
68 | return HvCallCfg_getSystemMsChunks(); | 61 | return HvCallCfg_getSystemMsChunks(); |
69 | } | 62 | } |
70 | //================================================================= | 63 | |
71 | static inline u64 HvLpConfig_getSystemMsPages(void) | 64 | static inline u64 HvLpConfig_getSystemMsPages(void) |
72 | { | 65 | { |
73 | return HvCallCfg_getSystemMsChunks() * HVPAGESPERCHUNK; | 66 | return HvCallCfg_getSystemMsChunks() * HVPAGESPERCHUNK; |
74 | } | 67 | } |
75 | //================================================================ | 68 | |
76 | static inline u64 HvLpConfig_getMsMegs(void) | 69 | static inline u64 HvLpConfig_getMsMegs(void) |
77 | { | 70 | { |
78 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur) / HVCHUNKSPERMEG; | 71 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur) |
72 | / HVCHUNKSPERMEG; | ||
79 | } | 73 | } |
80 | //================================================================ | 74 | |
81 | static inline u64 HvLpConfig_getMsChunks(void) | 75 | static inline u64 HvLpConfig_getMsChunks(void) |
82 | { | 76 | { |
83 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur); | 77 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur); |
84 | } | 78 | } |
85 | //================================================================ | 79 | |
86 | static inline u64 HvLpConfig_getMsPages(void) | 80 | static inline u64 HvLpConfig_getMsPages(void) |
87 | { | 81 | { |
88 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Cur) * HVPAGESPERCHUNK; | 82 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur) |
83 | * HVPAGESPERCHUNK; | ||
89 | } | 84 | } |
90 | //================================================================ | 85 | |
91 | static inline u64 HvLpConfig_getMinMsMegs(void) | 86 | static inline u64 HvLpConfig_getMinMsMegs(void) |
92 | { | 87 | { |
93 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min) / HVCHUNKSPERMEG; | 88 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min) |
89 | / HVCHUNKSPERMEG; | ||
94 | } | 90 | } |
95 | //================================================================ | 91 | |
96 | static inline u64 HvLpConfig_getMinMsChunks(void) | 92 | static inline u64 HvLpConfig_getMinMsChunks(void) |
97 | { | 93 | { |
98 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min); | 94 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min); |
99 | } | 95 | } |
100 | //================================================================ | 96 | |
101 | static inline u64 HvLpConfig_getMinMsPages(void) | 97 | static inline u64 HvLpConfig_getMinMsPages(void) |
102 | { | 98 | { |
103 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Min) * HVPAGESPERCHUNK; | 99 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min) |
100 | * HVPAGESPERCHUNK; | ||
104 | } | 101 | } |
105 | //================================================================ | 102 | |
106 | static inline u64 HvLpConfig_getMinRuntimeMsMegs(void) | 103 | static inline u64 HvLpConfig_getMinRuntimeMsMegs(void) |
107 | { | 104 | { |
108 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) / HVCHUNKSPERMEG; | 105 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) |
106 | / HVCHUNKSPERMEG; | ||
109 | } | 107 | } |
110 | //=============================================================== | 108 | |
111 | static inline u64 HvLpConfig_getMinRuntimeMsChunks(void) | 109 | static inline u64 HvLpConfig_getMinRuntimeMsChunks(void) |
112 | { | 110 | { |
113 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()); | 111 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()); |
114 | } | 112 | } |
115 | //=============================================================== | 113 | |
116 | static inline u64 HvLpConfig_getMinRuntimeMsPages(void) | 114 | static inline u64 HvLpConfig_getMinRuntimeMsPages(void) |
117 | { | 115 | { |
118 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) * HVPAGESPERCHUNK; | 116 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) |
117 | * HVPAGESPERCHUNK; | ||
119 | } | 118 | } |
120 | //=============================================================== | 119 | |
121 | static inline u64 HvLpConfig_getMaxMsMegs(void) | 120 | static inline u64 HvLpConfig_getMaxMsMegs(void) |
122 | { | 121 | { |
123 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max) / HVCHUNKSPERMEG; | 122 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max) |
123 | / HVCHUNKSPERMEG; | ||
124 | } | 124 | } |
125 | //=============================================================== | 125 | |
126 | static inline u64 HvLpConfig_getMaxMsChunks(void) | 126 | static inline u64 HvLpConfig_getMaxMsChunks(void) |
127 | { | 127 | { |
128 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max); | 128 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max); |
129 | } | 129 | } |
130 | //=============================================================== | 130 | |
131 | static inline u64 HvLpConfig_getMaxMsPages(void) | 131 | static inline u64 HvLpConfig_getMaxMsPages(void) |
132 | { | 132 | { |
133 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Max) * HVPAGESPERCHUNK; | 133 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max) |
134 | * HVPAGESPERCHUNK; | ||
134 | } | 135 | } |
135 | //=============================================================== | 136 | |
136 | static inline u64 HvLpConfig_getInitMsMegs(void) | 137 | static inline u64 HvLpConfig_getInitMsMegs(void) |
137 | { | 138 | { |
138 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init) / HVCHUNKSPERMEG; | 139 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init) |
140 | / HVCHUNKSPERMEG; | ||
139 | } | 141 | } |
140 | //=============================================================== | 142 | |
141 | static inline u64 HvLpConfig_getInitMsChunks(void) | 143 | static inline u64 HvLpConfig_getInitMsChunks(void) |
142 | { | 144 | { |
143 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init); | 145 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init); |
144 | } | 146 | } |
145 | //=============================================================== | 147 | |
146 | static inline u64 HvLpConfig_getInitMsPages(void) | 148 | static inline u64 HvLpConfig_getInitMsPages(void) |
147 | { return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(),HvCallCfg_Init) * HVPAGESPERCHUNK; | 149 | { |
150 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init) | ||
151 | * HVPAGESPERCHUNK; | ||
148 | } | 152 | } |
149 | //=============================================================== | 153 | |
150 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) | 154 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) |
151 | { | 155 | { |
152 | return HvCallCfg_getSystemPhysicalProcessors(); | 156 | return HvCallCfg_getSystemPhysicalProcessors(); |
153 | } | 157 | } |
154 | //=============================================================== | 158 | |
155 | static inline u64 HvLpConfig_getSystemLogicalProcessors(void) | 159 | static inline u64 HvLpConfig_getSystemLogicalProcessors(void) |
156 | { | 160 | { |
157 | return HvCallCfg_getSystemPhysicalProcessors() * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | 161 | return HvCallCfg_getSystemPhysicalProcessors() |
162 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
158 | } | 163 | } |
159 | //=============================================================== | 164 | |
160 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) | 165 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) |
161 | { | 166 | { |
162 | return HvCallCfg_getNumProcsInSharedPool(sPI); | 167 | return HvCallCfg_getNumProcsInSharedPool(sPI); |
163 | } | 168 | } |
164 | //=============================================================== | 169 | |
165 | static inline u64 HvLpConfig_getPhysicalProcessors(void) | 170 | static inline u64 HvLpConfig_getPhysicalProcessors(void) |
166 | { | 171 | { |
167 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Cur); | 172 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
173 | HvCallCfg_Cur); | ||
168 | } | 174 | } |
169 | //=============================================================== | 175 | |
170 | static inline u64 HvLpConfig_getLogicalProcessors(void) | 176 | static inline u64 HvLpConfig_getLogicalProcessors(void) |
171 | { | 177 | { |
172 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Cur) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | 178 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
179 | HvCallCfg_Cur) | ||
180 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
173 | } | 181 | } |
174 | //=============================================================== | 182 | |
175 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) | 183 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) |
176 | { | 184 | { |
177 | return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex()); | 185 | return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex()); |
178 | } | 186 | } |
179 | //=============================================================== | 187 | |
180 | static inline u64 HvLpConfig_getSharedProcUnits(void) | 188 | static inline u64 HvLpConfig_getSharedProcUnits(void) |
181 | { | 189 | { |
182 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Cur); | 190 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), |
191 | HvCallCfg_Cur); | ||
183 | } | 192 | } |
184 | //=============================================================== | 193 | |
185 | static inline u64 HvLpConfig_getMinSharedProcUnits(void) | 194 | static inline u64 HvLpConfig_getMinSharedProcUnits(void) |
186 | { | 195 | { |
187 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Min); | 196 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), |
197 | HvCallCfg_Min); | ||
188 | } | 198 | } |
189 | //=============================================================== | 199 | |
190 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) | 200 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) |
191 | { | 201 | { |
192 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),HvCallCfg_Max); | 202 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), |
203 | HvCallCfg_Max); | ||
193 | } | 204 | } |
194 | //=============================================================== | 205 | |
195 | static inline u64 HvLpConfig_getMinPhysicalProcessors(void) | 206 | static inline u64 HvLpConfig_getMinPhysicalProcessors(void) |
196 | { | 207 | { |
197 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Min); | 208 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
209 | HvCallCfg_Min); | ||
198 | } | 210 | } |
199 | //=============================================================== | 211 | |
200 | static inline u64 HvLpConfig_getMinLogicalProcessors(void) | 212 | static inline u64 HvLpConfig_getMinLogicalProcessors(void) |
201 | { | 213 | { |
202 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Min) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | 214 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
215 | HvCallCfg_Min) | ||
216 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
203 | } | 217 | } |
204 | //=============================================================== | 218 | |
205 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) | 219 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) |
206 | { | 220 | { |
207 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Max); | 221 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
222 | HvCallCfg_Max); | ||
208 | } | 223 | } |
209 | //=============================================================== | 224 | |
210 | static inline u64 HvLpConfig_getMaxLogicalProcessors(void) | 225 | static inline u64 HvLpConfig_getMaxLogicalProcessors(void) |
211 | { | 226 | { |
212 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Max) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | 227 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
228 | HvCallCfg_Max) | ||
229 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
213 | } | 230 | } |
214 | //=============================================================== | 231 | |
215 | static inline u64 HvLpConfig_getInitPhysicalProcessors(void) | 232 | static inline u64 HvLpConfig_getInitPhysicalProcessors(void) |
216 | { | 233 | { |
217 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Init); | 234 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
235 | HvCallCfg_Init); | ||
218 | } | 236 | } |
219 | //=============================================================== | 237 | |
220 | static inline u64 HvLpConfig_getInitLogicalProcessors(void) | 238 | static inline u64 HvLpConfig_getInitLogicalProcessors(void) |
221 | { | 239 | { |
222 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),HvCallCfg_Init) * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | 240 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
241 | HvCallCfg_Init) | ||
242 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
223 | } | 243 | } |
224 | //================================================================ | 244 | |
225 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) | 245 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) |
226 | { | 246 | { |
227 | return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline()); | 247 | return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline()); |
228 | } | 248 | } |
229 | //=============================================================== | 249 | |
230 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp(HvLpIndex lp) | 250 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp( |
251 | HvLpIndex lp) | ||
231 | { | 252 | { |
232 | return HvCallCfg_getVirtualLanIndexMap(lp); | 253 | return HvCallCfg_getVirtualLanIndexMap(lp); |
233 | } | 254 | } |
234 | //================================================================ | 255 | |
235 | static inline HvLpIndex HvLpConfig_getBusOwner(HvBusNumber busNumber) | 256 | static inline HvLpIndex HvLpConfig_getBusOwner(HvBusNumber busNumber) |
236 | { | 257 | { |
237 | return HvCallCfg_getBusOwner(busNumber); | 258 | return HvCallCfg_getBusOwner(busNumber); |
238 | } | 259 | } |
239 | //=============================================================== | 260 | |
240 | static inline int HvLpConfig_isBusDedicated(HvBusNumber busNumber) | 261 | static inline int HvLpConfig_isBusDedicated(HvBusNumber busNumber) |
241 | { | 262 | { |
242 | return HvCallCfg_isBusDedicated(busNumber); | 263 | return HvCallCfg_isBusDedicated(busNumber); |
243 | } | 264 | } |
244 | //================================================================ | 265 | |
245 | static inline HvLpIndexMap HvLpConfig_getBusAllocation(HvBusNumber busNumber) | 266 | static inline HvLpIndexMap HvLpConfig_getBusAllocation(HvBusNumber busNumber) |
246 | { | 267 | { |
247 | return HvCallCfg_getBusAllocation(busNumber); | 268 | return HvCallCfg_getBusAllocation(busNumber); |
248 | } | 269 | } |
249 | //================================================================ | 270 | |
250 | // returns the absolute real address of the load area | 271 | /* returns the absolute real address of the load area */ |
251 | static inline u64 HvLpConfig_getLoadAddress(void) | 272 | static inline u64 HvLpConfig_getLoadAddress(void) |
252 | { | 273 | { |
253 | return itLpNaca.xLoadAreaAddr & 0x7fffffffffffffff; | 274 | return itLpNaca.xLoadAreaAddr & 0x7fffffffffffffff; |
254 | } | 275 | } |
255 | //================================================================ | 276 | |
256 | static inline u64 HvLpConfig_getLoadPages(void) | 277 | static inline u64 HvLpConfig_getLoadPages(void) |
257 | { | 278 | { |
258 | return itLpNaca.xLoadAreaChunks * HVPAGESPERCHUNK; | 279 | return itLpNaca.xLoadAreaChunks * HVPAGESPERCHUNK; |
259 | } | 280 | } |
260 | //================================================================ | 281 | |
261 | static inline int HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber) | 282 | static inline int HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber) |
262 | { | 283 | { |
263 | HvLpIndex busOwner = HvLpConfig_getBusOwner(busNumber); | 284 | HvLpIndex busOwner = HvLpConfig_getBusOwner(busNumber); |
264 | return (busOwner == HvLpConfig_getLpIndex()); | 285 | return (busOwner == HvLpConfig_getLpIndex()); |
265 | } | 286 | } |
266 | //================================================================ | 287 | |
267 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, HvLpIndex lp2) | 288 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, |
289 | HvLpIndex lp2) | ||
268 | { | 290 | { |
269 | HvLpVirtualLanIndexMap virtualLanIndexMap1 = HvCallCfg_getVirtualLanIndexMap( lp1 ); | 291 | HvLpVirtualLanIndexMap virtualLanIndexMap1 = |
270 | HvLpVirtualLanIndexMap virtualLanIndexMap2 = HvCallCfg_getVirtualLanIndexMap( lp2 ); | 292 | HvCallCfg_getVirtualLanIndexMap(lp1); |
293 | HvLpVirtualLanIndexMap virtualLanIndexMap2 = | ||
294 | HvCallCfg_getVirtualLanIndexMap(lp2); | ||
271 | return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0); | 295 | return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0); |
272 | } | 296 | } |
273 | //================================================================ | 297 | |
274 | static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp) | 298 | static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp) |
275 | { | 299 | { |
276 | return HvCallCfg_getHostingLpIndex(lp); | 300 | return HvCallCfg_getHostingLpIndex(lp); |
277 | } | 301 | } |
278 | //================================================================ | ||
279 | 302 | ||
280 | #endif /* _HVLPCONFIG_H */ | 303 | #endif /* _HVLPCONFIG_H */ |