Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / drivers / staging / unisys / common-spar / include / channels / controlframework.h
1 /* Copyright (C) 2010 - 2013 UNISYS CORPORATION
2  * All rights reserved.
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 (at
7  * your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
12  * NON INFRINGEMENT.  See the GNU General Public License for more
13  * details.
14  */
15
16 /*
17  * Module Name:
18  *  controlframework.h
19  *
20  * Abstract: This file defines common structures in the unmanaged
21  *           Ultravisor (mostly EFI) space.
22  *
23  */
24
25 #ifndef _CONTROL_FRAMEWORK_H_
26 #define _CONTROL_FRAMEWORK_H_
27
28 #include <linux/types.h>
29 #include "channel.h"
30
31 struct spar_segment_state  {
32         u16 enabled:1;          /* Bit 0: May enter other states */
33         u16 active:1;           /* Bit 1: Assigned to active partition */
34         u16 alive:1;            /* Bit 2: Configure message sent to
35                                  * service/server */
36         u16 revoked:1;          /* Bit 3: similar to partition state
37                                  * ShuttingDown */
38         u16 allocated:1;        /* Bit 4: memory (device/port number)
39                                  * has been selected by Command */
40         u16 known:1;            /* Bit 5: has been introduced to the
41                                  * service/guest partition */
42         u16 ready:1;            /* Bit 6: service/Guest partition has
43                                  * responded to introduction */
44         u16 operating:1;        /* Bit 7: resource is configured and
45                                  * operating */
46         /* Note: don't use high bit unless we need to switch to ushort
47          * which is non-compliant */
48 };
49
50 static const struct spar_segment_state segment_state_running = {
51         1, 1, 1, 0, 1, 1, 1, 1
52 };
53
54 static const struct spar_segment_state segment_state_paused = {
55         1, 1, 1, 0, 1, 1, 1, 0
56 };
57
58 static const struct spar_segment_state segment_state_standby = {
59         1, 1, 0, 0, 1, 1, 1, 0
60 };
61
62 #endif                          /* _CONTROL_FRAMEWORK_H_ not defined */