void __init init_IRQ(void) { int i; /* clear all interrupt masks */ #ifndef CONFIG_SVINTO_SIM *R_IRQ_MASK0_CLR = 0xffffffff; *R_IRQ_MASK1_CLR = 0xffffffff; *R_IRQ_MASK2_CLR = 0xffffffff; #endif *R_VECT_MASK_CLR = 0xffffffff; for (i = 0; i < 256; i++) etrax_irv->v[i] = weird_irq; /* Initialize IRQ handler descriptors. */ for(i = 2; i < NR_IRQS; i++) { irq_desc[i].chip = &crisv10_irq_type; set_int_vector(i, interrupt[i]); } /* the entries in the break vector contain actual code to be executed by the associated break handler, rather than just a jump address. therefore we need to setup a default breakpoint handler for all breakpoints */ for (i = 0; i < 16; i++) set_break_vector(i, do_sigtrap); /* except IRQ 15 which is the multiple-IRQ handler on Etrax100 */ set_int_vector(15, multiple_interrupt); /* 0 and 1 which are special breakpoint/NMI traps */ set_int_vector(0, hwbreakpoint); set_int_vector(1, IRQ1_interrupt); /* and irq 14 which is the mmu bus fault handler */ set_int_vector(14, mmu_bus_fault); /* setup the system-call trap, which is reached by BREAK 13 */ set_break_vector(13, system_call); /* setup a breakpoint handler for debugging used for both user and kernel mode debugging (which is why it is not inside an ifdef CONFIG_ETRAX_KGDB) */ set_break_vector(8, gdb_handle_breakpoint); #ifdef CONFIG_ETRAX_KGDB /* setup kgdb if its enabled, and break into the debugger */ kgdb_init(); breakpoint(); #endif }
void __init init_IRQ(void) { int i; #ifndef CONFIG_SVINTO_SIM *R_IRQ_MASK0_CLR = 0xffffffff; *R_IRQ_MASK1_CLR = 0xffffffff; *R_IRQ_MASK2_CLR = 0xffffffff; #endif *R_VECT_MASK_CLR = 0xffffffff; for (i = 0; i < 256; i++) etrax_irv->v[i] = weird_irq; for(i = 2; i < NR_IRQS; i++) { irq_set_chip_and_handler(i, &crisv10_irq_type, handle_simple_irq); set_int_vector(i, interrupt[i]); } for (i = 0; i < 16; i++) set_break_vector(i, do_sigtrap); set_int_vector(15, multiple_interrupt); set_int_vector(0, hwbreakpoint); set_int_vector(1, IRQ1_interrupt); set_int_vector(14, mmu_bus_fault); set_break_vector(13, system_call); set_break_vector(8, gdb_handle_breakpoint); #ifdef CONFIG_ETRAX_KGDB kgdb_init(); breakpoint(); #endif }
void kgdb_init(void) { /* could initialize debug port as well but it's done in head.S already... */ /* breakpoint handler is now set in irq.c */ set_int_vector(8, kgdb_handle_serial); enableDebugIRQ(); }
void init_syscall() { kprintf("Initializing syscall\n"); syscall_proxy_entry = SYSCALL_PROXY_VADDR; memcpy( sysenter_proxy_start_origin, (void *)SYSCALL_PROXY_VADDR, (ulong)sysenter_proxy_end_origin - (ulong)sysenter_proxy_start_origin ); init_syscall_msr(); set_int_vector(INT_VECTOR_SYS_CALL, int_syscall_handler); }
void arch_free_irq(int irq) { set_int_vector(irq, bad_interrupt[irq], 0); }
void arch_setup_irq(int irq) { set_int_vector(irq, interrupt[irq], sinterrupt[irq]); }