From owner-svn-src-all@FreeBSD.ORG Sun Feb 5 16:17:15 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72F8D1065690; Sun, 5 Feb 2012 16:17:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46B698FC0C; Sun, 5 Feb 2012 16:17:15 +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 q15GHFEo090699; Sun, 5 Feb 2012 16:17:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q15GHF6Q090697; Sun, 5 Feb 2012 16:17:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201202051617.q15GHF6Q090697@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 5 Feb 2012 16:17:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r231022 - stable/9/sys/powerpc/ps3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Feb 2012 16:17:15 -0000 Author: nwhitehorn Date: Sun Feb 5 16:17:14 2012 New Revision: 231022 URL: http://svn.freebsd.org/changeset/base/231022 Log: Pick a constant high IRQ value for the PS3 IPI, which lets PS3 devices be usefully loaded and unloaded as modules. Submitted by: geoffrey dot levand at mail dot ru Modified: stable/9/sys/powerpc/ps3/ps3pic.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/modules/sound/driver/emu10k1/ (props changed) stable/9/sys/modules/sound/driver/emu10kx/ (props changed) stable/9/sys/modules/sound/driver/maestro3/ (props changed) Modified: stable/9/sys/powerpc/ps3/ps3pic.c ============================================================================== --- stable/9/sys/powerpc/ps3/ps3pic.c Sun Feb 5 16:14:23 2012 (r231021) +++ stable/9/sys/powerpc/ps3/ps3pic.c Sun Feb 5 16:17:14 2012 (r231022) @@ -62,6 +62,7 @@ struct ps3pic_softc { volatile uint64_t *mask_thread1; uint64_t sc_ipi_outlet[2]; + uint64_t sc_ipi_virq; int sc_vector[64]; }; @@ -131,20 +132,23 @@ ps3pic_attach(device_t dev) thread = 32 - fls(mfctrl()); lv1_configure_irq_state_bitmap(ppe, thread, vtophys(sc->bitmap_thread0)); + + sc->sc_ipi_virq = 63; + #ifdef SMP lv1_configure_irq_state_bitmap(ppe, !thread, vtophys(sc->bitmap_thread1)); /* Map both IPIs to the same VIRQ to avoid changes in intr_machdep */ lv1_construct_event_receive_port(&sc->sc_ipi_outlet[0]); - lv1_connect_irq_plug_ext(ppe, thread, sc->sc_ipi_outlet[0], + lv1_connect_irq_plug_ext(ppe, thread, sc->sc_ipi_virq, sc->sc_ipi_outlet[0], 0); lv1_construct_event_receive_port(&sc->sc_ipi_outlet[1]); - lv1_connect_irq_plug_ext(ppe, !thread, sc->sc_ipi_outlet[0], + lv1_connect_irq_plug_ext(ppe, !thread, sc->sc_ipi_virq, sc->sc_ipi_outlet[1], 0); #endif - powerpc_register_pic(dev, 0, sc->sc_ipi_outlet[0], 1, FALSE); + powerpc_register_pic(dev, 0, sc->sc_ipi_virq, 1, FALSE); return (0); } @@ -216,7 +220,7 @@ ps3pic_mask(device_t dev, u_int irq) sc = device_get_softc(dev); /* Do not mask IPIs! */ - if (irq == sc->sc_ipi_outlet[0]) + if (irq == sc->sc_ipi_virq) return; atomic_clear_64(&sc->mask_thread0[0], 1UL << (63 - irq));