From c20296bfd02101a343f246f4d158a3533bc46849 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 28 Mar 2015 23:23:21 +0000 Subject: [PATCH] px4,sio: return the number of missed interrupts Much cleaner than globals for it all --- Kernel/platform-px4plus/sio-asm.s | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Kernel/platform-px4plus/sio-asm.s b/Kernel/platform-px4plus/sio-asm.s index 8ace89e6..df2a2f1a 100644 --- a/Kernel/platform-px4plus/sio-asm.s +++ b/Kernel/platform-px4plus/sio-asm.s @@ -4,6 +4,11 @@ .module sioasm + .globl _sio_set_irq + .globl _sio_release_irq + + .globl interrupt_handler + .area _CODE _sio_set_irq: @@ -16,16 +21,18 @@ _sio_set_irq: ld (0x0039), hl ret +; +; Returns the number of missed interrupts in HL +; _sio_release_irq: ld a, r push af di ld a, #0x0B ; FRC, ART and 7508 out (4), a - ld hl, (_sio_count) - ld (_missed_interrupts), hl ld hl, #interrupt_handler ld (0x0039), hl + ld hl, (_sio_count) pop af ret po ; CMOS ei @@ -48,7 +55,5 @@ interrupt_fast: ret _sio_count: .db 0 -_missed_interrupts: - .db 0 -- 2.34.1