Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2493
b: refs/heads/master
c: 45dc76a
h: refs/heads/master
i:
  2491: c1cd6b5
v: v3
  • Loading branch information
Stephen Rothwell authored and Linus Torvalds committed Jun 22, 2005
1 parent a60b764 commit b8324ae
Show file tree
Hide file tree
Showing 13 changed files with 645 additions and 754 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e3e4a1c4dade7872fdb04a5e735ae26d8e2fbfb
refs/heads/master: 45dc76aaf63fc336527da80337d3e3684f50f387
100 changes: 44 additions & 56 deletions trunk/include/asm-ppc64/iSeries/HvCall.h
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
/*
* HvCall.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.
//
//===========================================================================
/*
* This file contains the "hypervisor call" interface which is used to
* drive the hypervisor from the OS.
*/
#ifndef _HVCALL_H
#define _HVCALL_H

//-------------------------------------------------------------------
// Standard Includes
//-------------------------------------------------------------------
#include <asm/iSeries/HvCallSc.h>
#include <asm/iSeries/HvTypes.h>
#include <asm/paca.h>
Expand Down Expand Up @@ -76,17 +70,17 @@ enum HvCall_VaryOffChunkRc
*/

/* Type of yield for HvCallBaseYieldProcessor */
#define HvCall_YieldTimed 0 // Yield until specified time (tb)
#define HvCall_YieldToActive 1 // Yield until all active procs have run
#define HvCall_YieldToProc 2 // Yield until the specified processor has run
#define HvCall_YieldTimed 0 /* Yield until specified time (tb) */
#define HvCall_YieldToActive 1 /* Yield until all active procs have run */
#define HvCall_YieldToProc 2 /* Yield until the specified processor has run */

/* interrupt masks for setEnabledInterrupts */
#define HvCall_MaskIPI 0x00000001
#define HvCall_MaskLpEvent 0x00000002
#define HvCall_MaskLpProd 0x00000004
#define HvCall_MaskTimeout 0x00000008

/* Log buffer formats */
/* Log buffer formats */
#define HvCall_LogBuffer_ASCII 0
#define HvCall_LogBuffer_EBCDIC 1

Expand All @@ -95,7 +89,7 @@ enum HvCall_VaryOffChunkRc
#define HvCallBaseGetHwPatch HvCallBase + 2
#define HvCallBaseReIplSpAttn HvCallBase + 3
#define HvCallBaseSetASR HvCallBase + 4
#define HvCallBaseSetASRAndRfi HvCallBase + 5
#define HvCallBaseSetASRAndRfi HvCallBase + 5
#define HvCallBaseSetIMR HvCallBase + 6
#define HvCallBaseSendIPI HvCallBase + 7
#define HvCallBaseTerminateMachine HvCallBase + 8
Expand All @@ -115,81 +109,75 @@ enum HvCall_VaryOffChunkRc
#define HvCallBaseGetLogBufferCodePage HvCallBase + 22
#define HvCallBaseGetLogBufferFormat HvCallBase + 23
#define HvCallBaseGetLogBufferLength HvCallBase + 24
#define HvCallBaseReadLogBuffer HvCallBase + 25
#define HvCallBaseReadLogBuffer HvCallBase + 25
#define HvCallBaseSetLogBufferFormatAndCodePage HvCallBase + 26
#define HvCallBaseWriteLogBuffer HvCallBase + 27
#define HvCallBaseWriteLogBuffer HvCallBase + 27
#define HvCallBaseRouter28 HvCallBase + 28
#define HvCallBaseRouter29 HvCallBase + 29
#define HvCallBaseRouter30 HvCallBase + 30
#define HvCallBaseSetDebugBus HvCallBase + 31
#define HvCallBaseSetDebugBus HvCallBase + 31

#define HvCallCcSetDABR HvCallCc + 7
#define HvCallCcSetDABR HvCallCc + 7

//=====================================================================================
static inline void HvCall_setVirtualDecr(void)
static inline void HvCall_setVirtualDecr(void)
{
/* Ignore any error return codes - most likely means that the target value for the
* LP has been increased and this vary off would bring us below the new target. */
/*
* Ignore any error return codes - most likely means that the
* target value for the LP has been increased and this vary off
* would bring us below the new target.
*/
HvCall0(HvCallBaseSetVirtualDecr);
}
//=====================================================================
static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm)

static inline void HvCall_yieldProcessor(unsigned typeOfYield, u64 yieldParm)
{
HvCall2( HvCallBaseYieldProcessor, typeOfYield, yieldParm );
HvCall2(HvCallBaseYieldProcessor, typeOfYield, yieldParm);
}
//=====================================================================
static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts)

static inline void HvCall_setEnabledInterrupts(u64 enabledInterrupts)
{
HvCall1(HvCallBaseSetEnabledInterrupts,enabledInterrupts);
HvCall1(HvCallBaseSetEnabledInterrupts, enabledInterrupts);
}

//=====================================================================
static inline void HvCall_clearLogBuffer(HvLpIndex lpindex)
static inline void HvCall_clearLogBuffer(HvLpIndex lpindex)
{
HvCall1(HvCallBaseClearLogBuffer,lpindex);
HvCall1(HvCallBaseClearLogBuffer, lpindex);
}

//=====================================================================
static inline u32 HvCall_getLogBufferCodePage(HvLpIndex lpindex)
static inline u32 HvCall_getLogBufferCodePage(HvLpIndex lpindex)
{
u32 retVal = HvCall1(HvCallBaseGetLogBufferCodePage,lpindex);
u32 retVal = HvCall1(HvCallBaseGetLogBufferCodePage, lpindex);
return retVal;
}

//=====================================================================
static inline int HvCall_getLogBufferFormat(HvLpIndex lpindex)
static inline int HvCall_getLogBufferFormat(HvLpIndex lpindex)
{
int retVal = HvCall1(HvCallBaseGetLogBufferFormat,lpindex);
int retVal = HvCall1(HvCallBaseGetLogBufferFormat, lpindex);
return retVal;
}

//=====================================================================
static inline u32 HvCall_getLogBufferLength(HvLpIndex lpindex)
static inline u32 HvCall_getLogBufferLength(HvLpIndex lpindex)
{
u32 retVal = HvCall1(HvCallBaseGetLogBufferLength,lpindex);
u32 retVal = HvCall1(HvCallBaseGetLogBufferLength, lpindex);
return retVal;
}

//=====================================================================
static inline void HvCall_setLogBufferFormatAndCodepage(int format, u32 codePage)
static inline void HvCall_setLogBufferFormatAndCodepage(int format, u32 codePage)
{
HvCall2(HvCallBaseSetLogBufferFormatAndCodePage,format, codePage);
HvCall2(HvCallBaseSetLogBufferFormatAndCodePage, format, codePage);
}

//=====================================================================
int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen);
void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);
extern int HvCall_readLogBuffer(HvLpIndex lpindex, void *buffer, u64 bufLen);
extern void HvCall_writeLogBuffer(const void *buffer, u64 bufLen);

//=====================================================================
static inline void HvCall_sendIPI(struct paca_struct * targetPaca)
static inline void HvCall_sendIPI(struct paca_struct *targetPaca)
{
HvCall1( HvCallBaseSendIPI, targetPaca->paca_index );
HvCall1(HvCallBaseSendIPI, targetPaca->paca_index);
}

//=====================================================================
static inline void HvCall_terminateMachineSrc(void)
static inline void HvCall_terminateMachineSrc(void)
{
HvCall0( HvCallBaseTerminateMachineSrc );
HvCall0(HvCallBaseTerminateMachineSrc);
}

static inline void HvCall_setDABR(unsigned long val)
Expand Down
Loading

0 comments on commit b8324ae

Please sign in to comment.