Looking function mips_timer_interrupt() (which is the normal timer interrupt when PM is not enabled) I noticed that it has called from file «arch/mips/au1000/common/int-handler.S» as follow: ... .text .set macro .set noat .align 5 NESTED(au1000_IRQ, PT_SIZE, sp) SAVE_ALL CLI # Important: mark KERNEL mode ! mfc0 t0,CP0_CAUSE # get pending interrupts mfc0 t1,CP0_STATUS # get enabled interrupts and t0,t1 # isolate allowed ones andi t0,0xff00 # isolate pending bits beqz t0, 3f # spurious interrupt andi a0, t0, CAUSEF_IP7 beq a0, zero, 1f move a0, sp jal mips_timer_interrupt j ret_from_irq ... Looking at «CLI» implementation into «include/asm/stackframe.h»: /* * Move to kernel mode and disable interrupts. * Set cp0 enable bit as sign that we're running on the kernel stack */ .macro CLI mfc0 t0, CP0_STATUS li t1, ST0_CU0 | 0x1f or t0, t1 xori t0, 0x1f mtc0 t0, CP0_STATUS irq_disable_hazard .endm I see that the CLI macro ensures that mips_timer_interrupt() will be executed into «kernel mode». What do you think about that? Can it cause the error «Break instruction in kernel code in arch/mips/kernel/traps.c::do_bp, line 629[#1]:»? If so, can someone help me in fixing such bug? I'm not a MIPS assembly master! ;-p Ciao, Rodolfo -- GNU/Linux Solutions e-mail: giometti@xxxxxxxx Linux Device Driver giometti@xxxxxxxxxxxx Embedded Systems home page: giometti.enneenne.com UNIX programming phone: +39 349 2432127
Attachment:
signature.asc
Description: Digital signature