From owner-svn-src-head@FreeBSD.ORG Thu Jun 25 20:35:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A38C0106564A; Thu, 25 Jun 2009 20:35:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86F6B8FC0C; Thu, 25 Jun 2009 20:35:46 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5PKZkG3063796; Thu, 25 Jun 2009 20:35:46 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5PKZkws063791; Thu, 25 Jun 2009 20:35:46 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200906252035.n5PKZkws063791@svn.freebsd.org> From: John Baldwin Date: Thu, 25 Jun 2009 20:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195002 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2009 20:35:47 -0000 Author: jhb Date: Thu Jun 25 20:35:46 2009 New Revision: 195002 URL: http://svn.freebsd.org/changeset/base/195002 Log: Fix kernels compiled without SMP support. Make intr_next_cpu() available for UP kernels but as a stub that always returns the single CPU's local APIC ID. Reported by: kib Modified: head/sys/amd64/amd64/intr_machdep.c head/sys/amd64/include/intr_machdep.h head/sys/i386/i386/intr_machdep.c head/sys/i386/include/intr_machdep.h Modified: head/sys/amd64/amd64/intr_machdep.c ============================================================================== --- head/sys/amd64/amd64/intr_machdep.c Thu Jun 25 20:09:53 2009 (r195001) +++ head/sys/amd64/amd64/intr_machdep.c Thu Jun 25 20:35:46 2009 (r195002) @@ -518,4 +518,14 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else +/* + * Always route interrupts to the current processor in the UP case. + */ +u_int +intr_next_cpu(void) +{ + + return (PCPU_GET(apic_id)); +} #endif Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Thu Jun 25 20:09:53 2009 (r195001) +++ head/sys/amd64/include/intr_machdep.h Thu Jun 25 20:35:46 2009 (r195002) @@ -152,9 +152,7 @@ int intr_bind(u_int vector, u_char cpu); int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -#ifdef SMP u_int intr_next_cpu(void); -#endif struct intsrc *intr_lookup_source(int vector); int intr_register_pic(struct pic *pic); int intr_register_source(struct intsrc *isrc); Modified: head/sys/i386/i386/intr_machdep.c ============================================================================== --- head/sys/i386/i386/intr_machdep.c Thu Jun 25 20:09:53 2009 (r195001) +++ head/sys/i386/i386/intr_machdep.c Thu Jun 25 20:35:46 2009 (r195002) @@ -491,4 +491,14 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else +/* + * Always route interrupts to the current processor in the UP case. + */ +u_int +intr_next_cpu(void) +{ + + return (PCPU_GET(apic_id)); +} #endif Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Thu Jun 25 20:09:53 2009 (r195001) +++ head/sys/i386/include/intr_machdep.h Thu Jun 25 20:35:46 2009 (r195002) @@ -139,9 +139,7 @@ int intr_bind(u_int vector, u_char cpu); int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -#ifdef SMP u_int intr_next_cpu(void); -#endif struct intsrc *intr_lookup_source(int vector); int intr_register_pic(struct pic *pic); int intr_register_source(struct intsrc *isrc);