From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 17:12:52 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FF91E0B; Wed, 24 Dec 2014 17:12:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 5C2023CA9; Wed, 24 Dec 2014 17:12:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBOHCqjU039382; Wed, 24 Dec 2014 17:12:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBOHCqvW039381; Wed, 24 Dec 2014 17:12:52 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201412241712.sBOHCqvW039381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 24 Dec 2014 17:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276187 - head/sys/arm/arm 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.18-1 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: Wed, 24 Dec 2014 17:12:52 -0000 Author: ian Date: Wed Dec 24 17:12:51 2014 New Revision: 276187 URL: https://svnweb.freebsd.org/changeset/base/276187 Log: Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping. Submitted by: Svatopluk Kraus , Michal Meloun Modified: head/sys/arm/arm/dump_machdep.c Modified: head/sys/arm/arm/dump_machdep.c ============================================================================== --- head/sys/arm/arm/dump_machdep.c Wed Dec 24 16:11:15 2014 (r276186) +++ head/sys/arm/arm/dump_machdep.c Wed Dec 24 17:12:51 2014 (r276187) @@ -160,11 +160,13 @@ static int cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) { struct dumperinfo *di = (struct dumperinfo*)arg; - vm_paddr_t pa; + vm_paddr_t a, pa; + void *va; uint32_t pgs; size_t counter, sz, chunk; - int c, error; + int i, c, error; + va = 0; error = 0; /* catch case in which chunk size is 0 */ counter = 0; pgs = mdp->md_size / PAGE_SIZE; @@ -194,16 +196,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr printf(" %d", pgs * PAGE_SIZE); counter &= (1<<24) - 1; } - if (pa == (pa & L1_ADDR_BITS)) { - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); - cpu_tlb_flushID_SE(0); - cpu_cpwait(); + for (i = 0; i < chunk; i++) { + a = pa + i * PAGE_SIZE; + va = pmap_kenter_temporary(trunc_page(a), i); } #ifdef SW_WATCHDOG wdog_kern_pat(WD_LASTVAL); #endif - error = dump_write(di, - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz); + error = dump_write(di, va, 0, dumplo, sz); if (error) break; dumplo += sz;