Lines Matching refs:vec

55 	ulong vec, v_bit;  in external_interrupt()  local
61 vec = in_be32(&immr->im_siu_conf.sc_sivec); in external_interrupt()
62 irq = vec >> 26; in external_interrupt()
91 irq, vec); in external_interrupt()
109 uint vec; in cpm_interrupt() local
116 vec = in_be16(&immr->im_cpic.cpic_civr); in cpm_interrupt()
117 vec >>= 11; in cpm_interrupt()
119 if (cpm_vecs[vec].handler != NULL) { in cpm_interrupt()
120 (*cpm_vecs[vec].handler) (cpm_vecs[vec].arg); in cpm_interrupt()
122 clrbits_be32(&immr->im_cpic.cpic_cimr, 1 << vec); in cpm_interrupt()
123 printf("Masking bogus CPM interrupt vector 0x%x\n", vec); in cpm_interrupt()
129 setbits_be32(&immr->im_cpic.cpic_cisr, 1 << vec); in cpm_interrupt()
146 void irq_install_handler(int vec, interrupt_handler_t *handler, void *arg) in irq_install_handler() argument
150 if ((vec & CPMVEC_OFFSET) != 0) { in irq_install_handler()
152 vec &= 0xffff; in irq_install_handler()
153 if (cpm_vecs[vec].handler != NULL) in irq_install_handler()
155 (uint)handler, (uint)cpm_vecs[vec].handler); in irq_install_handler()
156 cpm_vecs[vec].handler = handler; in irq_install_handler()
157 cpm_vecs[vec].arg = arg; in irq_install_handler()
158 setbits_be32(&immr->im_cpic.cpic_cimr, 1 << vec); in irq_install_handler()
161 if (irq_vecs[vec].handler != NULL) in irq_install_handler()
163 vec, (uint)handler, (uint)cpm_vecs[vec].handler); in irq_install_handler()
164 irq_vecs[vec].handler = handler; in irq_install_handler()
165 irq_vecs[vec].arg = arg; in irq_install_handler()
166 setbits_be32(&immr->im_siu_conf.sc_simask, 1 << (31 - vec)); in irq_install_handler()
170 void irq_free_handler(int vec) in irq_free_handler() argument
174 if ((vec & CPMVEC_OFFSET) != 0) { in irq_free_handler()
176 vec &= 0xffff; in irq_free_handler()
177 clrbits_be32(&immr->im_cpic.cpic_cimr, 1 << vec); in irq_free_handler()
178 cpm_vecs[vec].handler = NULL; in irq_free_handler()
179 cpm_vecs[vec].arg = NULL; in irq_free_handler()
182 clrbits_be32(&immr->im_siu_conf.sc_simask, 1 << (31 - vec)); in irq_free_handler()
183 irq_vecs[vec].handler = NULL; in irq_free_handler()
184 irq_vecs[vec].arg = NULL; in irq_free_handler()