svn commit: r196894 - stable/7/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sun Sep 6 15:23:03 UTC 2009


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);
 }
 
 /*


More information about the svn-src-stable-7 mailing list