diff options
author | cognet <cognet@FreeBSD.org> | 2004-09-23 22:33:38 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2004-09-23 22:33:38 +0000 |
commit | 272278904350612e3ca55360044243f3037e3037 (patch) | |
tree | 341a24383a7597672e940f9968fe8928b2aacd9a /sys/arm/sa11x0/sa11x0_irq.S | |
parent | 89fa389a2225d680279dad1e970852df17a80a0e (diff) | |
download | FreeBSD-src-272278904350612e3ca55360044243f3037e3037.zip FreeBSD-src-272278904350612e3ca55360044243f3037e3037.tar.gz |
Big cleanup: get ride of the whole spl level logic, as FreeBSD doesn't use
it anymore.
Diffstat (limited to 'sys/arm/sa11x0/sa11x0_irq.S')
-rw-r--r-- | sys/arm/sa11x0/sa11x0_irq.S | 96 |
1 files changed, 9 insertions, 87 deletions
diff --git a/sys/arm/sa11x0/sa11x0_irq.S b/sys/arm/sa11x0/sa11x0_irq.S index cabeb40..8f85012 100644 --- a/sys/arm/sa11x0/sa11x0_irq.S +++ b/sys/arm/sa11x0/sa11x0_irq.S @@ -44,13 +44,9 @@ #include <machine/asmacros.h> #include <arm/sa11x0/sa11x0_reg.h> __FBSDID("$FreeBSD$"); -Lcurrent_spl_level: - .word _C_LABEL(current_spl_level) Lcurrent_intr_depth: .word _C_LABEL(current_intr_depth) -Lspl_masks: - .word _C_LABEL(spl_masks) .globl _C_LABEL(saipic_base) _C_LABEL(saipic_base): .word 0x00000000 @@ -60,7 +56,7 @@ Ldbg_str: .asciz "irq_entry %x %x\n" #endif -AST_ALIGNMENT_FAULT_LOCALS +AST_LOCALS /* * Regsister usage * @@ -71,12 +67,10 @@ AST_ALIGNMENT_FAULT_LOCALS * r10 - Base address of SAIP */ -#define _SPL_LEVELS 13 /* XXX */ ASENTRY_NP(irq_entry) sub lr, lr, #0x00000004 /* Adjust the lr */ PUSHFRAMEINSVC /* Push an interrupt frame */ - ENABLE_ALIGNMENT_FAULTS /* Load r8 with the SAIPIC interrupt requests */ @@ -101,64 +95,10 @@ ASENTRY_NP(irq_entry) add r1, r1, #1 str r1, [r0] - /* - * Need to block all interrupts at the IPL or lower for - * all asserted interrupts. - * This basically emulates hardware interrupt priority levels. - * Means we need to go through the interrupt mask and for - * every asserted interrupt we need to mask out all other - * interrupts at the same or lower IPL. - * If only we could wait until the main loop but we need to sort - * this out first so interrupts can be re-enabled. - * - * This would benefit from a special ffs type routine - */ - - mov r9, #(_SPL_LEVELS - 1) - ldr r7, Lspl_masks -Lfind_highest_ipl: - ldr r2, [r7, r9, lsl #2] - tst r8, r2 - subeq r9, r9, #1 - beq Lfind_highest_ipl - - /* r9 = SPL level of highest priority interrupt */ - add r9, r9, #1 - ldr r2, [r7, r9, lsl #2] - mvn r2, r2 - - ldr r0, Lcurrent_spl_level - ldr r1, [r0] - str r9, [r0] - stmfd sp!, {r1} - - /* Update the SAIP irq masks */ - bl _C_LABEL(irq_setmasks) -#ifdef INTR_DEBUG - stmfd sp!, {r0,r1,r2} - adr r0, Ldbg_str - mov r2, r9 - bl _C_LABEL(printf) - ldmia sp!, {r0,r1,r2} -#endif - mrs r0, cpsr_all /* Enable IRQ's */ - bic r0, r0, #I32_bit - msr cpsr_all, r0 - mov r0, r8 + mov r0, sp + mov r1, r8 bl _C_LABEL(arm_handler_execute) - ldmfd sp!, {r2} - ldr r1, Lcurrent_spl_level - str r2, [r1] - /* Restore previous disabled mask */ - bl _C_LABEL(irq_setmasks) - bl _C_LABEL(dosoftints) /* Handle the soft interrupts */ - - /* Kill IRQ's in preparation for exit */ - mrs r0, cpsr_all - orr r0, r0, #(I32_bit) - msr cpsr_all, r0 - #ifdef INTR_DEBUG adr r0, Ldbg_str mov r1, #3 @@ -172,42 +112,24 @@ Lfind_highest_ipl: sub r1, r1, #1 str r1, [r0] - DO_AST_AND_RESTORE_ALIGNMENT_FAULTS + DO_AST PULLFRAMEFROMSVCANDEXIT /* NOT REACHED */ b . - 8 -ENTRY(irq_setmasks) - /* Disable interrupts */ - mrs r3, cpsr_all - orr r1, r3, #(I32_bit) - msr cpsr_all, r1 - - /* Calculate interrupt mask */ - ldr r0, Lspl_masks - ldr r2, Lcurrent_spl_level - ldr r2, [r2] - ldr r2, [r0, r2, lsl #2] - ldr r0, _C_LABEL(saipic_base) - str r2, [r0, #(SAIPIC_MR)] /* Set mask register */ - - /* Restore old cpsr and exit */ - /* msr cpsr_all, r3 XXX: not now.*/ - mov pc, lr Lcnt: .word _C_LABEL(cnt) +ENTRY(sa11x0_activateirqs) + ldr r0, _C_LABEL(saipic_base) + mov r1, #0xffffffff + str r1, [r0, #(SAIPIC_MR)] + mov pc, lr #ifdef IRQSTATS Lintrcnt: .word _C_LABEL(intrcnt) #endif -Lirqhandlers: - .word _C_LABEL(irqhandlers) /* Pointer to array of irqhandlers */ - - - - .global _C_LABEL(intrnames), _C_LABEL(eintrnames) .global _C_LABEL(eintrcnt) _C_LABEL(intrnames): |