Date: Fri, 20 Nov 2009 16:27:50 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r199597 - projects/mips/sys/mips/mips Message-ID: <200911201627.nAKGRoeC049794@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Nov 20 16:27:50 2009 New Revision: 199597 URL: http://svn.freebsd.org/changeset/base/199597 Log: cast vaddr to uintptr_t before casting it to a bus_space_handle_t. # I'm sure this indicates a problem, but I'm not sure what... Modified: projects/mips/sys/mips/mips/nexus.c Modified: projects/mips/sys/mips/mips/nexus.c ============================================================================== --- projects/mips/sys/mips/mips/nexus.c Fri Nov 20 16:23:04 2009 (r199596) +++ projects/mips/sys/mips/mips/nexus.c Fri Nov 20 16:27:50 2009 (r199597) @@ -404,6 +404,7 @@ nexus_activate_resource(device_t bus, de * If this is a memory resource, track the direct mapping * in the uncached MIPS KSEG1 segment. */ + /* XXX we shouldn't be supporting sys_res_ioport here */ if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { caddr_t vaddr = 0; u_int32_t paddr; @@ -417,7 +418,7 @@ nexus_activate_resource(device_t bus, de rman_set_virtual(r, vaddr); rman_set_bustag(r, mips_bus_space_generic); - rman_set_bushandle(r, (bus_space_handle_t)vaddr); + rman_set_bushandle(r, (bus_space_handle_t)(uintptr_t)vaddr); } return (rman_activate_resource(r));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911201627.nAKGRoeC049794>