From owner-svn-src-head@FreeBSD.ORG Sun May 11 16:49:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47AF7279; Sun, 11 May 2014 16:49:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34A7921BA; Sun, 11 May 2014 16:49:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4BGnWEU071231; Sun, 11 May 2014 16:49:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4BGnW91071230; Sun, 11 May 2014 16:49:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201405111649.s4BGnW91071230@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 11 May 2014 16:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265883 - head/sys/powerpc/ps3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 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: Sun, 11 May 2014 16:49:32 -0000 Author: nwhitehorn Date: Sun May 11 16:49:31 2014 New Revision: 265883 URL: http://svnweb.freebsd.org/changeset/base/265883 Log: Fix interrupt allocation after changes to nexus. This makes PS3 boot multiuser again (this commit comes from the PS3 itself). Some problems still exist with SMP, apparently, as I had to boot a non-SMP kernel to get here. Modified: head/sys/powerpc/ps3/ps3bus.c Modified: head/sys/powerpc/ps3/ps3bus.c ============================================================================== --- head/sys/powerpc/ps3/ps3bus.c Sun May 11 16:48:36 2014 (r265882) +++ head/sys/powerpc/ps3/ps3bus.c Sun May 11 16:49:31 2014 (r265883) @@ -127,6 +127,7 @@ static device_method_t ps3bus_methods[] struct ps3bus_softc { struct rman sc_mem_rman; + struct rman sc_intr_rman; struct mem_region *regions; int rcount; }; @@ -328,7 +329,11 @@ ps3bus_attach(device_t self) sc = device_get_softc(self); sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "PS3Bus Memory Mapped I/O"; + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "PS3Bus Interrupts"; rman_init(&sc->sc_mem_rman); + rman_init(&sc->sc_intr_rman); + rman_manage_region(&sc->sc_intr_rman, 0, ~0); /* Get memory regions for DMA */ mem_regions(&sc->regions, &sc->rcount, &sc->regions, &sc->rcount); @@ -562,8 +567,13 @@ ps3bus_alloc_resource(device_t bus, devi rm = &sc->sc_mem_rman; break; case SYS_RES_IRQ: - return (resource_list_alloc(&dinfo->resources, bus, child, - type, rid, start, end, count, flags)); + rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, + *rid); + rm = &sc->sc_intr_rman; + adjstart = rle->start; + adjcount = ulmax(count, rle->count); + adjend = ulmax(rle->end, rle->start + adjcount - 1); + break; default: device_printf(bus, "unknown resource request from %s\n", device_get_nameunit(child));