svn commit: r339081 - stable/11/sys/amd64/amd64

Konstantin Belousov kib at FreeBSD.org
Tue Oct 2 09:51:26 UTC 2018


Author: kib
Date: Tue Oct  2 09:51:25 2018
New Revision: 339081
URL: https://svnweb.freebsd.org/changeset/base/339081

Log:
  MFC r338932:
  Fix some uses of dmaplimit.

Modified:
  stable/11/sys/amd64/amd64/pmap.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/11/sys/amd64/amd64/pmap.c	Tue Oct  2 08:13:54 2018	(r339080)
+++ stable/11/sys/amd64/amd64/pmap.c	Tue Oct  2 09:51:25 2018	(r339081)
@@ -1337,7 +1337,7 @@ pmap_init(void)
 		if (ppim->va == 0)
 			continue;
 		/* Make the direct map consistent */
-		if (ppim->pa < dmaplimit && ppim->pa + ppim->sz < dmaplimit) {
+		if (ppim->pa < dmaplimit && ppim->pa + ppim->sz <= dmaplimit) {
 			(void)pmap_change_attr(PHYS_TO_DMAP(ppim->pa),
 			    ppim->sz, ppim->mode);
 		}
@@ -6876,7 +6876,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mo
 		 * If the specified range of physical addresses fits within
 		 * the direct map window, use the direct map.
 		 */
-		if (pa < dmaplimit && pa + size < dmaplimit) {
+		if (pa < dmaplimit && pa + size <= dmaplimit) {
 			va = PHYS_TO_DMAP(pa);
 			if (!pmap_change_attr(va, size, mode))
 				return ((void *)(va + offset));


More information about the svn-src-all mailing list