aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/iSeries/HvCallCfg.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-06-21 20:15:35 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 21:46:27 -0400
commit6b7feecb2f8fcab184a38916d10349bd6648e0bc (patch)
tree5c51827e85eff96d6c50b41fea428bcf0f1ba71a /include/asm-ppc64/iSeries/HvCallCfg.h
parentfcee38952609fccb2bdfe166b3b96bd75a292aa6 (diff)
[PATCH] ppc64 iSeries: obvious code simplifications
This patch does some obvious code cleanups in the iSeries headers files. - simplifies the bodies of lots of inline functions - parenthesises a macros result - removes C++ wrapping - adds "extern" to some function declarations There are no semantic changes. 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/asm-ppc64/iSeries/HvCallCfg.h')
-rw-r--r--include/asm-ppc64/iSeries/HvCallCfg.h61
1 files changed, 16 insertions, 45 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallCfg.h b/include/asm-ppc64/iSeries/HvCallCfg.h
index 2223a9647d0e..aa491c3ad0a2 100644
--- a/include/asm-ppc64/iSeries/HvCallCfg.h
+++ b/include/asm-ppc64/iSeries/HvCallCfg.h
@@ -69,37 +69,27 @@ enum HvCallCfg_ReqQual {
69 69
70static inline HvLpIndex HvCallCfg_getLps(void) 70static inline HvLpIndex HvCallCfg_getLps(void)
71{ 71{
72 HvLpIndex retVal = HvCall0(HvCallCfgGetLps); 72 return HvCall0(HvCallCfgGetLps);
73 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
74 return retVal;
75} 73}
76 74
77static inline int HvCallCfg_isBusDedicated(u64 busIndex) 75static inline int HvCallCfg_isBusDedicated(u64 busIndex)
78{ 76{
79 int retVal = HvCall1(HvCallCfgIsBusDedicated,busIndex); 77 return HvCall1(HvCallCfgIsBusDedicated, busIndex);
80 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
81 return retVal;
82} 78}
83 79
84static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex) 80static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex)
85{ 81{
86 HvLpIndex retVal = HvCall1(HvCallCfgGetBusOwner,busIndex); 82 return HvCall1(HvCallCfgGetBusOwner, busIndex);
87 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
88 return retVal;
89} 83}
90 84
91static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex) 85static inline HvLpIndexMap HvCallCfg_getBusAllocation(u64 busIndex)
92{ 86{
93 HvLpIndexMap retVal = HvCall1(HvCallCfgGetBusAllocation,busIndex); 87 return HvCall1(HvCallCfgGetBusAllocation, busIndex);
94 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
95 return retVal;
96} 88}
97 89
98static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void) 90static inline HvLpIndexMap HvCallCfg_getActiveLpMap(void)
99{ 91{
100 HvLpIndexMap retVal = HvCall0(HvCallCfgGetActiveLpMap); 92 return HvCall0(HvCallCfgGetActiveLpMap);
101 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
102 return retVal;
103} 93}
104 94
105static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap( 95static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(
@@ -112,23 +102,18 @@ static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(
112 u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp); 102 u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
113 if (retVal == -1) 103 if (retVal == -1)
114 retVal = 0; 104 retVal = 0;
115 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
116 return retVal; 105 return retVal;
117} 106}
118 107
119static inline u64 HvCallCfg_getSystemMsChunks(void) 108static inline u64 HvCallCfg_getSystemMsChunks(void)
120{ 109{
121 u64 retVal = HvCall0(HvCallCfgGetSystemMsChunks); 110 return HvCall0(HvCallCfgGetSystemMsChunks);
122 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
123 return retVal;
124} 111}
125 112
126static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp, 113static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp,
127 enum HvCallCfg_ReqQual qual) 114 enum HvCallCfg_ReqQual qual)
128{ 115{
129 u64 retVal = HvCall2(HvCallCfgGetMsChunks,lp,qual); 116 return HvCall2(HvCallCfgGetMsChunks, lp, qual);
130 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
131 return retVal;
132} 117}
133 118
134static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp) 119static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp)
@@ -142,65 +127,51 @@ static inline u64 HvCallCfg_getMinRuntimeMsChunks(HvLpIndex lp)
142 127
143static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks) 128static inline u64 HvCallCfg_setMinRuntimeMsChunks(u64 chunks)
144{ 129{
145 u64 retVal = HvCall1(HvCallCfgSetMinRuntimeMsChunks,chunks); 130 return HvCall1(HvCallCfgSetMinRuntimeMsChunks, chunks);
146 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
147 return retVal;
148} 131}
149 132
150static inline u64 HvCallCfg_getSystemPhysicalProcessors(void) 133static inline u64 HvCallCfg_getSystemPhysicalProcessors(void)
151{ 134{
152 u64 retVal = HvCall0(HvCallCfgGetSystemPhysicalProcessors); 135 return HvCall0(HvCallCfgGetSystemPhysicalProcessors);
153 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
154 return retVal;
155} 136}
156 137
157static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp, 138static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp,
158 enum HvCallCfg_ReqQual qual) 139 enum HvCallCfg_ReqQual qual)
159{ 140{
160 u64 retVal = HvCall2(HvCallCfgGetPhysicalProcessors,lp,qual); 141 return HvCall2(HvCallCfgGetPhysicalProcessors, lp, qual);
161 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
162 return retVal;
163} 142}
164 143
165static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp, 144static inline u64 HvCallCfg_getConfiguredBusUnitsForInterruptProc(HvLpIndex lp,
166 u16 hvLogicalProcIndex) 145 u16 hvLogicalProcIndex)
167{ 146{
168 u64 retVal = HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc,lp,hvLogicalProcIndex); 147 return HvCall2(HvCallCfgGetConfiguredBusUnitsForIntProc, lp,
169 // getPaca()->adjustHmtForNoOfSpinLocksHeld(); 148 hvLogicalProcIndex);
170 return retVal;
171 149
172} 150}
173 151
174static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) 152static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
175{ 153{
176 HvLpSharedPoolIndex retVal = 154 return HvCall1(HvCallCfgGetSharedPoolIndex, lp);
177 HvCall1(HvCallCfgGetSharedPoolIndex,lp);
178 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
179 return retVal;
180 155
181} 156}
182 157
183static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp, 158static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp,
184 enum HvCallCfg_ReqQual qual) 159 enum HvCallCfg_ReqQual qual)
185{ 160{
186 u64 retVal = HvCall2(HvCallCfgGetSharedProcUnits,lp,qual); 161 return HvCall2(HvCallCfgGetSharedProcUnits, lp, qual);
187 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
188 return retVal;
189 162
190} 163}
191 164
192static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) 165static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
193{ 166{
194 u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool,sPI); 167 u16 retVal = HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI);
195 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
196 return retVal; 168 return retVal;
197 169
198} 170}
199 171
200static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) 172static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp)
201{ 173{
202 u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex,lp); 174 u64 retVal = HvCall1(HvCallCfgGetHostingLpIndex, lp);
203 // getPaca()->adjustHmtForNoOfSpinLocksHeld();
204 return retVal; 175 return retVal;
205} 176}
206 177