From owner-svn-src-head@FreeBSD.ORG Thu May 3 21:44:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C00321065673; Thu, 3 May 2012 21:44:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 918268FC0C; Thu, 3 May 2012 21:44:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q43Li2HR064711; Thu, 3 May 2012 21:44:02 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q43Li2og064707; Thu, 3 May 2012 21:44:02 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201205032144.q43Li2og064707@svn.freebsd.org> From: Attilio Rao Date: Thu, 3 May 2012 21:44:02 +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: r234989 - in head/sys: amd64/include i386/include x86/x86 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, 03 May 2012 21:44:02 -0000 Author: attilio Date: Thu May 3 21:44:01 2012 New Revision: 234989 URL: http://svn.freebsd.org/changeset/base/234989 Log: Revert part of r234723 by re-enabling the SMP protection for intr_bind() on x86. This has been requested by jhb and I strongly disagree with this, but as long as he is the x86 and interrupt subsystem maintainer I will follow his directives. The disagreement cames from what we should really consider as a public KPI. IMHO, if we really need a selection between the kernel functions, we may need an explicit protection like _KERNEL_KPI, which defines which subset of the kernel function might really be considered as part of the KPI (for thirdy part modules) and which not. As long as we don't have this mechanism I just consider any possible function as usable by thirdy part code, thus intr_bind() included. MFC after: 1 week Modified: head/sys/amd64/include/intr_machdep.h head/sys/i386/include/intr_machdep.h head/sys/x86/x86/intr_machdep.c Modified: head/sys/amd64/include/intr_machdep.h ============================================================================== --- head/sys/amd64/include/intr_machdep.h Thu May 3 21:39:23 2012 (r234988) +++ head/sys/amd64/include/intr_machdep.h Thu May 3 21:44:01 2012 (r234989) @@ -144,7 +144,9 @@ void intr_add_cpu(u_int cpu); int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); +#ifdef SMP int intr_bind(u_int vector, u_char cpu); +#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); Modified: head/sys/i386/include/intr_machdep.h ============================================================================== --- head/sys/i386/include/intr_machdep.h Thu May 3 21:39:23 2012 (r234988) +++ head/sys/i386/include/intr_machdep.h Thu May 3 21:44:01 2012 (r234989) @@ -134,7 +134,9 @@ void elcr_write_trigger(u_int irq, enum void intr_add_cpu(u_int cpu); int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); +#ifdef SMP int intr_bind(u_int vector, u_char cpu); +#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); Modified: head/sys/x86/x86/intr_machdep.c ============================================================================== --- head/sys/x86/x86/intr_machdep.c Thu May 3 21:39:23 2012 (r234988) +++ head/sys/x86/x86/intr_machdep.c Thu May 3 21:44:01 2012 (r234989) @@ -566,14 +566,6 @@ intr_next_cpu(void) return (PCPU_GET(apic_id)); } -/* Return EOPNOTSUPP in the UP case. */ -int -intr_bind(u_int vector __unused, u_char cpu __unused) -{ - - return (EOPNOTSUPP); -} - /* Use an empty stub for compatibility. */ void intr_add_cpu(u_int cpu __unused)