Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Sep 2009 15:23:03 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r196894 - stable/7/sys/vm
Message-ID:  <200909061523.n86FN3QP087453@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Sep  6 15:23:03 2009
New Revision: 196894
URL: http://svn.freebsd.org/changeset/base/196894

Log:
  Partial MFC of r194459 by thompsa, without merge recording,
  to allow the vm_phys_paddr_to_vm_page(9) to return NULL instead
  of panicking when supplied physical address does not correspond
  to a vm page. This is needed for device pager (and not yet merged
  sg pager) to skip memattr checks on specific addresses.
  
  Reported by:	Thierry Herbelot <thierry.herbelot free fr>

Modified:
  stable/7/sys/vm/vm_phys.c

Modified: stable/7/sys/vm/vm_phys.c
==============================================================================
--- stable/7/sys/vm/vm_phys.c	Sun Sep  6 14:23:26 2009	(r196893)
+++ stable/7/sys/vm/vm_phys.c	Sun Sep  6 15:23:03 2009	(r196894)
@@ -382,8 +382,7 @@ vm_phys_paddr_to_vm_page(vm_paddr_t pa)
 		if (pa >= seg->start && pa < seg->end)
 			return (&seg->first_page[atop(pa - seg->start)]);
 	}
-	panic("vm_phys_paddr_to_vm_page: paddr %#jx is not in any segment",
-	    (uintmax_t)pa);
+	return (NULL);
 }
 
 /*



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