Module Name: src Committed By: skrll Date: Sun Nov 24 14:49:04 UTC 2024
Modified Files: src/sys/arch/riscv/riscv: riscv_machdep.c Log Message: risc-v: fix riscv32 build To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/riscv/riscv/riscv_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/riscv/riscv/riscv_machdep.c diff -u src/sys/arch/riscv/riscv/riscv_machdep.c:1.40 src/sys/arch/riscv/riscv/riscv_machdep.c:1.41 --- src/sys/arch/riscv/riscv/riscv_machdep.c:1.40 Sat Nov 23 18:13:04 2024 +++ src/sys/arch/riscv/riscv/riscv_machdep.c Sun Nov 24 14:49:04 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: riscv_machdep.c,v 1.40 2024/11/23 18:13:04 skrll Exp $ */ +/* $NetBSD: riscv_machdep.c,v 1.41 2024/11/24 14:49:04 skrll Exp $ */ /*- * Copyright (c) 2014, 2019, 2022 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include "opt_riscv_debug.h" #include <sys/cdefs.h> -__RCSID("$NetBSD: riscv_machdep.c,v 1.40 2024/11/23 18:13:04 skrll Exp $"); +__RCSID("$NetBSD: riscv_machdep.c,v 1.41 2024/11/24 14:49:04 skrll Exp $"); #include <sys/param.h> @@ -928,9 +928,12 @@ mm_md_kernacc(void *ptr, vm_prot_t prot, if (va < data_start && (prot & VM_PROT_WRITE) != 0) { return EFAULT; } - } else if (IN_RANGE_P(va, RISCV_DIRECTMAP_START, RISCV_DIRECTMAP_END)) { + } +#ifdef _LP64 + else if (IN_RANGE_P(va, RISCV_DIRECTMAP_START, RISCV_DIRECTMAP_END)) { *handled = true; } +#endif return 0; }