From owner-cvs-src@FreeBSD.ORG Fri Mar 14 19:41:48 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A13501065671; Fri, 14 Mar 2008 19:41:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 925A98FC29; Fri, 14 Mar 2008 19:41:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2EJfmtW020580; Fri, 14 Mar 2008 19:41:48 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2EJfmL2020579; Fri, 14 Mar 2008 19:41:48 GMT (envelope-from jhb) Message-Id: <200803141941.m2EJfmL2020579@repoman.freebsd.org> From: John Baldwin Date: Fri, 14 Mar 2008 19:41:48 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/amd64/amd64 intr_machdep.c src/sys/amd64/include intr_machdep.h src/sys/arm/arm intr.c src/sys/i386/i386 intr_machdep.c src/sys/i386/include intr_machdep.h src/sys/ia64/ia64 interrupt.c src/sys/kern kern_intr.c ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2008 19:41:48 -0000 jhb 2008-03-14 19:41:48 UTC FreeBSD src repository Modified files: sys/amd64/amd64 intr_machdep.c sys/amd64/include intr_machdep.h sys/arm/arm intr.c sys/i386/i386 intr_machdep.c sys/i386/include intr_machdep.h sys/ia64/ia64 interrupt.c sys/kern kern_intr.c sys/powerpc/powerpc intr_machdep.c sys/sparc64/sparc64 intr_machdep.c sys/sun4v/sun4v intr_machdep.c sys/sys interrupt.h Log: Add preliminary support for binding interrupts to CPUs: - Add a new intr_event method ie_assign_cpu() that is invoked when the MI code wishes to bind an interrupt source to an individual CPU. The MD code may reject the binding with an error. If an assign_cpu function is not provided, then the kernel assumes the platform does not support binding interrupts to CPUs and fails all requests to do so. - Bind ithreads to CPUs on their next execution loop once an interrupt event is bound to a CPU. Only shared ithreads are bound. We currently leave private ithreads for drivers using filters + ithreads in the INTR_FILTER case unbound. - A new intr_event_bind() routine is used to bind an interrupt event to a CPU. - Implement binding on amd64 and i386 by way of the existing pic_assign_cpu PIC method. - For x86, provide a 'intr_bind(IRQ, cpu)' wrapper routine that looks up an interrupt source and binds its interrupt event to the specified CPU. MI code can currently (ab)use this by doing: intr_bind(rman_get_start(irq_res), cpu); however, I plan to add a truly MI interface (probably a bus_bind_intr(9)) where the implementation in the x86 nexus(4) driver would end up calling intr_bind() internally. Requested by: kmacy, gallatin, jeff Tested on: {amd64, i386} x {regular, INTR_FILTER} Revision Changes Path 1.37 +52 -9 src/sys/amd64/amd64/intr_machdep.c 1.19 +3 -0 src/sys/amd64/include/intr_machdep.h 1.18 +2 -2 src/sys/arm/arm/intr.c 1.32 +52 -9 src/sys/i386/i386/intr_machdep.c 1.21 +3 -0 src/sys/i386/include/intr_machdep.h 1.63 +1 -1 src/sys/ia64/ia64/interrupt.c 1.155 +92 -4 src/sys/kern/kern_intr.c 1.18 +1 -1 src/sys/powerpc/powerpc/intr_machdep.c 1.29 +2 -2 src/sys/sparc64/sparc64/intr_machdep.c 1.8 +1 -1 src/sys/sun4v/sun4v/intr_machdep.c 1.38 +9 -4 src/sys/sys/interrupt.h