Lines Matching refs:state

56     IRQMPState *state;  member
72 static void grlib_irqmp_check_irqs(IRQMPState *state) in grlib_irqmp_check_irqs() argument
79 assert(state != NULL); in grlib_irqmp_check_irqs()
80 assert(state->parent != NULL); in grlib_irqmp_check_irqs()
83 pend = (state->pending | state->force[0]) in grlib_irqmp_check_irqs()
84 & state->mask[0]; in grlib_irqmp_check_irqs()
86 level0 = pend & ~state->level; in grlib_irqmp_check_irqs()
87 level1 = pend & state->level; in grlib_irqmp_check_irqs()
89 trace_grlib_irqmp_check_irqs(state->pending, state->force[0], in grlib_irqmp_check_irqs()
90 state->mask[0], level1, level0); in grlib_irqmp_check_irqs()
92 set_pil_in = (set_pil_in_fn)state->parent->set_pil_in; in grlib_irqmp_check_irqs()
96 set_pil_in(state->parent->set_pil_in_opaque, level1); in grlib_irqmp_check_irqs()
98 set_pil_in(state->parent->set_pil_in_opaque, level0); in grlib_irqmp_check_irqs()
106 IRQMPState *state; in grlib_irqmp_ack() local
117 state = irqmp->state; in grlib_irqmp_ack()
118 assert(state != NULL); in grlib_irqmp_ack()
126 state->pending &= ~mask; in grlib_irqmp_ack()
127 state->force[0] &= ~mask; /* Only CPU 0 (No SMP support) */ in grlib_irqmp_ack()
129 grlib_irqmp_check_irqs(state); in grlib_irqmp_ack()
143 s = irqmp->state; in grlib_irqmp_set_irq()
167 IRQMPState *state; in grlib_irqmp_readl() local
170 state = irqmp->state; in grlib_irqmp_readl()
171 assert(state != NULL); in grlib_irqmp_readl()
178 return state->level; in grlib_irqmp_readl()
181 return state->pending; in grlib_irqmp_readl()
185 return state->force[0]; in grlib_irqmp_readl()
193 return state->broadcast; in grlib_irqmp_readl()
204 return state->mask[cpu]; in grlib_irqmp_readl()
212 return state->force[cpu]; in grlib_irqmp_readl()
220 return state->extended[cpu]; in grlib_irqmp_readl()
231 IRQMPState *state; in grlib_irqmp_writel() local
234 state = irqmp->state; in grlib_irqmp_writel()
235 assert(state != NULL); in grlib_irqmp_writel()
243 state->level = value; in grlib_irqmp_writel()
254 state->force[0] = value; in grlib_irqmp_writel()
255 grlib_irqmp_check_irqs(irqmp->state); in grlib_irqmp_writel()
260 state->pending &= ~value; in grlib_irqmp_writel()
269 state->broadcast = value; in grlib_irqmp_writel()
282 state->mask[cpu] = value; in grlib_irqmp_writel()
283 grlib_irqmp_check_irqs(irqmp->state); in grlib_irqmp_writel()
294 uint32_t old = state->force[cpu]; in grlib_irqmp_writel()
296 state->force[cpu] = (old | force) & ~clear; in grlib_irqmp_writel()
297 grlib_irqmp_check_irqs(irqmp->state); in grlib_irqmp_writel()
307 state->extended[cpu] = value; in grlib_irqmp_writel()
326 assert(irqmp->state != NULL); in grlib_irqmp_reset()
328 memset(irqmp->state, 0, sizeof *irqmp->state); in grlib_irqmp_reset()
329 irqmp->state->parent = irqmp; in grlib_irqmp_reset()
348 irqmp->state = qemu_mallocz(sizeof *irqmp->state); in grlib_irqmp_init()