Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2020 21:44:26 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361563 - head/sys/vm
Message-ID:  <202005272144.04RLiQTZ084971@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed May 27 21:44:26 2020
New Revision: 361563
URL: https://svnweb.freebsd.org/changeset/base/361563

Log:
  Simplify the condition to enable superpage mappings in vm_fault_soft_fast().
  
  The list of arches list there matches the list of arches where
  default VM_NRESERVLEVEL > 0.  Before sparc64 removal, that was the
  only arch that defined VM_NRESERVLEVEL > 0 to help with cache coloring,
  but did not implemented superpages.  Now it can be simplified.
  
  Submitted by:	alc
  Reviewed by:	markj

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Wed May 27 19:13:26 2020	(r361562)
+++ head/sys/vm/vm_fault.c	Wed May 27 21:44:26 2020	(r361563)
@@ -299,9 +299,7 @@ static int
 vm_fault_soft_fast(struct faultstate *fs)
 {
 	vm_page_t m, m_map;
-#if (defined(__aarch64__) || defined(__amd64__) || (defined(__arm__) && \
-    __ARM_ARCH >= 6) || defined(__i386__) || defined(__powerpc64__) || \
-    defined(__riscv)) && VM_NRESERVLEVEL > 0
+#if VM_NRESERVLEVEL > 0
 	vm_page_t m_super;
 	int flags;
 #endif
@@ -320,9 +318,7 @@ vm_fault_soft_fast(struct faultstate *fs)
 	}
 	m_map = m;
 	psind = 0;
-#if (defined(__aarch64__) || defined(__amd64__) || (defined(__arm__) && \
-    __ARM_ARCH >= 6) || defined(__i386__) || defined(__powerpc64__) || \
-    defined(__riscv)) && VM_NRESERVLEVEL > 0
+#if VM_NRESERVLEVEL > 0
 	if ((m->flags & PG_FICTITIOUS) == 0 &&
 	    (m_super = vm_reserv_to_superpage(m)) != NULL &&
 	    rounddown2(vaddr, pagesizes[m_super->psind]) >= fs->entry->start &&



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