| .. | .. |
|---|
| 82 | 82 | |
|---|
| 83 | 83 | #endif |
|---|
| 84 | 84 | |
|---|
| 85 | | -static inline event_word_t *event_word_from_port(unsigned port) |
|---|
| 85 | +static inline event_word_t *event_word_from_port(evtchn_port_t port) |
|---|
| 86 | 86 | { |
|---|
| 87 | 87 | unsigned i = port / EVENT_WORDS_PER_PAGE; |
|---|
| 88 | 88 | |
|---|
| .. | .. |
|---|
| 138 | 138 | array_page[i] = 1 << EVTCHN_FIFO_MASKED; |
|---|
| 139 | 139 | } |
|---|
| 140 | 140 | |
|---|
| 141 | | -static int evtchn_fifo_setup(struct irq_info *info) |
|---|
| 141 | +static int evtchn_fifo_setup(evtchn_port_t port) |
|---|
| 142 | 142 | { |
|---|
| 143 | | - unsigned port = info->evtchn; |
|---|
| 144 | 143 | unsigned new_array_pages; |
|---|
| 145 | 144 | int ret; |
|---|
| 146 | 145 | |
|---|
| .. | .. |
|---|
| 186 | 185 | return ret; |
|---|
| 187 | 186 | } |
|---|
| 188 | 187 | |
|---|
| 189 | | -static void evtchn_fifo_bind_to_cpu(struct irq_info *info, unsigned cpu) |
|---|
| 188 | +static void evtchn_fifo_bind_to_cpu(evtchn_port_t evtchn, unsigned int cpu, |
|---|
| 189 | + unsigned int old_cpu) |
|---|
| 190 | 190 | { |
|---|
| 191 | 191 | /* no-op */ |
|---|
| 192 | 192 | } |
|---|
| 193 | 193 | |
|---|
| 194 | | -static void evtchn_fifo_clear_pending(unsigned port) |
|---|
| 194 | +static void evtchn_fifo_clear_pending(evtchn_port_t port) |
|---|
| 195 | 195 | { |
|---|
| 196 | 196 | event_word_t *word = event_word_from_port(port); |
|---|
| 197 | 197 | sync_clear_bit(EVTCHN_FIFO_BIT(PENDING, word), BM(word)); |
|---|
| 198 | 198 | } |
|---|
| 199 | 199 | |
|---|
| 200 | | -static void evtchn_fifo_set_pending(unsigned port) |
|---|
| 200 | +static void evtchn_fifo_set_pending(evtchn_port_t port) |
|---|
| 201 | 201 | { |
|---|
| 202 | 202 | event_word_t *word = event_word_from_port(port); |
|---|
| 203 | 203 | sync_set_bit(EVTCHN_FIFO_BIT(PENDING, word), BM(word)); |
|---|
| 204 | 204 | } |
|---|
| 205 | 205 | |
|---|
| 206 | | -static bool evtchn_fifo_is_pending(unsigned port) |
|---|
| 206 | +static bool evtchn_fifo_is_pending(evtchn_port_t port) |
|---|
| 207 | 207 | { |
|---|
| 208 | 208 | event_word_t *word = event_word_from_port(port); |
|---|
| 209 | 209 | return sync_test_bit(EVTCHN_FIFO_BIT(PENDING, word), BM(word)); |
|---|
| 210 | 210 | } |
|---|
| 211 | 211 | |
|---|
| 212 | | -static void evtchn_fifo_mask(unsigned port) |
|---|
| 212 | +static void evtchn_fifo_mask(evtchn_port_t port) |
|---|
| 213 | 213 | { |
|---|
| 214 | 214 | event_word_t *word = event_word_from_port(port); |
|---|
| 215 | 215 | sync_set_bit(EVTCHN_FIFO_BIT(MASKED, word), BM(word)); |
|---|
| 216 | 216 | } |
|---|
| 217 | 217 | |
|---|
| 218 | | -static bool evtchn_fifo_is_masked(unsigned port) |
|---|
| 218 | +static bool evtchn_fifo_is_masked(evtchn_port_t port) |
|---|
| 219 | 219 | { |
|---|
| 220 | 220 | event_word_t *word = event_word_from_port(port); |
|---|
| 221 | 221 | return sync_test_bit(EVTCHN_FIFO_BIT(MASKED, word), BM(word)); |
|---|
| .. | .. |
|---|
| 231 | 231 | w = *word; |
|---|
| 232 | 232 | |
|---|
| 233 | 233 | do { |
|---|
| 234 | + if (!(w & (1 << EVTCHN_FIFO_MASKED))) |
|---|
| 235 | + return true; |
|---|
| 236 | + |
|---|
| 234 | 237 | if (w & (1 << EVTCHN_FIFO_PENDING)) |
|---|
| 235 | 238 | return false; |
|---|
| 236 | 239 | |
|---|
| .. | .. |
|---|
| 242 | 245 | return true; |
|---|
| 243 | 246 | } |
|---|
| 244 | 247 | |
|---|
| 245 | | -static void evtchn_fifo_unmask(unsigned port) |
|---|
| 248 | +static void evtchn_fifo_unmask(evtchn_port_t port) |
|---|
| 246 | 249 | { |
|---|
| 247 | 250 | event_word_t *word = event_word_from_port(port); |
|---|
| 248 | 251 | |
|---|
| .. | .. |
|---|
| 275 | 278 | { |
|---|
| 276 | 279 | struct evtchn_fifo_queue *q = &per_cpu(cpu_queue, cpu); |
|---|
| 277 | 280 | uint32_t head; |
|---|
| 278 | | - unsigned port; |
|---|
| 281 | + evtchn_port_t port; |
|---|
| 279 | 282 | event_word_t *word; |
|---|
| 280 | 283 | |
|---|
| 281 | 284 | head = q->head[priority]; |
|---|