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
This commit is contained in:
kib 2020-05-27 21:44:26 +00:00
parent d10d581667
commit 29eadb01b7

View File

@ -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 &&