diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-06-21 20:15:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 21:46:28 -0400 |
commit | dd61ce922770b299081c3e729ea65758ed676034 (patch) | |
tree | bf864d4cbb56327011ed9b8d369791ed0a680e31 /include | |
parent | 0bc0ffd5f0854b9143606684fb925f4290ae13e7 (diff) |
[PATCH] ppc64 iSeries: eliminate some unused inline functions
This patch removes from the iSeries header files a large number of inline
functions that are not used. It also changes the only caller of a HvCallCfg
function that is outside HvLpConfig.h to its equivalent HvLpConfig function
and no longer includes HvCallCfg.h where it is not needed.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-ppc64/iSeries/HvCallCfg.h | 53 | ||||
-rw-r--r-- | include/asm-ppc64/iSeries/HvLpConfig.h | 188 |
2 files changed, 2 insertions, 239 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallCfg.h b/include/asm-ppc64/iSeries/HvCallCfg.h index aa491c3ad0a2..ddf2bb59d73c 100644 --- a/include/asm-ppc64/iSeries/HvCallCfg.h +++ b/include/asm-ppc64/iSeries/HvCallCfg.h | |||
@@ -67,31 +67,11 @@ enum HvCallCfg_ReqQual { | |||
67 | #define HvCallCfgGetLpExecutionMode HvCallCfg + 31 | 67 | #define HvCallCfgGetLpExecutionMode HvCallCfg + 31 |
68 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 | 68 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 |
69 | 69 | ||
70 | static inline HvLpIndex HvCallCfg_getLps(void) | ||
71 | { | ||
72 | return HvCall0(HvCallCfgGetLps); | ||
73 | } | ||
74 | |||
75 | static inline int HvCallCfg_isBusDedicated(u64 busIndex) | ||
76 | { | ||
77 | return HvCall1(HvCallCfgIsBusDedicated, busIndex); | ||
78 | } | ||
79 | |||
80 | static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex) | 70 | static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex) |
81 | { | 71 | { |
82 | return HvCall1(HvCallCfgGetBusOwner, busIndex); | 72 | return HvCall1(HvCallCfgGetBusOwner, busIndex); |
83 | } | 73 | } |
84 | 74 | ||
85 | static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex) | ||
86 | { | ||
87 | return HvCall1(HvCallCfgGetBusAllocation, busIndex); | ||
88 | } | ||
89 | |||
90 | static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void) | ||
91 | { | ||
92 | return HvCall0(HvCallCfgGetActiveLpMap); | ||
93 | } | ||
94 | |||
95 | static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap( | 75 | static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap( |
96 | HvLpIndex lp) | 76 | HvLpIndex lp) |
97 | { | 77 | { |
@@ -105,31 +85,12 @@ static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap( | |||
105 | return retVal; | 85 | return retVal; |
106 | } | 86 | } |
107 | 87 | ||
108 | static inline u64 HvCallCfg_getSystemMsChunks(void) | ||
109 | { | ||
110 | return HvCall0(HvCallCfgGetSystemMsChunks); | ||
111 | } | ||
112 | |||
113 | static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp, | 88 | static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp, |
114 | enum HvCallCfg_ReqQual qual) | 89 | enum HvCallCfg_ReqQual qual) |
115 | { | 90 | { |
116 | return HvCall2(HvCallCfgGetMsChunks, lp, qual); | 91 | return HvCall2(HvCallCfgGetMsChunks, lp, qual); |
117 | } | 92 | } |
118 | 93 | ||
119 | static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp) | ||
120 | { | ||
121 | /* | ||
122 | * NOTE: This function was added in v5r1 so older hypervisors | ||
123 | * will return a -1 value | ||
124 | */ | ||
125 | return HvCall1(HvCallCfgGetMinRuntimeMsChunks, lp); | ||
126 | } | ||
127 | |||
128 | static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks) | ||
129 | { | ||
130 | return HvCall1(HvCallCfgSetMinRuntimeMsChunks, chunks); | ||
131 | } | ||
132 | |||
133 | static inline u64 HvCallCfg_getSystemPhysicalProcessors(void) | 94 | static inline u64 HvCallCfg_getSystemPhysicalProcessors(void) |
134 | { | 95 | { |
135 | return HvCall0(HvCallCfgGetSystemPhysicalProcessors); | 96 | return HvCall0(HvCallCfgGetSystemPhysicalProcessors); |
@@ -141,14 +102,6 @@ static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp, | |||
141 | return HvCall2(HvCallCfgGetPhysicalProcessors, lp, qual); | 102 | return HvCall2(HvCallCfgGetPhysicalProcessors, lp, qual); |
142 | } | 103 | } |
143 | 104 | ||
144 | static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp, | ||
145 | u16 hvLogicalProcIndex) | ||
146 | { | ||
147 | return HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc, lp, | ||
148 | hvLogicalProcIndex); | ||
149 | |||
150 | } | ||
151 | |||
152 | static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) | 105 | static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) |
153 | { | 106 | { |
154 | return HvCall1(HvCallCfgGetSharedPoolIndex, lp); | 107 | return HvCall1(HvCallCfgGetSharedPoolIndex, lp); |
@@ -164,15 +117,13 @@ static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp, | |||
164 | 117 | ||
165 | static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) | 118 | static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) |
166 | { | 119 | { |
167 | u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI); | 120 | return (u16)HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI); |
168 | return retVal; | ||
169 | 121 | ||
170 | } | 122 | } |
171 | 123 | ||
172 | static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) | 124 | static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) |
173 | { | 125 | { |
174 | u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex, lp); | 126 | return HvCall1(HvCallCfgGetHostingLpIndex, lp); |
175 | return retVal; | ||
176 | } | 127 | } |
177 | 128 | ||
178 | #endif /* _HVCALLCFG_H */ | 129 | #endif /* _HVCALLCFG_H */ |
diff --git a/include/asm-ppc64/iSeries/HvLpConfig.h b/include/asm-ppc64/iSeries/HvLpConfig.h index 9411b5a04d00..78d68281cc8b 100644 --- a/include/asm-ppc64/iSeries/HvLpConfig.h +++ b/include/asm-ppc64/iSeries/HvLpConfig.h | |||
@@ -40,127 +40,16 @@ static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) | |||
40 | return itLpNaca.xPrimaryLpIndex; | 40 | return itLpNaca.xPrimaryLpIndex; |
41 | } | 41 | } |
42 | 42 | ||
43 | static inline HvLpIndex HvLpConfig_getLps(void) | ||
44 | { | ||
45 | return HvCallCfg_getLps(); | ||
46 | } | ||
47 | |||
48 | static inline HvLpIndexMap HvLpConfig_getActiveLpMap(void) | ||
49 | { | ||
50 | return HvCallCfg_getActiveLpMap(); | ||
51 | } | ||
52 | |||
53 | static inline u64 HvLpConfig_getSystemMsMegs(void) | ||
54 | { | ||
55 | return HvCallCfg_getSystemMsChunks() / HVCHUNKSPERMEG; | ||
56 | } | ||
57 | |||
58 | static inline u64 HvLpConfig_getSystemMsChunks(void) | ||
59 | { | ||
60 | return HvCallCfg_getSystemMsChunks(); | ||
61 | } | ||
62 | |||
63 | static inline u64 HvLpConfig_getSystemMsPages(void) | ||
64 | { | ||
65 | return HvCallCfg_getSystemMsChunks() * HVPAGESPERCHUNK; | ||
66 | } | ||
67 | |||
68 | static inline u64 HvLpConfig_getMsMegs(void) | ||
69 | { | ||
70 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur) | ||
71 | / HVCHUNKSPERMEG; | ||
72 | } | ||
73 | |||
74 | static inline u64 HvLpConfig_getMsChunks(void) | 43 | static inline u64 HvLpConfig_getMsChunks(void) |
75 | { | 44 | { |
76 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur); | 45 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur); |
77 | } | 46 | } |
78 | 47 | ||
79 | static inline u64 HvLpConfig_getMsPages(void) | ||
80 | { | ||
81 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur) | ||
82 | * HVPAGESPERCHUNK; | ||
83 | } | ||
84 | |||
85 | static inline u64 HvLpConfig_getMinMsMegs(void) | ||
86 | { | ||
87 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min) | ||
88 | / HVCHUNKSPERMEG; | ||
89 | } | ||
90 | |||
91 | static inline u64 HvLpConfig_getMinMsChunks(void) | ||
92 | { | ||
93 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min); | ||
94 | } | ||
95 | |||
96 | static inline u64 HvLpConfig_getMinMsPages(void) | ||
97 | { | ||
98 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Min) | ||
99 | * HVPAGESPERCHUNK; | ||
100 | } | ||
101 | |||
102 | static inline u64 HvLpConfig_getMinRuntimeMsMegs(void) | ||
103 | { | ||
104 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) | ||
105 | / HVCHUNKSPERMEG; | ||
106 | } | ||
107 | |||
108 | static inline u64 HvLpConfig_getMinRuntimeMsChunks(void) | ||
109 | { | ||
110 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()); | ||
111 | } | ||
112 | |||
113 | static inline u64 HvLpConfig_getMinRuntimeMsPages(void) | ||
114 | { | ||
115 | return HvCallCfg_getMinRuntimeMsChunks(HvLpConfig_getLpIndex()) | ||
116 | * HVPAGESPERCHUNK; | ||
117 | } | ||
118 | |||
119 | static inline u64 HvLpConfig_getMaxMsMegs(void) | ||
120 | { | ||
121 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max) | ||
122 | / HVCHUNKSPERMEG; | ||
123 | } | ||
124 | |||
125 | static inline u64 HvLpConfig_getMaxMsChunks(void) | ||
126 | { | ||
127 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max); | ||
128 | } | ||
129 | |||
130 | static inline u64 HvLpConfig_getMaxMsPages(void) | ||
131 | { | ||
132 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Max) | ||
133 | * HVPAGESPERCHUNK; | ||
134 | } | ||
135 | |||
136 | static inline u64 HvLpConfig_getInitMsMegs(void) | ||
137 | { | ||
138 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init) | ||
139 | / HVCHUNKSPERMEG; | ||
140 | } | ||
141 | |||
142 | static inline u64 HvLpConfig_getInitMsChunks(void) | ||
143 | { | ||
144 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init); | ||
145 | } | ||
146 | |||
147 | static inline u64 HvLpConfig_getInitMsPages(void) | ||
148 | { | ||
149 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Init) | ||
150 | * HVPAGESPERCHUNK; | ||
151 | } | ||
152 | |||
153 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) | 48 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) |
154 | { | 49 | { |
155 | return HvCallCfg_getSystemPhysicalProcessors(); | 50 | return HvCallCfg_getSystemPhysicalProcessors(); |
156 | } | 51 | } |
157 | 52 | ||
158 | static inline u64 HvLpConfig_getSystemLogicalProcessors(void) | ||
159 | { | ||
160 | return HvCallCfg_getSystemPhysicalProcessors() | ||
161 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
162 | } | ||
163 | |||
164 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) | 53 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) |
165 | { | 54 | { |
166 | return HvCallCfg_getNumProcsInSharedPool(sPI); | 55 | return HvCallCfg_getNumProcsInSharedPool(sPI); |
@@ -172,13 +61,6 @@ static inline u64 HvLpConfig_getPhysicalProcessors(void) | |||
172 | HvCallCfg_Cur); | 61 | HvCallCfg_Cur); |
173 | } | 62 | } |
174 | 63 | ||
175 | static inline u64 HvLpConfig_getLogicalProcessors(void) | ||
176 | { | ||
177 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | ||
178 | HvCallCfg_Cur) | ||
179 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
180 | } | ||
181 | |||
182 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) | 64 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) |
183 | { | 65 | { |
184 | return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex()); | 66 | return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex()); |
@@ -190,57 +72,18 @@ static inline u64 HvLpConfig_getSharedProcUnits(void) | |||
190 | HvCallCfg_Cur); | 72 | HvCallCfg_Cur); |
191 | } | 73 | } |
192 | 74 | ||
193 | static inline u64 HvLpConfig_getMinSharedProcUnits(void) | ||
194 | { | ||
195 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), | ||
196 | HvCallCfg_Min); | ||
197 | } | ||
198 | |||
199 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) | 75 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) |
200 | { | 76 | { |
201 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), | 77 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), |
202 | HvCallCfg_Max); | 78 | HvCallCfg_Max); |
203 | } | 79 | } |
204 | 80 | ||
205 | static inline u64 HvLpConfig_getMinPhysicalProcessors(void) | ||
206 | { | ||
207 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | ||
208 | HvCallCfg_Min); | ||
209 | } | ||
210 | |||
211 | static inline u64 HvLpConfig_getMinLogicalProcessors(void) | ||
212 | { | ||
213 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | ||
214 | HvCallCfg_Min) | ||
215 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
216 | } | ||
217 | |||
218 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) | 81 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) |
219 | { | 82 | { |
220 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | 83 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), |
221 | HvCallCfg_Max); | 84 | HvCallCfg_Max); |
222 | } | 85 | } |
223 | 86 | ||
224 | static inline u64 HvLpConfig_getMaxLogicalProcessors(void) | ||
225 | { | ||
226 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | ||
227 | HvCallCfg_Max) | ||
228 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
229 | } | ||
230 | |||
231 | static inline u64 HvLpConfig_getInitPhysicalProcessors(void) | ||
232 | { | ||
233 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | ||
234 | HvCallCfg_Init); | ||
235 | } | ||
236 | |||
237 | static inline u64 HvLpConfig_getInitLogicalProcessors(void) | ||
238 | { | ||
239 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | ||
240 | HvCallCfg_Init) | ||
241 | * (/*getPaca()->getSecondaryThreadCount() +*/ 1); | ||
242 | } | ||
243 | |||
244 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) | 87 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) |
245 | { | 88 | { |
246 | return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline()); | 89 | return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline()); |
@@ -252,37 +95,6 @@ static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp( | |||
252 | return HvCallCfg_getVirtualLanIndexMap(lp); | 95 | return HvCallCfg_getVirtualLanIndexMap(lp); |
253 | } | 96 | } |
254 | 97 | ||
255 | static inline HvLpIndex HvLpConfig_getBusOwner(HvBusNumber busNumber) | ||
256 | { | ||
257 | return HvCallCfg_getBusOwner(busNumber); | ||
258 | } | ||
259 | |||
260 | static inline int HvLpConfig_isBusDedicated(HvBusNumber busNumber) | ||
261 | { | ||
262 | return HvCallCfg_isBusDedicated(busNumber); | ||
263 | } | ||
264 | |||
265 | static inline HvLpIndexMap HvLpConfig_getBusAllocation(HvBusNumber busNumber) | ||
266 | { | ||
267 | return HvCallCfg_getBusAllocation(busNumber); | ||
268 | } | ||
269 | |||
270 | /* returns the absolute real address of the load area */ | ||
271 | static inline u64 HvLpConfig_getLoadAddress(void) | ||
272 | { | ||
273 | return itLpNaca.xLoadAreaAddr & 0x7fffffffffffffff; | ||
274 | } | ||
275 | |||
276 | static inline u64 HvLpConfig_getLoadPages(void) | ||
277 | { | ||
278 | return itLpNaca.xLoadAreaChunks * HVPAGESPERCHUNK; | ||
279 | } | ||
280 | |||
281 | static inline int HvLpConfig_isBusOwnedByThisLp(HvBusNumber busNumber) | ||
282 | { | ||
283 | return (HvLpConfig_getBusOwner(busNumber) == HvLpConfig_getLpIndex()); | ||
284 | } | ||
285 | |||
286 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, | 98 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, |
287 | HvLpIndex lp2) | 99 | HvLpIndex lp2) |
288 | { | 100 | { |