From owner-svn-src-stable@FreeBSD.ORG Sun Nov 3 16:03:20 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5E49E979; Sun, 3 Nov 2013 16:03:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4A85D2510; Sun, 3 Nov 2013 16:03:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3G3KWs035210; Sun, 3 Nov 2013 16:03:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3G3KPk035209; Sun, 3 Nov 2013 16:03:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201311031603.rA3G3KPk035209@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 3 Nov 2013 16:03:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r257575 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 16:03:20 -0000 Author: kib Date: Sun Nov 3 16:03:19 2013 New Revision: 257575 URL: http://svnweb.freebsd.org/changeset/base/257575 Log: MFC r257216: Several small fixes for the amd64 minidump code. Approved by: re (gjb) Modified: stable/10/sys/amd64/amd64/minidump_machdep.c Directory Properties: stable/10/sys/ (props changed) Modified: stable/10/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/minidump_machdep.c Sun Nov 3 14:00:17 2013 (r257574) +++ stable/10/sys/amd64/amd64/minidump_machdep.c Sun Nov 3 16:03:19 2013 (r257575) @@ -127,8 +127,9 @@ report_progress(size_t progress, size_t int sofar, i; sofar = 100 - ((progress * 100) / dumpsize); - for (i = 0; i < 10; i++) { - if (sofar < progress_track[i].min_per || sofar > progress_track[i].max_per) + for (i = 0; i < nitems(progress_track); i++) { + if (sofar < progress_track[i].min_per || + sofar > progress_track[i].max_per) continue; if (progress_track[i].visited) return; @@ -157,8 +158,8 @@ blk_write(struct dumperinfo *di, char *p printf("cant have both va and pa!\n"); return (EINVAL); } - if (pa != 0 && (((uintptr_t)ptr) % PAGE_SIZE) != 0) { - printf("address not page aligned\n"); + if ((((uintptr_t)pa) % PAGE_SIZE) != 0) { + printf("address not page aligned %p\n", ptr); return (EINVAL); } if (ptr != NULL) { @@ -230,6 +231,8 @@ minidumpsys(struct dumperinfo *di) retry: retry_count++; counter = 0; + for (i = 0; i < nitems(progress_track); i++) + progress_track[i].visited = 0; /* Walk page table pages, set bits in vm_page_dump */ pmapsize = 0; for (va = VM_MIN_KERNEL_ADDRESS; va < MAX(KERNBASE + nkpt * NBPDR,