zeta: update to new IRQ scheme
authorAlan Cox <alan@linux.intel.com>
Sat, 30 May 2015 14:22:18 +0000 (15:22 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 30 May 2015 14:22:18 +0000 (15:22 +0100)
Kernel/platform-zeta-v2/tricks.s
Kernel/platform-zeta-v2/zeta-v2.s

index 9d548e8..0502b0d 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
        .globl mpgsel_cache
 
         ; imported debug symbols
@@ -33,6 +33,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
@@ -55,10 +57,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
 
@@ -113,9 +111,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
 
index e889729..9e529bc 100644 (file)
@@ -12,7 +12,6 @@
        .globl map_process_always
        .globl map_save
        .globl map_restore
-       .globl _kernel_flag
        .globl _irqvector
        .globl platform_interrupt_all
        .globl mpgsel_cache
@@ -386,10 +385,6 @@ _kernel_pages:
 map_savearea:
        .db     0,0,0,0
 
-; has to live in common
-_kernel_flag:
-       .db     1
-
 ;=========================================================================
 ; Basic console I/O
 ;=========================================================================