diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-06-21 20:15:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-21 21:46:28 -0400 |
commit | 2310c977a9b7a4d08fbaa74e694b49b38d49f5ae (patch) | |
tree | cef353edbf30d25029f2aab811584728d606cd69 /include/asm-ppc64 | |
parent | dd61ce922770b299081c3e729ea65758ed676034 (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')
-rw-r--r-- | include/asm-ppc64/iSeries/HvCallCfg.h | 129 | ||||
-rw-r--r-- | include/asm-ppc64/iSeries/HvLpConfig.h | 59 |
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 ddf2bb59d73c..000000000000 --- a/include/asm-ppc64/iSeries/HvCallCfg.h +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | /* | ||
2 | * HvCallCfg.h | ||
3 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
4 | * | ||
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 | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
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 | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | /* | ||
20 | * This file contains the "hypervisor call" interface which is used to | ||
21 | * drive the hypervisor from the OS. | ||
22 | */ | ||
23 | #ifndef _HVCALLCFG_H | ||
24 | #define _HVCALLCFG_H | ||
25 | |||
26 | #include <asm/iSeries/HvCallSc.h> | ||
27 | #include <asm/iSeries/HvTypes.h> | ||
28 | |||
29 | enum HvCallCfg_ReqQual { | ||
30 | HvCallCfg_Cur = 0, | ||
31 | HvCallCfg_Init = 1, | ||
32 | HvCallCfg_Max = 2, | ||
33 | HvCallCfg_Min = 3 | ||
34 | }; | ||
35 | |||
36 | #define HvCallCfgGetLps HvCallCfg + 0 | ||
37 | #define HvCallCfgGetActiveLpMap HvCallCfg + 1 | ||
38 | #define HvCallCfgGetLpVrmIndex HvCallCfg + 2 | ||
39 | #define HvCallCfgGetLpMinSupportedPlicVrmIndex HvCallCfg + 3 | ||
40 | #define HvCallCfgGetLpMinCompatablePlicVrmIndex HvCallCfg + 4 | ||
41 | #define HvCallCfgGetLpVrmName HvCallCfg + 5 | ||
42 | #define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6 | ||
43 | #define HvCallCfgGetPhysicalProcessors HvCallCfg + 7 | ||
44 | #define HvCallCfgGetSystemMsChunks HvCallCfg + 8 | ||
45 | #define HvCallCfgGetMsChunks HvCallCfg + 9 | ||
46 | #define HvCallCfgGetInteractivePercentage HvCallCfg + 10 | ||
47 | #define HvCallCfgIsBusDedicated HvCallCfg + 11 | ||
48 | #define HvCallCfgGetBusOwner HvCallCfg + 12 | ||
49 | #define HvCallCfgGetBusAllocation HvCallCfg + 13 | ||
50 | #define HvCallCfgGetBusUnitOwner HvCallCfg + 14 | ||
51 | #define HvCallCfgGetBusUnitAllocation HvCallCfg + 15 | ||
52 | #define HvCallCfgGetVirtualBusPool HvCallCfg + 16 | ||
53 | #define HvCallCfgGetBusUnitInterruptProc HvCallCfg + 17 | ||
54 | #define HvCallCfgGetConfiguredBusUnitsForIntProc HvCallCfg + 18 | ||
55 | #define HvCallCfgGetRioSanBusPool HvCallCfg + 19 | ||
56 | #define HvCallCfgGetSharedPoolIndex HvCallCfg + 20 | ||
57 | #define HvCallCfgGetSharedProcUnits HvCallCfg + 21 | ||
58 | #define HvCallCfgGetNumProcsInSharedPool HvCallCfg + 22 | ||
59 | #define HvCallCfgRouter23 HvCallCfg + 23 | ||
60 | #define HvCallCfgRouter24 HvCallCfg + 24 | ||
61 | #define HvCallCfgRouter25 HvCallCfg + 25 | ||
62 | #define HvCallCfgRouter26 HvCallCfg + 26 | ||
63 | #define HvCallCfgRouter27 HvCallCfg + 27 | ||
64 | #define HvCallCfgGetMinRuntimeMsChunks HvCallCfg + 28 | ||
65 | #define HvCallCfgSetMinRuntimeMsChunks HvCallCfg + 29 | ||
66 | #define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30 | ||
67 | #define HvCallCfgGetLpExecutionMode HvCallCfg + 31 | ||
68 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 | ||
69 | |||
70 | static inline HvLpIndex HvCallCfg_getBusOwner(u64 busIndex) | ||
71 | { | ||
72 | return HvCall1(HvCallCfgGetBusOwner, busIndex); | ||
73 | } | ||
74 | |||
75 | static inline HvLpVirtualLanIndexMap HvCallCfg_getVirtualLanIndexMap( | ||
76 | HvLpIndex lp) | ||
77 | { | ||
78 | /* | ||
79 | * This is a new function in V5R1 so calls to this on older | ||
80 | * hypervisors will return -1 | ||
81 | */ | ||
82 | u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp); | ||
83 | if (retVal == -1) | ||
84 | retVal = 0; | ||
85 | return retVal; | ||
86 | } | ||
87 | |||
88 | static inline u64 HvCallCfg_getMsChunks(HvLpIndex lp, | ||
89 | enum HvCallCfg_ReqQual qual) | ||
90 | { | ||
91 | return HvCall2(HvCallCfgGetMsChunks, lp, qual); | ||
92 | } | ||
93 | |||
94 | static inline u64 HvCallCfg_getSystemPhysicalProcessors(void) | ||
95 | { | ||
96 | return HvCall0(HvCallCfgGetSystemPhysicalProcessors); | ||
97 | } | ||
98 | |||
99 | static inline u64 HvCallCfg_getPhysicalProcessors(HvLpIndex lp, | ||
100 | enum HvCallCfg_ReqQual qual) | ||
101 | { | ||
102 | return HvCall2(HvCallCfgGetPhysicalProcessors, lp, qual); | ||
103 | } | ||
104 | |||
105 | static inline HvLpSharedPoolIndex HvCallCfg_getSharedPoolIndex(HvLpIndex lp) | ||
106 | { | ||
107 | return HvCall1(HvCallCfgGetSharedPoolIndex, lp); | ||
108 | |||
109 | } | ||
110 | |||
111 | static inline u64 HvCallCfg_getSharedProcUnits(HvLpIndex lp, | ||
112 | enum HvCallCfg_ReqQual qual) | ||
113 | { | ||
114 | return HvCall2(HvCallCfgGetSharedProcUnits, lp, qual); | ||
115 | |||
116 | } | ||
117 | |||
118 | static inline u64 HvCallCfg_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) | ||
119 | { | ||
120 | return (u16)HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI); | ||
121 | |||
122 | } | ||
123 | |||
124 | static inline HvLpIndex HvCallCfg_getHostingLpIndex(HvLpIndex lp) | ||
125 | { | ||
126 | return HvCall1(HvCallCfgGetHostingLpIndex, lp); | ||
127 | } | ||
128 | |||
129 | #endif /* _HVCALLCFG_H */ | ||
diff --git a/include/asm-ppc64/iSeries/HvLpConfig.h b/include/asm-ppc64/iSeries/HvLpConfig.h index 78d68281cc8b..f1cf1e70ca3c 100644 --- a/include/asm-ppc64/iSeries/HvLpConfig.h +++ b/include/asm-ppc64/iSeries/HvLpConfig.h | |||
@@ -24,10 +24,26 @@ | |||
24 | * to determine which resources should be allocated to each partition. | 24 | * to determine which resources should be allocated to each partition. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <asm/iSeries/HvCallCfg.h> | 27 | #include <asm/iSeries/HvCallSc.h> |
28 | #include <asm/iSeries/HvTypes.h> | 28 | #include <asm/iSeries/HvTypes.h> |
29 | #include <asm/iSeries/ItLpNaca.h> | 29 | #include <asm/iSeries/ItLpNaca.h> |
30 | 30 | ||
31 | enum { | ||
32 | HvCallCfg_Cur = 0, | ||
33 | HvCallCfg_Init = 1, | ||
34 | HvCallCfg_Max = 2, | ||
35 | HvCallCfg_Min = 3 | ||
36 | }; | ||
37 | |||
38 | #define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6 | ||
39 | #define HvCallCfgGetPhysicalProcessors HvCallCfg + 7 | ||
40 | #define HvCallCfgGetMsChunks HvCallCfg + 9 | ||
41 | #define HvCallCfgGetSharedPoolIndex HvCallCfg + 20 | ||
42 | #define HvCallCfgGetSharedProcUnits HvCallCfg + 21 | ||
43 | #define HvCallCfgGetNumProcsInSharedPool HvCallCfg + 22 | ||
44 | #define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30 | ||
45 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 | ||
46 | |||
31 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); | 47 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); |
32 | 48 | ||
33 | static inline HvLpIndex HvLpConfig_getLpIndex(void) | 49 | static inline HvLpIndex HvLpConfig_getLpIndex(void) |
@@ -42,72 +58,81 @@ static inline HvLpIndex HvLpConfig_getPrimaryLpIndex(void) | |||
42 | 58 | ||
43 | static inline u64 HvLpConfig_getMsChunks(void) | 59 | static inline u64 HvLpConfig_getMsChunks(void) |
44 | { | 60 | { |
45 | return HvCallCfg_getMsChunks(HvLpConfig_getLpIndex(), HvCallCfg_Cur); | 61 | return HvCall2(HvCallCfgGetMsChunks, HvLpConfig_getLpIndex(), |
62 | HvCallCfg_Cur); | ||
46 | } | 63 | } |
47 | 64 | ||
48 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) | 65 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) |
49 | { | 66 | { |
50 | return HvCallCfg_getSystemPhysicalProcessors(); | 67 | return HvCall0(HvCallCfgGetSystemPhysicalProcessors); |
51 | } | 68 | } |
52 | 69 | ||
53 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) | 70 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) |
54 | { | 71 | { |
55 | return HvCallCfg_getNumProcsInSharedPool(sPI); | 72 | return (u16)HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI); |
56 | } | 73 | } |
57 | 74 | ||
58 | static inline u64 HvLpConfig_getPhysicalProcessors(void) | 75 | static inline u64 HvLpConfig_getPhysicalProcessors(void) |
59 | { | 76 | { |
60 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | 77 | return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(), |
61 | HvCallCfg_Cur); | 78 | HvCallCfg_Cur); |
62 | } | 79 | } |
63 | 80 | ||
64 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) | 81 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) |
65 | { | 82 | { |
66 | return HvCallCfg_getSharedPoolIndex(HvLpConfig_getLpIndex()); | 83 | return HvCall1(HvCallCfgGetSharedPoolIndex, HvLpConfig_getLpIndex()); |
67 | } | 84 | } |
68 | 85 | ||
69 | static inline u64 HvLpConfig_getSharedProcUnits(void) | 86 | static inline u64 HvLpConfig_getSharedProcUnits(void) |
70 | { | 87 | { |
71 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), | 88 | return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(), |
72 | HvCallCfg_Cur); | 89 | HvCallCfg_Cur); |
73 | } | 90 | } |
74 | 91 | ||
75 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) | 92 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) |
76 | { | 93 | { |
77 | return HvCallCfg_getSharedProcUnits(HvLpConfig_getLpIndex(), | 94 | return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(), |
78 | HvCallCfg_Max); | 95 | HvCallCfg_Max); |
79 | } | 96 | } |
80 | 97 | ||
81 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) | 98 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) |
82 | { | 99 | { |
83 | return HvCallCfg_getPhysicalProcessors(HvLpConfig_getLpIndex(), | 100 | return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(), |
84 | HvCallCfg_Max); | 101 | HvCallCfg_Max); |
85 | } | 102 | } |
86 | 103 | ||
87 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) | 104 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp( |
105 | HvLpIndex lp) | ||
88 | { | 106 | { |
89 | return HvCallCfg_getVirtualLanIndexMap(HvLpConfig_getLpIndex_outline()); | 107 | /* |
108 | * This is a new function in V5R1 so calls to this on older | ||
109 | * hypervisors will return -1 | ||
110 | */ | ||
111 | u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp); | ||
112 | if (retVal == -1) | ||
113 | retVal = 0; | ||
114 | return retVal; | ||
90 | } | 115 | } |
91 | 116 | ||
92 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp( | 117 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) |
93 | HvLpIndex lp) | ||
94 | { | 118 | { |
95 | return HvCallCfg_getVirtualLanIndexMap(lp); | 119 | return HvLpConfig_getVirtualLanIndexMapForLp( |
120 | HvLpConfig_getLpIndex_outline()); | ||
96 | } | 121 | } |
97 | 122 | ||
98 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, | 123 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, |
99 | HvLpIndex lp2) | 124 | HvLpIndex lp2) |
100 | { | 125 | { |
101 | HvLpVirtualLanIndexMap virtualLanIndexMap1 = | 126 | HvLpVirtualLanIndexMap virtualLanIndexMap1 = |
102 | HvCallCfg_getVirtualLanIndexMap(lp1); | 127 | HvLpConfig_getVirtualLanIndexMapForLp(lp1); |
103 | HvLpVirtualLanIndexMap virtualLanIndexMap2 = | 128 | HvLpVirtualLanIndexMap virtualLanIndexMap2 = |
104 | HvCallCfg_getVirtualLanIndexMap(lp2); | 129 | HvLpConfig_getVirtualLanIndexMapForLp(lp2); |
105 | return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0); | 130 | return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0); |
106 | } | 131 | } |
107 | 132 | ||
108 | static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp) | 133 | static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp) |
109 | { | 134 | { |
110 | return HvCallCfg_getHostingLpIndex(lp); | 135 | return HvCall1(HvCallCfgGetHostingLpIndex, lp); |
111 | } | 136 | } |
112 | 137 | ||
113 | #endif /* _HVLPCONFIG_H */ | 138 | #endif /* _HVLPCONFIG_H */ |