lowlevel-z80: Fix a tiny hole in the reti handling
authorAlan Cox <alan@linux.intel.com>
Sat, 30 Jun 2018 22:10:12 +0000 (23:10 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 30 Jun 2018 22:10:12 +0000 (23:10 +0100)
What's not documented properly in the manual is that reti behaves like retn
in IFF1/2 handling not like ret.

Kernel/lowlevel-z80-banked.s
Kernel/lowlevel-z80.s

index c774e35..6e438a7 100644 (file)
@@ -521,7 +521,8 @@ preemption:
        ; hence the need to reti
 
        ;
-intret2:call map_kernel
+intret2:di
+       call map_kernel
        ;
        ; Semantically we are doing a null syscall for pre-empt. We need
        ; to record ourselves as in a syscall so we can't be recursively
index d78b850..0096179 100644 (file)
@@ -149,7 +149,7 @@ unix_syscall_entry:
         push af
         ex af, af'
         exx
-        push bc                ; FIXME we don't I tihnk need to save bc/de/hl
+        push bc                ; FIXME we don't I think need to save bc/de/hl
         push de                ; as they are compiler caller save
         push hl
         exx
@@ -531,7 +531,7 @@ preemption:
                                ; and the controllers have seen the
                                ; reti M1 cycle. However we still
                                ; have DI set
-
+       di                      ; see undocumented Z80 notes on RETI
        ;
        ; We are now on the syscall stack (which is fine, we don't
        ; pre-empt mid syscall so therefore it is free.  We will now