aboutsummaryrefslogtreecommitdiff
path: root/include/asm-ppc64/iSeries
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-06-21 17:15:38 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 18:46:28 -0700
commit2310c977a9b7a4d08fbaa74e694b49b38d49f5ae (patch)
treecef353edbf30d25029f2aab811584728d606cd69 /include/asm-ppc64/iSeries
parentdd61ce922770b299081c3e729ea65758ed676034 (diff)
[PATCH] ppc64 iSeries: remove HvCallCfg.h
Now that the only users of things in HvCallCfg.h are in HvLpConfig.h, merge in the bit we need and remove HvCallCfg.h. 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')
-rw-r--r--include/asm-ppc64/iSeries/HvCallCfg.h129
-rw-r--r--include/asm-ppc64/iSeries/HvLpConfig.h59
2 files changed, 42 insertions, 146 deletions
diff --git a/include/asm-ppc64/iSeries/HvCallCfg.h b/include/asm-ppc64/iSeries/HvCallCfg.h
deleted file mode 100644
index ddf2bb59d73..00000000000
--- a/include/asm-ppc64/iSeries/HvCallCfg.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * HvCallCfg.h
- * Copyright (C) 2001 Mike Corrigan IBM Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-/*
- * This file contains the "hypervisor call" interface which is used to
- * drive the hypervisor from the OS.
- */
-#ifndef _HVCALLCFG_H
-#define _HVCALLCFG_H
-
-#include <asm/iSeries/HvCallSc.h>
-#include <asm/iSeries/HvTypes.h>
-
-enum HvCallCfg_ReqQual {
- HvCallCfg_Cur = 0,
- HvCallCfg_Init = 1,
- HvCallCfg_Max = 2,
- HvCallCfg_Min = 3
-};
-
-#define HvCallCfgGetLps HvCallCfg + 0
-#define HvCallCfgGetActiveLpMap HvCallCfg + 1
-#define HvCallCfgGetLpVrmIndex HvCallCfg + 2
-#define HvCallCfgGetLpMinSupportedPlicVrmIndex HvCallCfg + 3
-#define HvCallCfgGetLpMinCompatablePlicVrmIndex HvCallCfg + 4
-#define HvCallCfgGetLpVrmName HvCallCfg + 5
-#define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6
-#define HvCallCfgGetPhysicalProcessors HvCallCfg + 7
-#define HvCallCfgGetSystemMsChunks HvCallCfg + 8
-#define HvCallCfgGetMsChunks HvCallCfg + 9
-#define HvCallCfgGetInteractivePercentage HvCallCfg + 10
-#define HvCallCfgIsBusDedicated HvCallCfg + 11
-#define HvCallCfgGetBusOwner HvCallCfg + 12
-#define HvCallCfgGetBusAllocation HvCallCfg + 13
-#define HvCallCfgGetBusUnitOwner HvCallCfg + 14
-#define HvCallCfgGetBusUnitAllocation HvCallCfg + 15
-#define HvCallCfgGetVirtualBusPool HvCallCfg + 16
-#define HvCallCfgGetBusUnitInterruptProc HvCallCfg + 17
-#define HvCallCfgGetConfiguredBusUnitsForIntProc HvCallCfg + 18
-#define HvCallCfgGetRioSanBusPool HvCallCfg + 19
-#define HvCallCfgGetSharedPoolIndex HvCallCfg + 20
-#define HvCallCfgGetSharedProcUnits HvCallCfg + 21
-#define HvCallCfgGetNumProcsInSharedPool HvCallCfg + 22
-#define HvCallCfgRouter23 HvCallCfg + 23
-#define HvCallCfgRouter24 HvCallCfg + 24
-#define HvCallCfgRouter25 HvCallCfg + 25
-#define HvCallCfgRouter26 HvCallCfg + 26
-#define HvCallCfgRouter27 HvCallCfg + 27
-#define HvCallCfgGetMinRuntimeMsChunks HvCallCfg + 28
-#define HvCallCfgSetMinRuntimeMsChunks HvCallCfg + 29
-#define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30
-#define HvCallCfgGetLpExecutionMode HvCallCfg + 31
-#define HvCallCfgGetHostingLpIndex HvCallCfg + 32
-
-static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex)
-{
- return HvCall1(HvCallCfgGetBusOwner, busIndex);
-}
-
-static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap(
- HvLpIndex lp)
-{
- /*
- * This is a new function in V5R1 so calls to this on older
- * hypervisors will return -1
- */
- u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
- if (retVal == -1)
- retVal = 0;
- return retVal;
-}
-
-static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp,
- enum HvCallCfg_ReqQual qual)
-{
- return HvCall2(HvCallCfgGetMsChunks, lp, qual);
-}
-
-static inline u64 HvCallCfg_getSystemPhysicalProcessors(void)
-{
- return HvCall0(HvCallCfgGetSystemPhysicalProcessors);
-}
-
-static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp,
- enum HvCallCfg_ReqQual qual)
-{
- return HvCall2(HvCallCfgGetPhysicalProcessors, lp, qual);
-}
-
-static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp)
-{
- return HvCall1(HvCallCfgGetSharedPoolIndex, lp);
-
-}
-
-static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp,
- enum HvCallCfg_ReqQual qual)
-{
- return HvCall2(HvCallCfgGetSharedProcUnits, lp, qual);
-
-}
-
-static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
-{
- return (u16)HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI);
-
-}
-
-static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp)
-{
- return HvCall1(HvCallCfgGetHostingLpIndex, lp);
-}
-
-#endif /* _HVCALLCFG_H */
diff --git a/include/asm-ppc64/iSeries/HvLpConfig.h b/include/asm-ppc64/iSeries/HvLpConfig.h
index 78d68281cc8..f1cf1e70ca3 100644
--- a/include/asm-ppc64/iSeries/HvLpConfig.h
+++ b/include/asm-ppc64/iSeries/HvLpConfig.h
@@ -24,10 +24,26 @@
* to determine which resources should be allocated to each partition.
*/
-#include <asm/iSeries/HvCallCfg.h>
+#include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h>
#include <asm/iSeries/ItLpNaca.h>
+enum {
+ HvCallCfg_Cur = 0,
+ HvCallCfg_Init = 1,
+ HvCallCfg_Max = 2,
+ HvCallCfg_Min = 3
+};
+
+#define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6
+#define HvCallCfgGetPhysicalProcessors HvCallCfg + 7
+#define HvCallCfgGetMsChunks HvCallCfg + 9
+#define HvCallCfgGetSharedPoolIndex HvCallCfg + 20
+#define HvCallCfgGetSharedProcUnits HvCallCfg + 21
+#define HvCallCfgGetNumProcsInSharedPool HvCallCfg + 22
+#define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30
+#define HvCallCfgGetHostingLpIndex HvCallCfg + 32
+
extern HvLpIndex HvLpConfig_getLpIndex_outline(void);
static inline HvLpIndex HvLpConfig_getLpIndex(void)
@@ -42,72 +58,81 @@ static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void)
static inline u64 HvLpConfig_getMsChunks(void)
{
- return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur);
+ return HvCall2(HvCallCfgGetMsChunks, HvLpConfig_getLpIndex(),
+ HvCallCfg_Cur);
}
static inline u64 HvLpConfig_getSystemPhysicalProcessors(void)
{
- return HvCallCfg_getSystemPhysicalProcessors();
+ return HvCall0(HvCallCfgGetSystemPhysicalProcessors);
}
static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI)
{
- return HvCallCfg_getNumProcsInSharedPool(sPI);
+ return (u16)HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI);
}
static inline u64 HvLpConfig_getPhysicalProcessors(void)
{
- return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
+ return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(),
HvCallCfg_Cur);
}
static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void)
{
- return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex());
+ return HvCall1(HvCallCfgGetSharedPoolIndex, HvLpConfig_getLpIndex());
}
static inline u64 HvLpConfig_getSharedProcUnits(void)
{
- return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),
+ return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(),
HvCallCfg_Cur);
}
static inline u64 HvLpConfig_getMaxSharedProcUnits(void)
{
- return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(),
+ return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(),
HvCallCfg_Max);
}
static inline u64 HvLpConfig_getMaxPhysicalProcessors(void)
{
- return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(),
+ return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(),
HvCallCfg_Max);
}
-static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void)
+static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp(
+ HvLpIndex lp)
{
- return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline());
+ /*
+ * This is a new function in V5R1 so calls to this on older
+ * hypervisors will return -1
+ */
+ u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp);
+ if (retVal == -1)
+ retVal = 0;
+ return retVal;
}
-static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp(
- HvLpIndex lp)
+static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void)
{
- return HvCallCfg_getVirtualLanIndexMap(lp);
+ return HvLpConfig_getVirtualLanIndexMapForLp(
+ HvLpConfig_getLpIndex_outline());
}
static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1,
HvLpIndex lp2)
{
HvLpVirtualLanIndexMap virtualLanIndexMap1 =
- HvCallCfg_getVirtualLanIndexMap(lp1);
+ HvLpConfig_getVirtualLanIndexMapForLp(lp1);
HvLpVirtualLanIndexMap virtualLanIndexMap2 =
- HvCallCfg_getVirtualLanIndexMap(lp2);
+ HvLpConfig_getVirtualLanIndexMapForLp(lp2);
return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0);
}
static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp)
{
- return HvCallCfg_getHostingLpIndex(lp);
+ return HvCall1(HvCallCfgGetHostingLpIndex, lp);
}
#endif /* _HVLPCONFIG_H */