From a9a48281a6e5c783834f10d7bb73bc3ce9f7f29e Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 2 Feb 2018 09:32:11 +0000 Subject: [PATCH] Enable interrupts while running interrupt handlers like we do on agintc(4). Spotted by patrick@ ok patrick@ --- sys/arch/arm64/dev/ampintc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/arch/arm64/dev/ampintc.c b/sys/arch/arm64/dev/ampintc.c index f03985a7bd4..2091031902c 100644 --- a/sys/arch/arm64/dev/ampintc.c +++ b/sys/arch/arm64/dev/ampintc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ampintc.c,v 1.12 2018/01/31 10:52:12 kettenis Exp $ */ +/* $OpenBSD: ampintc.c,v 1.13 2018/02/02 09:32:11 kettenis Exp $ */ /* * Copyright (c) 2007,2009,2011 Dale Rahn * @@ -620,7 +620,7 @@ ampintc_irq_handler(void *frame) struct intrhand *ih; void *arg; uint32_t iack_val; - int irq, pri, s; + int irq, pri, s, handled; iack_val = ampintc_iack(); #ifdef DEBUG_INTC @@ -668,7 +668,10 @@ ampintc_irq_handler(void *frame) else arg = frame; - if (ih->ih_func(arg)) + enable_interrupts(); + handled = ih->ih_func(arg); + disable_interrupts(); + if (handled) ih->ih_count.ec_count++; #ifdef MULTIPROCESSOR -- 2.20.1