nc100: update to use new style IRQ handling
authorAlan Cox <alan@linux.intel.com>
Sat, 30 May 2015 12:43:44 +0000 (13:43 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 30 May 2015 12:43:44 +0000 (13:43 +0100)
Kernel/platform-nc100/nc100.s
Kernel/platform-nc100/tricks.s

index 8b32d06..876b373 100644 (file)
@@ -14,7 +14,6 @@
            .globl map_process_always
            .globl map_save
            .globl map_restore
-           .globl _kernel_flag
 
            ; for the PCMCIA disc driver
            .globl _rd_memcpy
@@ -242,12 +241,6 @@ map_save:
 map_savearea:
            .db 0,0,0,0
 
-;
-; has to live in common
-;
-_kernel_flag:
-          .db 1
-
 ; outchar: Wait for UART TX idle, then print the char in A
 ; destroys: AF
 outchar:
index 004f53e..ff1ba23 100644 (file)
@@ -8,7 +8,6 @@
         .globl _getproc
         .globl _trap_monitor
         .globl trap_illegal
-        .globl _inint
         .globl _switchout
         .globl _switchin
         .globl _doexec
@@ -18,6 +17,7 @@
         .globl interrupt_handler
        .globl map_kernel
        .globl _ramtop
+       .globl _need_resched
 
         ; imported debug symbols
         .globl outstring, outde, outhl, outbc, outnewline, outchar, outcharhex
@@ -32,6 +32,8 @@
 ; here
 _ramtop:
        .dw 0
+_need_resched:
+       .db 0
 
 ; Switchout switches out the current process, finds another that is READY,
 ; possibly the same process, and switches it in.  When a process is
@@ -54,10 +56,6 @@ _switchout:
         push iy
         ld (U_DATA__U_SP), sp ; this is where the SP is restored in _switchin
 
-        ; set inint to false
-        xor a
-        ld (_inint), a
-
         ; find another process to run (may select this one again)
         call _getproc
 
@@ -112,9 +110,9 @@ _switchin:
         pop hl ; return code
 
         ; enable interrupts, if the ISR isn't already running
-        ld a, (_inint)
+        ld a, (U_DATA__U_ININTERRUPT)
         or a
-        ret z ; in ISR, leave interrupts off
+        ret nz ; in ISR, leave interrupts off
         ei
         ret ; return with interrupts on