Date: Fri, 22 Feb 2008 14:01:32 GMT From: "Randall R. Stewart" <rrs@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 135959 for review Message-ID: <200802221401.m1ME1WnX008011@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135959 Change 135959 by rrs@rrs-mips2-jnpr on 2008/02/22 14:01:03 Force a proper phys location for the memory being grabbed Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/busdma_machdep.c#3 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/busdma_machdep.c#3 (text+ko) ==== @@ -434,8 +434,22 @@ * and handles multi-seg allocations. Nobody is doing * multi-seg allocations yet though. */ + vm_paddr_t maxphys; + if((uint32_t)dmat->lowaddr >= MIPS_KSEG0_LARGEST_PHYS) { + /* Note in the else case I just put in what was already + * being passed in dmat->lowaddr. I am not sure + * how this would have worked. Since lowaddr is in the + * max address postion. I would have thought that the + * caller would have wanted dmat->highaddr. That is + * presuming they are asking for physical addresses + * which is what contigmalloc takes. - RRS + */ + maxphys = MIPS_KSEG0_LARGEST_PHYS - 1; + } else { + maxphys = dmat->lowaddr; + } *vaddr = contigmalloc(dmat->maxsize, M_DEVBUF, mflags, - 0ul, dmat->lowaddr, dmat->alignment? dmat->alignment : 1ul, + 0ul, maxphys, dmat->alignment? dmat->alignment : 1ul, dmat->boundary); } if (*vaddr == NULL) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802221401.m1ME1WnX008011>