diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2006-01-11 21:47:43 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-12 04:09:29 -0500 |
commit | 677f8c0d0455a35aaff08a0292ba9c6232ef4eb1 (patch) | |
tree | ebac30f3413ecc2eeb2b1f8788b379ac6b56a237 /include | |
parent | 6814350b80e0e7dfb87d2faebbcbef876573897c (diff) |
[PATCH] powerpc: remove bitfields from HvLpEvent
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-powerpc/iseries/hv_lp_event.h | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/include/asm-powerpc/iseries/hv_lp_event.h b/include/asm-powerpc/iseries/hv_lp_event.h index 499ab1ad0185..8ee89b67b8fd 100644 --- a/include/asm-powerpc/iseries/hv_lp_event.h +++ b/include/asm-powerpc/iseries/hv_lp_event.h | |||
@@ -32,17 +32,8 @@ | |||
32 | * partitions through PLIC. | 32 | * partitions through PLIC. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | struct HvEventFlags { | ||
36 | u8 xValid:1; /* Indicates a valid request x00-x00 */ | ||
37 | u8 xRsvd1:4; /* Reserved ... */ | ||
38 | u8 xAckType:1; /* Immediate or deferred ... */ | ||
39 | u8 xAckInd:1; /* Indicates if ACK required ... */ | ||
40 | u8 xFunction:1; /* Interrupt or Acknowledge ... */ | ||
41 | }; | ||
42 | |||
43 | |||
44 | struct HvLpEvent { | 35 | struct HvLpEvent { |
45 | struct HvEventFlags xFlags; /* Event flags x00-x00 */ | 36 | u8 flags; /* Event flags x00-x00 */ |
46 | u8 xType; /* Type of message x01-x01 */ | 37 | u8 xType; /* Type of message x01-x01 */ |
47 | u16 xSubtype; /* Subtype for event x02-x03 */ | 38 | u16 xSubtype; /* Subtype for event x02-x03 */ |
48 | u8 xSourceLp; /* Source LP x04-x04 */ | 39 | u8 xSourceLp; /* Source LP x04-x04 */ |
@@ -126,6 +117,11 @@ extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex); | |||
126 | #define HvLpEvent_AckType_ImmediateAck 0 | 117 | #define HvLpEvent_AckType_ImmediateAck 0 |
127 | #define HvLpEvent_AckType_DeferredAck 1 | 118 | #define HvLpEvent_AckType_DeferredAck 1 |
128 | 119 | ||
120 | #define HV_LP_EVENT_INT 0x01 | ||
121 | #define HV_LP_EVENT_DO_ACK 0x02 | ||
122 | #define HV_LP_EVENT_DEFERRED_ACK 0x04 | ||
123 | #define HV_LP_EVENT_VALID 0x80 | ||
124 | |||
129 | #define HvLpDma_Direction_LocalToRemote 0 | 125 | #define HvLpDma_Direction_LocalToRemote 0 |
130 | #define HvLpDma_Direction_RemoteToLocal 1 | 126 | #define HvLpDma_Direction_RemoteToLocal 1 |
131 | 127 | ||
@@ -139,4 +135,29 @@ extern int HvLpEvent_closePath(HvLpEvent_Type eventType, HvLpIndex lpIndex); | |||
139 | #define HvLpDma_Rc_InvalidAddress 4 | 135 | #define HvLpDma_Rc_InvalidAddress 4 |
140 | #define HvLpDma_Rc_InvalidLength 5 | 136 | #define HvLpDma_Rc_InvalidLength 5 |
141 | 137 | ||
138 | static inline int hvlpevent_is_valid(struct HvLpEvent *h) | ||
139 | { | ||
140 | return h->flags & HV_LP_EVENT_VALID; | ||
141 | } | ||
142 | |||
143 | static inline void hvlpevent_invalidate(struct HvLpEvent *h) | ||
144 | { | ||
145 | h->flags &= ~ HV_LP_EVENT_VALID; | ||
146 | } | ||
147 | |||
148 | static inline int hvlpevent_is_int(struct HvLpEvent *h) | ||
149 | { | ||
150 | return h->flags & HV_LP_EVENT_INT; | ||
151 | } | ||
152 | |||
153 | static inline int hvlpevent_is_ack(struct HvLpEvent *h) | ||
154 | { | ||
155 | return !hvlpevent_is_int(h); | ||
156 | } | ||
157 | |||
158 | static inline int hvlpevent_need_ack(struct HvLpEvent *h) | ||
159 | { | ||
160 | return h->flags & HV_LP_EVENT_DO_ACK; | ||
161 | } | ||
162 | |||
142 | #endif /* _ASM_POWERPC_ISERIES_HV_LP_EVENT_H */ | 163 | #endif /* _ASM_POWERPC_ISERIES_HV_LP_EVENT_H */ |