zx128: update to new interrupt scheme
authorAlan Cox <alan@linux.intel.com>
Sat, 30 May 2015 14:23:53 +0000 (15:23 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 30 May 2015 14:23:53 +0000 (15:23 +0100)
Untested as banked not yet converted

Kernel/platform-zx128/tricks.s
Kernel/platform-zx128/zx128.s

index d624559..41519b3 100644 (file)
@@ -11,7 +11,6 @@
         .globl _getproc
         .globl _trap_monitor
         .globl trap_illegal
-        .globl _inint
         .globl _switchout
         .globl _switchin
        .globl _low_bank
@@ -59,10 +58,6 @@ _switchout:
        ; here
        ;
 
-        ; set inint to false
-        xor a
-        ld (_inint), a
-
        ; Stash the uarea back into process memory
        ld hl, (U_DATA__U_PAGE)
        ld a, l
@@ -247,9 +242,9 @@ nofliplow:
         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 47a5156..95a4e10 100644 (file)
@@ -23,7 +23,7 @@
        .globl current_map
        .globl switch_bank
 
-        .globl _kernel_flag
+        .globl _need_resched
 
         ; exported debugging tools
         .globl _trap_monitor
@@ -288,8 +288,6 @@ outchar:
         ret
 _tmpout:
        .db 1
-_kernel_flag:
-        .db 1
 
        .area _COMMONDATA
 current_map:                ; place to store current page number. Is needed
@@ -301,6 +299,9 @@ map_store:
 ksave_map:
         .db 0
 
+_need_resched:
+        .db 0
+
        .area _COMMONMEM
 ;
 ;      Banking helpers