From f194e4ddc0dc5aadb59d939ea74b3ecf5e2f2505 Mon Sep 17 00:00:00 2001 From: skrll Date: Sun, 29 Nov 2009 10:30:07 +0000 Subject: [PATCH] Signal EOI correctly rather than deferencing NULL. --- sys/arch/hp700/dev/apic.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/arch/hp700/dev/apic.c b/sys/arch/hp700/dev/apic.c index c0ac4ea92936..35ad14328750 100644 --- a/sys/arch/hp700/dev/apic.c +++ b/sys/arch/hp700/dev/apic.c @@ -1,4 +1,4 @@ -/* $NetBSD: apic.c,v 1.3 2009/05/07 15:34:49 skrll Exp $ */ +/* $NetBSD: apic.c,v 1.4 2009/11/29 10:30:07 skrll Exp $ */ /* $OpenBSD: apic.c,v 1.7 2007/10/06 23:50:54 krw Exp $ */ @@ -241,16 +241,14 @@ apic_intr(void *v) if (iv->handler(iv->arg)) { if (iv->cnt) iv->cnt->ev_count++; - else - claimed = 1; + /* Signal EOI. */ + elroy_write32(&r->apic_eoi, + htole32((31 - APIC_INT_IRQ(iv->ih)) & APIC_ENT0_VEC)); + claimed = 1; } iv = iv->next; } - /* Signal EOI. */ - elroy_write32(&r->apic_eoi, - htole32((31 - APIC_INT_IRQ(iv->ih)) & APIC_ENT0_VEC)); - return (claimed); }