Date: Sun, 9 Apr 2006 21:29:40 GMT From: John-Mark Gurney <jmg@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94872 for review Message-ID: <200604092129.k39LTe53080363@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <machine/hviommu.h> #include <machine/vmparam.h> #include <machine/tlb.h> +#include <machine/nexusvar.h> #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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604092129.k39LTe53080363>