aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
diff options
context:
space:
mode:
authorKelly Daly <kelly@au.ibm.com>2005-11-01 00:59:20 -0500
committerKelly Daly <kelly@au.ibm.com>2005-11-01 00:59:20 -0500
commit1da44037883c0405154d53fe76da27e078456664 (patch)
treedb6f579831b89c55e0e0c095345b4d1e5bdd0500 /include/asm-powerpc
parente2f2e58e7968f8446b1078a20a18bf8ea12b4fbc (diff)
merge filename and modify references to iseries/hv_call.h
Signed-off-by: Kelly Daly <kelly@au.ibm.com>
Diffstat (limited to 'include/asm-powerpc')
-rw-r--r--include/asm-powerpc/iseries/hv_call.h113
-rw-r--r--include/asm-powerpc/time.h2
2 files changed, 114 insertions, 1 deletions
diff --git a/include/asm-powerpc/iseries/hv_call.h b/include/asm-powerpc/iseries/hv_call.h
new file mode 100644
index 000000000000..c3f19475c0d9
--- /dev/null
+++ b/include/asm-powerpc/iseries/hv_call.h
@@ -0,0 +1,113 @@
1/*
2 * HvCall.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 _HVCALL_H
24#define _HVCALL_H
25
26#include <asm/iSeries/HvCallSc.h>
27#include <asm/iSeries/HvTypes.h>
28#include <asm/paca.h>
29
30/* Type of yield for HvCallBaseYieldProcessor */
31#define HvCall_YieldTimed 0 /* Yield until specified time (tb) */
32#define HvCall_YieldToActive 1 /* Yield until all active procs have run */
33#define HvCall_YieldToProc 2 /* Yield until the specified processor has run */
34
35/* interrupt masks for setEnabledInterrupts */
36#define HvCall_MaskIPI 0x00000001
37#define HvCall_MaskLpEvent 0x00000002
38#define HvCall_MaskLpProd 0x00000004
39#define HvCall_MaskTimeout 0x00000008
40
41/* Log buffer formats */
42#define HvCall_LogBuffer_ASCII 0
43#define HvCall_LogBuffer_EBCDIC 1
44
45#define HvCallBaseAckDeferredInts HvCallBase + 0
46#define HvCallBaseCpmPowerOff HvCallBase + 1
47#define HvCallBaseGetHwPatch HvCallBase + 2
48#define HvCallBaseReIplSpAttn HvCallBase + 3
49#define HvCallBaseSetASR HvCallBase + 4
50#define HvCallBaseSetASRAndRfi HvCallBase + 5
51#define HvCallBaseSetIMR HvCallBase + 6
52#define HvCallBaseSendIPI HvCallBase + 7
53#define HvCallBaseTerminateMachine HvCallBase + 8
54#define HvCallBaseTerminateMachineSrc HvCallBase + 9
55#define HvCallBaseProcessPlicInterrupts HvCallBase + 10
56#define HvCallBaseIsPrimaryCpmOrMsdIpl HvCallBase + 11
57#define HvCallBaseSetVirtualSIT HvCallBase + 12
58#define HvCallBaseVaryOffThisProcessor HvCallBase + 13
59#define HvCallBaseVaryOffMemoryChunk HvCallBase + 14
60#define HvCallBaseVaryOffInteractivePercentage HvCallBase + 15
61#define HvCallBaseSendLpProd HvCallBase + 16
62#define HvCallBaseSetEnabledInterrupts HvCallBase + 17
63#define HvCallBaseYieldProcessor HvCallBase + 18
64#define HvCallBaseVaryOffSharedProcUnits HvCallBase + 19
65#define HvCallBaseSetVirtualDecr HvCallBase + 20
66#define HvCallBaseClearLogBuffer HvCallBase + 21
67#define HvCallBaseGetLogBufferCodePage HvCallBase + 22
68#define HvCallBaseGetLogBufferFormat HvCallBase + 23
69#define HvCallBaseGetLogBufferLength HvCallBase + 24
70#define HvCallBaseReadLogBuffer HvCallBase + 25
71#define HvCallBaseSetLogBufferFormatAndCodePage HvCallBase + 26
72#define HvCallBaseWriteLogBuffer HvCallBase + 27
73#define HvCallBaseRouter28 HvCallBase + 28
74#define HvCallBaseRouter29 HvCallBase + 29
75#define HvCallBaseRouter30 HvCallBase + 30
76#define HvCallBaseSetDebugBus HvCallBase + 31
77
78#define HvCallCcSetDABR HvCallCc + 7
79
80static inline void HvCall_setVirtualDecr(void)
81{
82 /*
83 * Ignore any error return codes - most likely means that the
84 * target value for the LP has been increased and this vary off
85 * would bring us below the new target.
86 */
87 HvCall0(HvCallBaseSetVirtualDecr);
88}
89
90static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm)
91{
92 HvCall2(HvCallBaseYieldProcessor, typeOfYield, yieldParm);
93}
94
95static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts)
96{
97 HvCall1(HvCallBaseSetEnabledInterrupts, enabledInterrupts);
98}
99
100static inline void HvCall_setLogBufferFormatAndCodepage(int format,
101 u32 codePage)
102{
103 HvCall2(HvCallBaseSetLogBufferFormatAndCodePage, format, codePage);
104}
105
106extern void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);
107
108static inline void HvCall_sendIPI(struct paca_struct *targetPaca)
109{
110 HvCall1(HvCallBaseSendIPI, targetPaca->paca_index);
111}
112
113#endif /* _HVCALL_H */
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index 410e795f7d43..d9b86a17271b 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -21,7 +21,7 @@
21#include <asm/processor.h> 21#include <asm/processor.h>
22#ifdef CONFIG_PPC64 22#ifdef CONFIG_PPC64
23#include <asm/paca.h> 23#include <asm/paca.h>
24#include <asm/iSeries/HvCall.h> 24#include <asm/iseries/hv_call.h>
25#endif 25#endif
26 26
27/* time.c */ 27/* time.c */