Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Oct 2010 17:21:32 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r214563 - head/sys/amd64/amd64
Message-ID:  <201010301721.o9UHLWCe007732@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Sat Oct 30 17:21:32 2010
New Revision: 214563
URL: http://svn.freebsd.org/changeset/base/214563

Log:
  Don't demote in pmap_demote_DMAP() if the specified length is zero.

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Sat Oct 30 16:53:42 2010	(r214562)
+++ head/sys/amd64/amd64/pmap.c	Sat Oct 30 17:21:32 2010	(r214563)
@@ -4968,6 +4968,11 @@ pmap_demote_DMAP(vm_paddr_t base, vm_siz
 	vm_offset_t va;
 	boolean_t changed;
 
+	if (len == 0)
+		return;
+	KASSERT(powerof2(len), ("pmap_demote_DMAP: len is not a power of 2"));
+	KASSERT((base & (len - 1)) == 0,
+	    ("pmap_demote_DMAP: base is not a multiple of len"));
 	if (len < NBPDP) {
 		va = PHYS_TO_DMAP(base);
 		changed = FALSE;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010301721.o9UHLWCe007732>