From owner-p4-projects@FreeBSD.ORG Sun Apr 9 21:29:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A09E016A402; Sun, 9 Apr 2006 21:29:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F31216A400 for ; Sun, 9 Apr 2006 21:29:41 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A0E043D69 for ; Sun, 9 Apr 2006 21:29:41 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k39LTfte080366 for ; Sun, 9 Apr 2006 21:29:41 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k39LTe53080363 for perforce@freebsd.org; Sun, 9 Apr 2006 21:29:40 GMT (envelope-from jmg@freebsd.org) Date: Sun, 9 Apr 2006 21:29:40 GMT Message-Id: <200604092129.k39LTe53080363@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Cc: Subject: PERFORCE change 94872 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2006 21:29:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=94872 Change 94872 by jmg@jmg_arlene on 2006/04/09 21:29:18 use the ivar to properly set devhandle.. Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#32 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#32 (text+ko) ==== @@ -55,10 +55,10 @@ #include #include #include +#include #include "pcib_if.h" -#define SUN4V_REG_SPEC2CFG_HDL(x) ((x >> 32) & ~(0xfull << 28)) /* * XXX - should get this through the bus, but Sun overloaded the reg OFW * property, so there isn't normal resources associated w/ this device. @@ -146,10 +146,6 @@ struct hviommu *himp; bus_space_tag_t *btp; phandle_t node; -#if 0 - uint32_t cell; -#endif - uint64_t reg, nreg; uint32_t *dvma; int br[2]; int n, type; @@ -170,14 +166,7 @@ sc->hs_busnum = br[0]; /* Setup the HyperVisor devhandle for this bus */ -#if 0 - if (OF_getprop(node, "reg", &cell, sizeof cell) == -1) - panic("%s: OF_getprop failed.", __func__); - sc->hs_devhandle = cell & 0xfffffff; -#else - bus_get_resource(dev, SYS_RES_MEMORY, 0, ®, &nreg); - sc->hs_devhandle = SUN4V_REG_SPEC2CFG_HDL(reg); -#endif + sc->hs_devhandle = nexus_get_devhandle(dev); /* initalize intr resources */ sc->hs_pci_intr_rman.rm_type = RMAN_ARRAY;