From f5328318a2b1babb70b1908b5036796ba6a75381 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 8 Apr 2006 20:50:39 +0000 Subject: Don't panic in apic_intr_establush() if interrupt is not sharable and already taken; return NULL instead, just like we do for non-apic interrupts. Fixes PR 5064. ok mickey@ --- sys/arch/i386/i386/ioapic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/i386/ioapic.c b/sys/arch/i386/i386/ioapic.c index 9a9f0bdd0ad..a80bea4457c 100644 --- a/sys/arch/i386/i386/ioapic.c +++ b/sys/arch/i386/i386/ioapic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioapic.c,v 1.7 2006/03/06 19:10:06 kettenis Exp $ */ +/* $OpenBSD: ioapic.c,v 1.8 2006/04/08 20:50:38 kettenis Exp $ */ /* $NetBSD: ioapic.c,v 1.7 2003/07/14 22:32:40 lukem Exp $ */ /*- @@ -625,13 +625,13 @@ apic_intr_establish(int irq, int type, int level, int (*ih_fun)(void *), if (type == pin->ip_type) break; case IST_PULSE: - if (type != IST_NONE) - /* XXX should not panic here! */ - panic("apic_intr_establish: " - "intr %d can't share %s with %s", - intr, - isa_intr_typename(sc->sc_pins[intr].ip_type), - isa_intr_typename(type)); + if (type != IST_NONE) { + /*printf("%s: intr_establish: can't share %s with %s, irq %d\n", + ih_what, isa_intr_typename(pin->ip_type), + isa_intr_typename(type), intr);*/ + free(ih, M_DEVBUF); + return (NULL); + } break; } -- cgit v1.2.3