diff options
-rw-r--r-- | arch/powerpc/include/asm/iseries/alpaca.h | 31 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/hv_call.h | 111 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/hv_call_sc.h | 50 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/hv_call_xm.h | 61 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/hv_lp_config.h | 128 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/hv_types.h | 112 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/it_lp_queue.h | 78 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/lpar_map.h | 85 | ||||
-rw-r--r-- | arch/powerpc/include/asm/iseries/mf.h | 51 |
9 files changed, 0 insertions, 707 deletions
diff --git a/arch/powerpc/include/asm/iseries/alpaca.h b/arch/powerpc/include/asm/iseries/alpaca.h deleted file mode 100644 index c0cce6727a69..000000000000 --- a/arch/powerpc/include/asm/iseries/alpaca.h +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright © 2008 Stephen Rothwell IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_ISERIES_ALPACA_H | ||
19 | #define _ASM_POWERPC_ISERIES_ALPACA_H | ||
20 | |||
21 | /* | ||
22 | * This is the part of the paca that the iSeries hypervisor | ||
23 | * needs to be statically initialised. Immediately after boot | ||
24 | * we switch to the normal Linux paca. | ||
25 | */ | ||
26 | struct alpaca { | ||
27 | struct lppaca *lppaca_ptr; /* Pointer to LpPaca for PLIC */ | ||
28 | const void *reg_save_ptr; /* Pointer to LpRegSave for PLIC */ | ||
29 | }; | ||
30 | |||
31 | #endif /* _ASM_POWERPC_ISERIES_ALPACA_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/hv_call.h b/arch/powerpc/include/asm/iseries/hv_call.h deleted file mode 100644 index 162d653ad51f..000000000000 --- a/arch/powerpc/include/asm/iseries/hv_call.h +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | * | ||
18 | * This file contains the "hypervisor call" interface which is used to | ||
19 | * drive the hypervisor from the OS. | ||
20 | */ | ||
21 | #ifndef _ASM_POWERPC_ISERIES_HV_CALL_H | ||
22 | #define _ASM_POWERPC_ISERIES_HV_CALL_H | ||
23 | |||
24 | #include <asm/iseries/hv_call_sc.h> | ||
25 | #include <asm/iseries/hv_types.h> | ||
26 | #include <asm/paca.h> | ||
27 | |||
28 | /* Type of yield for HvCallBaseYieldProcessor */ | ||
29 | #define HvCall_YieldTimed 0 /* Yield until specified time (tb) */ | ||
30 | #define HvCall_YieldToActive 1 /* Yield until all active procs have run */ | ||
31 | #define HvCall_YieldToProc 2 /* Yield until the specified processor has run */ | ||
32 | |||
33 | /* interrupt masks for setEnabledInterrupts */ | ||
34 | #define HvCall_MaskIPI 0x00000001 | ||
35 | #define HvCall_MaskLpEvent 0x00000002 | ||
36 | #define HvCall_MaskLpProd 0x00000004 | ||
37 | #define HvCall_MaskTimeout 0x00000008 | ||
38 | |||
39 | /* Log buffer formats */ | ||
40 | #define HvCall_LogBuffer_ASCII 0 | ||
41 | #define HvCall_LogBuffer_EBCDIC 1 | ||
42 | |||
43 | #define HvCallBaseAckDeferredInts HvCallBase + 0 | ||
44 | #define HvCallBaseCpmPowerOff HvCallBase + 1 | ||
45 | #define HvCallBaseGetHwPatch HvCallBase + 2 | ||
46 | #define HvCallBaseReIplSpAttn HvCallBase + 3 | ||
47 | #define HvCallBaseSetASR HvCallBase + 4 | ||
48 | #define HvCallBaseSetASRAndRfi HvCallBase + 5 | ||
49 | #define HvCallBaseSetIMR HvCallBase + 6 | ||
50 | #define HvCallBaseSendIPI HvCallBase + 7 | ||
51 | #define HvCallBaseTerminateMachine HvCallBase + 8 | ||
52 | #define HvCallBaseTerminateMachineSrc HvCallBase + 9 | ||
53 | #define HvCallBaseProcessPlicInterrupts HvCallBase + 10 | ||
54 | #define HvCallBaseIsPrimaryCpmOrMsdIpl HvCallBase + 11 | ||
55 | #define HvCallBaseSetVirtualSIT HvCallBase + 12 | ||
56 | #define HvCallBaseVaryOffThisProcessor HvCallBase + 13 | ||
57 | #define HvCallBaseVaryOffMemoryChunk HvCallBase + 14 | ||
58 | #define HvCallBaseVaryOffInteractivePercentage HvCallBase + 15 | ||
59 | #define HvCallBaseSendLpProd HvCallBase + 16 | ||
60 | #define HvCallBaseSetEnabledInterrupts HvCallBase + 17 | ||
61 | #define HvCallBaseYieldProcessor HvCallBase + 18 | ||
62 | #define HvCallBaseVaryOffSharedProcUnits HvCallBase + 19 | ||
63 | #define HvCallBaseSetVirtualDecr HvCallBase + 20 | ||
64 | #define HvCallBaseClearLogBuffer HvCallBase + 21 | ||
65 | #define HvCallBaseGetLogBufferCodePage HvCallBase + 22 | ||
66 | #define HvCallBaseGetLogBufferFormat HvCallBase + 23 | ||
67 | #define HvCallBaseGetLogBufferLength HvCallBase + 24 | ||
68 | #define HvCallBaseReadLogBuffer HvCallBase + 25 | ||
69 | #define HvCallBaseSetLogBufferFormatAndCodePage HvCallBase + 26 | ||
70 | #define HvCallBaseWriteLogBuffer HvCallBase + 27 | ||
71 | #define HvCallBaseRouter28 HvCallBase + 28 | ||
72 | #define HvCallBaseRouter29 HvCallBase + 29 | ||
73 | #define HvCallBaseRouter30 HvCallBase + 30 | ||
74 | #define HvCallBaseSetDebugBus HvCallBase + 31 | ||
75 | |||
76 | #define HvCallCcSetDABR HvCallCc + 7 | ||
77 | |||
78 | static inline void HvCall_setVirtualDecr(void) | ||
79 | { | ||
80 | /* | ||
81 | * Ignore any error return codes - most likely means that the | ||
82 | * target value for the LP has been increased and this vary off | ||
83 | * would bring us below the new target. | ||
84 | */ | ||
85 | HvCall0(HvCallBaseSetVirtualDecr); | ||
86 | } | ||
87 | |||
88 | static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm) | ||
89 | { | ||
90 | HvCall2(HvCallBaseYieldProcessor, typeOfYield, yieldParm); | ||
91 | } | ||
92 | |||
93 | static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts) | ||
94 | { | ||
95 | HvCall1(HvCallBaseSetEnabledInterrupts, enabledInterrupts); | ||
96 | } | ||
97 | |||
98 | static inline void HvCall_setLogBufferFormatAndCodepage(int format, | ||
99 | u32 codePage) | ||
100 | { | ||
101 | HvCall2(HvCallBaseSetLogBufferFormatAndCodePage, format, codePage); | ||
102 | } | ||
103 | |||
104 | extern void HvCall_writeLogBuffer(const void *buffer, u64 bufLen); | ||
105 | |||
106 | static inline void HvCall_sendIPI(struct paca_struct *targetPaca) | ||
107 | { | ||
108 | HvCall1(HvCallBaseSendIPI, targetPaca->paca_index); | ||
109 | } | ||
110 | |||
111 | #endif /* _ASM_POWERPC_ISERIES_HV_CALL_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/hv_call_sc.h b/arch/powerpc/include/asm/iseries/hv_call_sc.h deleted file mode 100644 index f5d210959250..000000000000 --- a/arch/powerpc/include/asm/iseries/hv_call_sc.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_ISERIES_HV_CALL_SC_H | ||
19 | #define _ASM_POWERPC_ISERIES_HV_CALL_SC_H | ||
20 | |||
21 | #include <linux/types.h> | ||
22 | |||
23 | #define HvCallBase 0x8000000000000000ul | ||
24 | #define HvCallCc 0x8001000000000000ul | ||
25 | #define HvCallCfg 0x8002000000000000ul | ||
26 | #define HvCallEvent 0x8003000000000000ul | ||
27 | #define HvCallHpt 0x8004000000000000ul | ||
28 | #define HvCallPci 0x8005000000000000ul | ||
29 | #define HvCallSm 0x8007000000000000ul | ||
30 | #define HvCallXm 0x8009000000000000ul | ||
31 | |||
32 | extern u64 HvCall0(u64); | ||
33 | extern u64 HvCall1(u64, u64); | ||
34 | extern u64 HvCall2(u64, u64, u64); | ||
35 | extern u64 HvCall3(u64, u64, u64, u64); | ||
36 | extern u64 HvCall4(u64, u64, u64, u64, u64); | ||
37 | extern u64 HvCall5(u64, u64, u64, u64, u64, u64); | ||
38 | extern u64 HvCall6(u64, u64, u64, u64, u64, u64, u64); | ||
39 | extern u64 HvCall7(u64, u64, u64, u64, u64, u64, u64, u64); | ||
40 | |||
41 | extern u64 HvCall0Ret16(u64, void *); | ||
42 | extern u64 HvCall1Ret16(u64, void *, u64); | ||
43 | extern u64 HvCall2Ret16(u64, void *, u64, u64); | ||
44 | extern u64 HvCall3Ret16(u64, void *, u64, u64, u64); | ||
45 | extern u64 HvCall4Ret16(u64, void *, u64, u64, u64, u64); | ||
46 | extern u64 HvCall5Ret16(u64, void *, u64, u64, u64, u64, u64); | ||
47 | extern u64 HvCall6Ret16(u64, void *, u64, u64, u64, u64, u64, u64); | ||
48 | extern u64 HvCall7Ret16(u64, void *, u64, u64 ,u64 ,u64 ,u64 ,u64 ,u64); | ||
49 | |||
50 | #endif /* _ASM_POWERPC_ISERIES_HV_CALL_SC_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/hv_call_xm.h b/arch/powerpc/include/asm/iseries/hv_call_xm.h deleted file mode 100644 index 392ac3f54df0..000000000000 --- a/arch/powerpc/include/asm/iseries/hv_call_xm.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* | ||
2 | * This file contains the "hypervisor call" interface which is used to | ||
3 | * drive the hypervisor from SLIC. | ||
4 | */ | ||
5 | #ifndef _ASM_POWERPC_ISERIES_HV_CALL_XM_H | ||
6 | #define _ASM_POWERPC_ISERIES_HV_CALL_XM_H | ||
7 | |||
8 | #include <asm/iseries/hv_call_sc.h> | ||
9 | #include <asm/iseries/hv_types.h> | ||
10 | |||
11 | #define HvCallXmGetTceTableParms HvCallXm + 0 | ||
12 | #define HvCallXmTestBus HvCallXm + 1 | ||
13 | #define HvCallXmConnectBusUnit HvCallXm + 2 | ||
14 | #define HvCallXmLoadTod HvCallXm + 8 | ||
15 | #define HvCallXmTestBusUnit HvCallXm + 9 | ||
16 | #define HvCallXmSetTce HvCallXm + 11 | ||
17 | #define HvCallXmSetTces HvCallXm + 13 | ||
18 | |||
19 | static inline void HvCallXm_getTceTableParms(u64 cb) | ||
20 | { | ||
21 | HvCall1(HvCallXmGetTceTableParms, cb); | ||
22 | } | ||
23 | |||
24 | static inline u64 HvCallXm_setTce(u64 tceTableToken, u64 tceOffset, u64 tce) | ||
25 | { | ||
26 | return HvCall3(HvCallXmSetTce, tceTableToken, tceOffset, tce); | ||
27 | } | ||
28 | |||
29 | static inline u64 HvCallXm_setTces(u64 tceTableToken, u64 tceOffset, | ||
30 | u64 numTces, u64 tce1, u64 tce2, u64 tce3, u64 tce4) | ||
31 | { | ||
32 | return HvCall7(HvCallXmSetTces, tceTableToken, tceOffset, numTces, | ||
33 | tce1, tce2, tce3, tce4); | ||
34 | } | ||
35 | |||
36 | static inline u64 HvCallXm_testBus(u16 busNumber) | ||
37 | { | ||
38 | return HvCall1(HvCallXmTestBus, busNumber); | ||
39 | } | ||
40 | |||
41 | static inline u64 HvCallXm_testBusUnit(u16 busNumber, u8 subBusNumber, | ||
42 | u8 deviceId) | ||
43 | { | ||
44 | return HvCall2(HvCallXmTestBusUnit, busNumber, | ||
45 | (subBusNumber << 8) | deviceId); | ||
46 | } | ||
47 | |||
48 | static inline u64 HvCallXm_connectBusUnit(u16 busNumber, u8 subBusNumber, | ||
49 | u8 deviceId, u64 interruptToken) | ||
50 | { | ||
51 | return HvCall5(HvCallXmConnectBusUnit, busNumber, | ||
52 | (subBusNumber << 8) | deviceId, interruptToken, 0, | ||
53 | 0 /* HvLpConfig::mapDsaToQueueIndex(HvLpDSA(busNumber, xBoard, xCard)) */); | ||
54 | } | ||
55 | |||
56 | static inline u64 HvCallXm_loadTod(void) | ||
57 | { | ||
58 | return HvCall0(HvCallXmLoadTod); | ||
59 | } | ||
60 | |||
61 | #endif /* _ASM_POWERPC_ISERIES_HV_CALL_XM_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/hv_lp_config.h b/arch/powerpc/include/asm/iseries/hv_lp_config.h deleted file mode 100644 index a006fd1e4a2c..000000000000 --- a/arch/powerpc/include/asm/iseries/hv_lp_config.h +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_ISERIES_HV_LP_CONFIG_H | ||
19 | #define _ASM_POWERPC_ISERIES_HV_LP_CONFIG_H | ||
20 | |||
21 | /* | ||
22 | * This file contains the interface to the LPAR configuration data | ||
23 | * to determine which resources should be allocated to each partition. | ||
24 | */ | ||
25 | |||
26 | #include <asm/iseries/hv_call_sc.h> | ||
27 | #include <asm/iseries/hv_types.h> | ||
28 | |||
29 | enum { | ||
30 | HvCallCfg_Cur = 0, | ||
31 | HvCallCfg_Init = 1, | ||
32 | HvCallCfg_Max = 2, | ||
33 | HvCallCfg_Min = 3 | ||
34 | }; | ||
35 | |||
36 | #define HvCallCfgGetSystemPhysicalProcessors HvCallCfg + 6 | ||
37 | #define HvCallCfgGetPhysicalProcessors HvCallCfg + 7 | ||
38 | #define HvCallCfgGetMsChunks HvCallCfg + 9 | ||
39 | #define HvCallCfgGetSharedPoolIndex HvCallCfg + 20 | ||
40 | #define HvCallCfgGetSharedProcUnits HvCallCfg + 21 | ||
41 | #define HvCallCfgGetNumProcsInSharedPool HvCallCfg + 22 | ||
42 | #define HvCallCfgGetVirtualLanIndexMap HvCallCfg + 30 | ||
43 | #define HvCallCfgGetHostingLpIndex HvCallCfg + 32 | ||
44 | |||
45 | extern HvLpIndex HvLpConfig_getLpIndex_outline(void); | ||
46 | extern HvLpIndex HvLpConfig_getLpIndex(void); | ||
47 | extern HvLpIndex HvLpConfig_getPrimaryLpIndex(void); | ||
48 | |||
49 | static inline u64 HvLpConfig_getMsChunks(void) | ||
50 | { | ||
51 | return HvCall2(HvCallCfgGetMsChunks, HvLpConfig_getLpIndex(), | ||
52 | HvCallCfg_Cur); | ||
53 | } | ||
54 | |||
55 | static inline u64 HvLpConfig_getSystemPhysicalProcessors(void) | ||
56 | { | ||
57 | return HvCall0(HvCallCfgGetSystemPhysicalProcessors); | ||
58 | } | ||
59 | |||
60 | static inline u64 HvLpConfig_getNumProcsInSharedPool(HvLpSharedPoolIndex sPI) | ||
61 | { | ||
62 | return (u16)HvCall1(HvCallCfgGetNumProcsInSharedPool, sPI); | ||
63 | } | ||
64 | |||
65 | static inline u64 HvLpConfig_getPhysicalProcessors(void) | ||
66 | { | ||
67 | return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(), | ||
68 | HvCallCfg_Cur); | ||
69 | } | ||
70 | |||
71 | static inline HvLpSharedPoolIndex HvLpConfig_getSharedPoolIndex(void) | ||
72 | { | ||
73 | return HvCall1(HvCallCfgGetSharedPoolIndex, HvLpConfig_getLpIndex()); | ||
74 | } | ||
75 | |||
76 | static inline u64 HvLpConfig_getSharedProcUnits(void) | ||
77 | { | ||
78 | return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(), | ||
79 | HvCallCfg_Cur); | ||
80 | } | ||
81 | |||
82 | static inline u64 HvLpConfig_getMaxSharedProcUnits(void) | ||
83 | { | ||
84 | return HvCall2(HvCallCfgGetSharedProcUnits, HvLpConfig_getLpIndex(), | ||
85 | HvCallCfg_Max); | ||
86 | } | ||
87 | |||
88 | static inline u64 HvLpConfig_getMaxPhysicalProcessors(void) | ||
89 | { | ||
90 | return HvCall2(HvCallCfgGetPhysicalProcessors, HvLpConfig_getLpIndex(), | ||
91 | HvCallCfg_Max); | ||
92 | } | ||
93 | |||
94 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMapForLp( | ||
95 | HvLpIndex lp) | ||
96 | { | ||
97 | /* | ||
98 | * This is a new function in V5R1 so calls to this on older | ||
99 | * hypervisors will return -1 | ||
100 | */ | ||
101 | u64 retVal = HvCall1(HvCallCfgGetVirtualLanIndexMap, lp); | ||
102 | if (retVal == -1) | ||
103 | retVal = 0; | ||
104 | return retVal; | ||
105 | } | ||
106 | |||
107 | static inline HvLpVirtualLanIndexMap HvLpConfig_getVirtualLanIndexMap(void) | ||
108 | { | ||
109 | return HvLpConfig_getVirtualLanIndexMapForLp( | ||
110 | HvLpConfig_getLpIndex_outline()); | ||
111 | } | ||
112 | |||
113 | static inline int HvLpConfig_doLpsCommunicateOnVirtualLan(HvLpIndex lp1, | ||
114 | HvLpIndex lp2) | ||
115 | { | ||
116 | HvLpVirtualLanIndexMap virtualLanIndexMap1 = | ||
117 | HvLpConfig_getVirtualLanIndexMapForLp(lp1); | ||
118 | HvLpVirtualLanIndexMap virtualLanIndexMap2 = | ||
119 | HvLpConfig_getVirtualLanIndexMapForLp(lp2); | ||
120 | return ((virtualLanIndexMap1 & virtualLanIndexMap2) != 0); | ||
121 | } | ||
122 | |||
123 | static inline HvLpIndex HvLpConfig_getHostingLpIndex(HvLpIndex lp) | ||
124 | { | ||
125 | return HvCall1(HvCallCfgGetHostingLpIndex, lp); | ||
126 | } | ||
127 | |||
128 | #endif /* _ASM_POWERPC_ISERIES_HV_LP_CONFIG_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/hv_types.h b/arch/powerpc/include/asm/iseries/hv_types.h deleted file mode 100644 index c3e6d2a1d1c3..000000000000 --- a/arch/powerpc/include/asm/iseries/hv_types.h +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_ISERIES_HV_TYPES_H | ||
19 | #define _ASM_POWERPC_ISERIES_HV_TYPES_H | ||
20 | |||
21 | /* | ||
22 | * General typedefs for the hypervisor. | ||
23 | */ | ||
24 | |||
25 | #include <asm/types.h> | ||
26 | |||
27 | typedef u8 HvLpIndex; | ||
28 | typedef u16 HvLpInstanceId; | ||
29 | typedef u64 HvLpTOD; | ||
30 | typedef u64 HvLpSystemSerialNum; | ||
31 | typedef u8 HvLpDeviceSerialNum[12]; | ||
32 | typedef u16 HvLpSanHwSet; | ||
33 | typedef u16 HvLpBus; | ||
34 | typedef u16 HvLpBoard; | ||
35 | typedef u16 HvLpCard; | ||
36 | typedef u8 HvLpDeviceType[4]; | ||
37 | typedef u8 HvLpDeviceModel[3]; | ||
38 | typedef u64 HvIoToken; | ||
39 | typedef u8 HvLpName[8]; | ||
40 | typedef u32 HvIoId; | ||
41 | typedef u64 HvRealMemoryIndex; | ||
42 | typedef u32 HvLpIndexMap; /* Must hold HVMAXARCHITECTEDLPS bits!!! */ | ||
43 | typedef u16 HvLpVrmIndex; | ||
44 | typedef u32 HvXmGenerationId; | ||
45 | typedef u8 HvLpBusPool; | ||
46 | typedef u8 HvLpSharedPoolIndex; | ||
47 | typedef u16 HvLpSharedProcUnitsX100; | ||
48 | typedef u8 HvLpVirtualLanIndex; | ||
49 | typedef u16 HvLpVirtualLanIndexMap; /* Must hold HVMAXARCHITECTEDVIRTUALLANS bits!!! */ | ||
50 | typedef u16 HvBusNumber; /* Hypervisor Bus Number */ | ||
51 | typedef u8 HvSubBusNumber; /* Hypervisor SubBus Number */ | ||
52 | typedef u8 HvAgentId; /* Hypervisor DevFn */ | ||
53 | |||
54 | |||
55 | #define HVMAXARCHITECTEDLPS 32 | ||
56 | #define HVMAXARCHITECTEDVIRTUALLANS 16 | ||
57 | #define HVMAXARCHITECTEDVIRTUALDISKS 32 | ||
58 | #define HVMAXARCHITECTEDVIRTUALCDROMS 8 | ||
59 | #define HVMAXARCHITECTEDVIRTUALTAPES 8 | ||
60 | #define HVCHUNKSIZE (256 * 1024) | ||
61 | #define HVPAGESIZE (4 * 1024) | ||
62 | #define HVLPMINMEGSPRIMARY 256 | ||
63 | #define HVLPMINMEGSSECONDARY 64 | ||
64 | #define HVCHUNKSPERMEG 4 | ||
65 | #define HVPAGESPERMEG 256 | ||
66 | #define HVPAGESPERCHUNK 64 | ||
67 | |||
68 | #define HvLpIndexInvalid ((HvLpIndex)0xff) | ||
69 | |||
70 | /* | ||
71 | * Enums for the sub-components under PLIC | ||
72 | * Used in HvCall and HvPrimaryCall | ||
73 | */ | ||
74 | enum { | ||
75 | HvCallCompId = 0, | ||
76 | HvCallCpuCtlsCompId = 1, | ||
77 | HvCallCfgCompId = 2, | ||
78 | HvCallEventCompId = 3, | ||
79 | HvCallHptCompId = 4, | ||
80 | HvCallPciCompId = 5, | ||
81 | HvCallSlmCompId = 6, | ||
82 | HvCallSmCompId = 7, | ||
83 | HvCallSpdCompId = 8, | ||
84 | HvCallXmCompId = 9, | ||
85 | HvCallRioCompId = 10, | ||
86 | HvCallRsvd3CompId = 11, | ||
87 | HvCallRsvd2CompId = 12, | ||
88 | HvCallRsvd1CompId = 13, | ||
89 | HvCallMaxCompId = 14, | ||
90 | HvPrimaryCallCompId = 0, | ||
91 | HvPrimaryCallCfgCompId = 1, | ||
92 | HvPrimaryCallPciCompId = 2, | ||
93 | HvPrimaryCallSmCompId = 3, | ||
94 | HvPrimaryCallSpdCompId = 4, | ||
95 | HvPrimaryCallXmCompId = 5, | ||
96 | HvPrimaryCallRioCompId = 6, | ||
97 | HvPrimaryCallRsvd7CompId = 7, | ||
98 | HvPrimaryCallRsvd6CompId = 8, | ||
99 | HvPrimaryCallRsvd5CompId = 9, | ||
100 | HvPrimaryCallRsvd4CompId = 10, | ||
101 | HvPrimaryCallRsvd3CompId = 11, | ||
102 | HvPrimaryCallRsvd2CompId = 12, | ||
103 | HvPrimaryCallRsvd1CompId = 13, | ||
104 | HvPrimaryCallMaxCompId = HvCallMaxCompId | ||
105 | }; | ||
106 | |||
107 | struct HvLpBufferList { | ||
108 | u64 addr; | ||
109 | u64 len; | ||
110 | }; | ||
111 | |||
112 | #endif /* _ASM_POWERPC_ISERIES_HV_TYPES_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/it_lp_queue.h b/arch/powerpc/include/asm/iseries/it_lp_queue.h deleted file mode 100644 index 428278838821..000000000000 --- a/arch/powerpc/include/asm/iseries/it_lp_queue.h +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_ISERIES_IT_LP_QUEUE_H | ||
19 | #define _ASM_POWERPC_ISERIES_IT_LP_QUEUE_H | ||
20 | |||
21 | /* | ||
22 | * This control block defines the simple LP queue structure that is | ||
23 | * shared between the hypervisor (PLIC) and the OS in order to send | ||
24 | * events to an LP. | ||
25 | */ | ||
26 | |||
27 | #include <asm/types.h> | ||
28 | #include <asm/ptrace.h> | ||
29 | |||
30 | #define IT_LP_MAX_QUEUES 8 | ||
31 | |||
32 | #define IT_LP_NOT_USED 0 /* Queue will not be used by PLIC */ | ||
33 | #define IT_LP_DEDICATED_IO 1 /* Queue dedicated to IO processor specified */ | ||
34 | #define IT_LP_DEDICATED_LP 2 /* Queue dedicated to LP specified */ | ||
35 | #define IT_LP_SHARED 3 /* Queue shared for both IO and LP */ | ||
36 | |||
37 | #define IT_LP_EVENT_STACK_SIZE 4096 | ||
38 | #define IT_LP_EVENT_MAX_SIZE 256 | ||
39 | #define IT_LP_EVENT_ALIGN 64 | ||
40 | |||
41 | struct hvlpevent_queue { | ||
42 | /* | ||
43 | * The hq_current_event is the pointer to the next event stack entry | ||
44 | * that will become valid. The OS must peek at this entry to determine | ||
45 | * if it is valid. PLIC will set the valid indicator as the very last | ||
46 | * store into that entry. | ||
47 | * | ||
48 | * When the OS has completed processing of the event then it will mark | ||
49 | * the event as invalid so that PLIC knows it can store into that event | ||
50 | * location again. | ||
51 | * | ||
52 | * If the event stack fills and there are overflow events, then PLIC | ||
53 | * will set the hq_overflow_pending flag in which case the OS will | ||
54 | * have to fetch the additional LP events once they have drained the | ||
55 | * event stack. | ||
56 | * | ||
57 | * The first 16-bytes are known by both the OS and PLIC. The remainder | ||
58 | * of the cache line is for use by the OS. | ||
59 | */ | ||
60 | u8 hq_overflow_pending; /* 0x00 Overflow events are pending */ | ||
61 | u8 hq_status; /* 0x01 DedicatedIo or DedicatedLp or NotUsed */ | ||
62 | u16 hq_proc_index; /* 0x02 Logical Proc Index for correlation */ | ||
63 | u8 hq_reserved1[12]; /* 0x04 */ | ||
64 | char *hq_current_event; /* 0x10 */ | ||
65 | char *hq_last_event; /* 0x18 */ | ||
66 | char *hq_event_stack; /* 0x20 */ | ||
67 | u8 hq_index; /* 0x28 unique sequential index. */ | ||
68 | u8 hq_reserved2[3]; /* 0x29-2b */ | ||
69 | spinlock_t hq_lock; | ||
70 | }; | ||
71 | |||
72 | extern struct hvlpevent_queue hvlpevent_queue; | ||
73 | |||
74 | extern int hvlpevent_is_pending(void); | ||
75 | extern void process_hvlpevents(void); | ||
76 | extern void setup_hvlpevent_queue(void); | ||
77 | |||
78 | #endif /* _ASM_POWERPC_ISERIES_IT_LP_QUEUE_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/lpar_map.h b/arch/powerpc/include/asm/iseries/lpar_map.h deleted file mode 100644 index 5e9f3e128ee2..000000000000 --- a/arch/powerpc/include/asm/iseries/lpar_map.h +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Mike Corrigan IBM Corporation | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | #ifndef _ASM_POWERPC_ISERIES_LPAR_MAP_H | ||
19 | #define _ASM_POWERPC_ISERIES_LPAR_MAP_H | ||
20 | |||
21 | #ifndef __ASSEMBLY__ | ||
22 | |||
23 | #include <asm/types.h> | ||
24 | |||
25 | #endif | ||
26 | |||
27 | /* | ||
28 | * The iSeries hypervisor will set up mapping for one or more | ||
29 | * ESID/VSID pairs (in SLB/segment registers) and will set up | ||
30 | * mappings of one or more ranges of pages to VAs. | ||
31 | * We will have the hypervisor set up the ESID->VSID mapping | ||
32 | * for the four kernel segments (C-F). With shared processors, | ||
33 | * the hypervisor will clear all segment registers and reload | ||
34 | * these four whenever the processor is switched from one | ||
35 | * partition to another. | ||
36 | */ | ||
37 | |||
38 | /* The Vsid and Esid identified below will be used by the hypervisor | ||
39 | * to set up a memory mapping for part of the load area before giving | ||
40 | * control to the Linux kernel. The load area is 64 MB, but this must | ||
41 | * not attempt to map the whole load area. The Hashed Page Table may | ||
42 | * need to be located within the load area (if the total partition size | ||
43 | * is 64 MB), but cannot be mapped. Typically, this should specify | ||
44 | * to map half (32 MB) of the load area. | ||
45 | * | ||
46 | * The hypervisor will set up page table entries for the number of | ||
47 | * pages specified. | ||
48 | * | ||
49 | * In 32-bit mode, the hypervisor will load all four of the | ||
50 | * segment registers (identified by the low-order four bits of the | ||
51 | * Esid field. In 64-bit mode, the hypervisor will load one SLB | ||
52 | * entry to map the Esid to the Vsid. | ||
53 | */ | ||
54 | |||
55 | #define HvEsidsToMap 2 | ||
56 | #define HvRangesToMap 1 | ||
57 | |||
58 | /* Hypervisor initially maps 32MB of the load area */ | ||
59 | #define HvPagesToMap 8192 | ||
60 | |||
61 | #ifndef __ASSEMBLY__ | ||
62 | struct LparMap { | ||
63 | u64 xNumberEsids; // Number of ESID/VSID pairs | ||
64 | u64 xNumberRanges; // Number of VA ranges to map | ||
65 | u64 xSegmentTableOffs; // Page number within load area of seg table | ||
66 | u64 xRsvd[5]; | ||
67 | struct { | ||
68 | u64 xKernelEsid; // Esid used to map kernel load | ||
69 | u64 xKernelVsid; // Vsid used to map kernel load | ||
70 | } xEsids[HvEsidsToMap]; | ||
71 | struct { | ||
72 | u64 xPages; // Number of pages to be mapped | ||
73 | u64 xOffset; // Offset from start of load area | ||
74 | u64 xVPN; // Virtual Page Number | ||
75 | } xRanges[HvRangesToMap]; | ||
76 | }; | ||
77 | |||
78 | extern const struct LparMap xLparMap; | ||
79 | |||
80 | #endif /* __ASSEMBLY__ */ | ||
81 | |||
82 | /* the fixed address where the LparMap exists */ | ||
83 | #define LPARMAP_PHYS 0x7000 | ||
84 | |||
85 | #endif /* _ASM_POWERPC_ISERIES_LPAR_MAP_H */ | ||
diff --git a/arch/powerpc/include/asm/iseries/mf.h b/arch/powerpc/include/asm/iseries/mf.h deleted file mode 100644 index eb851a9c9e5c..000000000000 --- a/arch/powerpc/include/asm/iseries/mf.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Troy D. Armstrong IBM Corporation | ||
3 | * Copyright (C) 2004 Stephen Rothwell IBM Corporation | ||
4 | * | ||
5 | * This modules exists as an interface between a Linux secondary partition | ||
6 | * running on an iSeries and the primary partition's Virtual Service | ||
7 | * Processor (VSP) object. The VSP has final authority over powering on/off | ||
8 | * all partitions in the iSeries. It also provides miscellaneous low-level | ||
9 | * machine facility type operations. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | * This program is distributed in the hope that it will be useful, | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
19 | * GNU General Public License for more details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
24 | */ | ||
25 | #ifndef _ASM_POWERPC_ISERIES_MF_H | ||
26 | #define _ASM_POWERPC_ISERIES_MF_H | ||
27 | |||
28 | #include <linux/types.h> | ||
29 | |||
30 | #include <asm/iseries/hv_types.h> | ||
31 | #include <asm/iseries/hv_call_event.h> | ||
32 | |||
33 | struct rtc_time; | ||
34 | |||
35 | typedef void (*MFCompleteHandler)(void *clientToken, int returnCode); | ||
36 | |||
37 | extern void mf_allocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type, | ||
38 | unsigned size, unsigned amount, MFCompleteHandler hdlr, | ||
39 | void *userToken); | ||
40 | extern void mf_deallocate_lp_events(HvLpIndex targetLp, HvLpEvent_Type type, | ||
41 | unsigned count, MFCompleteHandler hdlr, void *userToken); | ||
42 | |||
43 | extern void mf_power_off(void); | ||
44 | extern void mf_reboot(char *cmd); | ||
45 | |||
46 | extern void mf_display_src(u32 word); | ||
47 | extern void mf_display_progress(u16 value); | ||
48 | |||
49 | extern void mf_init(void); | ||
50 | |||
51 | #endif /* _ASM_POWERPC_ISERIES_MF_H */ | ||