/* Define Ki scale page to be traditional 4KB page */
#define ULTRA_MEMORY_PAGE_Ki (ULTRA_MEMORY_PAGE_WORD * ULTRA_MEMORY_COUNT_Ki)
-typedef struct _ULTRA_SEGMENT_STATE {
+struct ultra_segment_state {
u16 Enabled:1; /* Bit 0: May enter other states */
u16 Active:1; /* Bit 1: Assigned to active partition */
u16 Alive:1; /* Bit 2: Configure message sent to
* operating */
/* Note: don't use high bit unless we need to switch to ushort
* which is non-compliant */
-} ULTRA_SEGMENT_STATE;
-static const ULTRA_SEGMENT_STATE SegmentStateRunning = {
+};
+static const struct ultra_segment_state SegmentStateRunning = {
1, 1, 1, 0, 1, 1, 1, 1
};
-static const ULTRA_SEGMENT_STATE SegmentStatePaused = {
+static const struct ultra_segment_state SegmentStatePaused = {
1, 1, 1, 0, 1, 1, 1, 0
};
-static const ULTRA_SEGMENT_STATE SegmentStateStandby = {
+static const struct ultra_segment_state SegmentStateStandby = {
1, 1, 0, 0, 1, 1, 1, 0
};
typedef union {
} reconfigureDevice; /* for CONTROLVM_DEVICE_RECONFIGURE */
struct {
u32 busNo;
- ULTRA_SEGMENT_STATE state;
+ struct ultra_segment_state state;
u8 reserved[2]; /* Natural alignment purposes */
} busChangeState; /* for CONTROLVM_BUS_CHANGESTATE */
struct {
u32 busNo;
u32 devNo;
- ULTRA_SEGMENT_STATE state;
+ struct ultra_segment_state state;
struct {
u32 physicalDevice:1; /* =1 if message is for
* a physical device */
struct {
u32 busNo;
u32 devNo;
- ULTRA_SEGMENT_STATE state;
+ struct ultra_segment_state state;
u8 reserved[6]; /* Natural alignment purposes */
} deviceChangeStateEvent; /* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
struct {
static void controlvm_respond_chipset_init(CONTROLVM_MESSAGE_HEADER *msgHdr,
int response,
ULTRA_CHIPSET_FEATURE features);
-static void controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER *
- msgHdr, int response,
- ULTRA_SEGMENT_STATE state);
+static void controlvm_respond_physdev_changestate(
+ CONTROLVM_MESSAGE_HEADER *msgHdr, int response,
+ struct ultra_segment_state state);
static ssize_t toolaction_show(struct device *dev,
struct device_attribute *attr,
static void
controlvm_respond_physdev_changestate(CONTROLVM_MESSAGE_HEADER *msgHdr,
- int response, ULTRA_SEGMENT_STATE state)
+ int response, struct ultra_segment_state
+ state)
{
CONTROLVM_MESSAGE outmsg;
static void
device_changestate_responder(CONTROLVM_ID cmdId,
ulong busNo, ulong devNo, int response,
- ULTRA_SEGMENT_STATE responseState)
+ struct ultra_segment_state responseState)
{
VISORCHIPSET_DEVICE_INFO *p = NULL;
CONTROLVM_MESSAGE outmsg;
}
static void
-device_epilog(u32 busNo, u32 devNo, ULTRA_SEGMENT_STATE state, u32 cmd,
+device_epilog(u32 busNo, u32 devNo, struct ultra_segment_state state, u32 cmd,
CONTROLVM_MESSAGE_HEADER *msgHdr, int response,
BOOL needResponse, BOOL for_visorbus)
{
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg->cmd;
ulong busNo = cmd->deviceChangeState.busNo;
ulong devNo = cmd->deviceChangeState.devNo;
- ULTRA_SEGMENT_STATE state = cmd->deviceChangeState.state;
+ struct ultra_segment_state state = cmd->deviceChangeState.state;
VISORCHIPSET_DEVICE_INFO *pDevInfo = NULL;
int rc = CONTROLVM_RESP_SUCCESS;