From owner-p4-projects@FreeBSD.ORG Fri Feb 22 14:01:33 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B85316A532; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9506B16A405 for ; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 8C6D513C45E for ; Fri, 22 Feb 2008 14:01:32 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1ME1W9k008015 for ; Fri, 22 Feb 2008 14:01:32 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1ME1WnX008011 for perforce@freebsd.org; Fri, 22 Feb 2008 14:01:32 GMT (envelope-from rrs@cisco.com) Date: Fri, 22 Feb 2008 14:01:32 GMT Message-Id: <200802221401.m1ME1WnX008011@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135959 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: Fri, 22 Feb 2008 14:01:33 -0000 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) {