From fe0dcc402fd86a9d5ff20d8bef5f5be514f13dee Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Wed, 27 May 2020 21:44:26 +0000 Subject: [PATCH] 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 --- sys/vm/vm_fault.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index 4e68e0e99f0..15802af6aad 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -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 &&