From owner-svn-src-head@freebsd.org Sat Nov 21 06:03:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60F6BA345EB; Sat, 21 Nov 2015 06:03:48 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F4221828; Sat, 21 Nov 2015 06:03:48 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAL63lb9085366; Sat, 21 Nov 2015 06:03:47 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAL63loY085365; Sat, 21 Nov 2015 06:03:47 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511210603.tAL63loY085365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 21 Nov 2015 06:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291122 - head/sys/powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2015 06:03:48 -0000 Author: jhibbits Date: Sat Nov 21 06:03:46 2015 New Revision: 291122 URL: https://svnweb.freebsd.org/changeset/base/291122 Log: trunc_page() goes through unsigned long, which is too short. sizeof(unsigned long) < sizeof(vm_paddr_t) on Book-E, which uses 36-bit addressing. With this, a CCSR with a physical address above 4GB successfully maps. Sponsored by: Alex Perez/Inertial Computing Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sat Nov 21 02:49:33 2015 (r291121) +++ head/sys/powerpc/booke/pmap.c Sat Nov 21 06:03:46 2015 (r291122) @@ -3298,7 +3298,7 @@ pmap_early_io_map(vm_paddr_t pa, vm_size return (tlb1[i].virt + (pa - tlb1[i].phys)); } - pa_base = trunc_page(pa); + pa_base = rounddown(pa, PAGE_SIZE); size = roundup(size + (pa - pa_base), PAGE_SIZE); tlb1_map_base = roundup2(tlb1_map_base, 1 << (ilog2(size) & ~1)); va = tlb1_map_base + (pa - pa_base);