From owner-svn-src-head@FreeBSD.ORG Tue May 22 07:04:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA112106564A; Tue, 22 May 2012 07:04:23 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B507D8FC0A; Tue, 22 May 2012 07:04:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4M74Nc0091185; Tue, 22 May 2012 07:04:23 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4M74NM6091183; Tue, 22 May 2012 07:04:23 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201205220704.q4M74NM6091183@svn.freebsd.org> From: Andrew Turner Date: Tue, 22 May 2012 07:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235776 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 22 May 2012 07:04:23 -0000 Author: andrew Date: Tue May 22 07:04:23 2012 New Revision: 235776 URL: http://svn.freebsd.org/changeset/base/235776 Log: Fix booting on ARM. In PHYS_TO_VM_PAGE() when VM_PHYSSEG_DENSE is set the check if we are past the end of vm_page_array was incorrect causing it to return NULL. This value is then used in vm_phys_add_page causing a data abort. Reviewed by: alc, kib, imp Tested by: stas Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue May 22 06:33:08 2012 (r235775) +++ head/sys/vm/vm_page.c Tue May 22 07:04:23 2012 (r235776) @@ -647,7 +647,7 @@ PHYS_TO_VM_PAGE(vm_paddr_t pa) long pi; pi = atop(pa); - if (pi >= first_page && pi < vm_page_array_size) { + if (pi >= first_page && (pi - first_page) < vm_page_array_size) { m = &vm_page_array[pi - first_page]; return (m); }