git: 36c2fec31dd6 - main - riscv: Remove MACHINE_ARCH-specific remnants of riscv64sf.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Jun 2023 17:19:37 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=36c2fec31dd6e7663acf8f9aac12e66dfff71889
commit 36c2fec31dd6e7663acf8f9aac12e66dfff71889
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-06-27 17:19:31 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-06-27 17:19:31 +0000
riscv: Remove MACHINE_ARCH-specific remnants of riscv64sf.
- Remove now unnecessary MACHINE_ARCHES definition. The default logic
in kern_mib.c works fine now for RISC-V.
- Remove custom sv_machine_arch hook from sysentvec.
Fixes: 1ca12bd927d7 Remove the riscv64sf architecture.
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D40648
---
sys/riscv/include/param.h | 3 ---
sys/riscv/riscv/elf_machdep.c | 13 -------------
2 files changed, 16 deletions(-)
diff --git a/sys/riscv/include/param.h b/sys/riscv/include/param.h
index 56fe9530b76d..1192865cda28 100644
--- a/sys/riscv/include/param.h
+++ b/sys/riscv/include/param.h
@@ -50,9 +50,6 @@
#ifndef MACHINE_ARCH
#define MACHINE_ARCH "riscv64"
#endif
-#ifdef _KERNEL
-#define MACHINE_ARCHES "riscv64"
-#endif
#ifdef SMP
#ifndef MAXCPU
diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c
index e0d37257facd..54298e8f7797 100644
--- a/sys/riscv/riscv/elf_machdep.c
+++ b/sys/riscv/riscv/elf_machdep.c
@@ -59,8 +59,6 @@ __FBSDID("$FreeBSD$");
#include <machine/elf.h>
#include <machine/md_var.h>
-static const char *riscv_machine_arch(struct proc *p);
-
u_long elf_hwcap;
static struct sysentvec elf64_freebsd_sysvec = {
@@ -98,7 +96,6 @@ static struct sysentvec elf64_freebsd_sysvec = {
.sv_thread_detach = NULL,
.sv_trap = NULL,
.sv_hwcap = &elf_hwcap,
- .sv_machine_arch = riscv_machine_arch,
.sv_onexec_old = exec_onexec_old,
.sv_onexit = exit_onexit,
.sv_regset_begin = SET_BEGIN(__elfN(regset)),
@@ -106,16 +103,6 @@ static struct sysentvec elf64_freebsd_sysvec = {
};
INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec);
-static const char *
-riscv_machine_arch(struct proc *p)
-{
-
- if ((p->p_elf_flags & EF_RISCV_FLOAT_ABI_MASK) ==
- EF_RISCV_FLOAT_ABI_SOFT)
- return (MACHINE_ARCH "sf");
- return (MACHINE_ARCH);
-}
-
static Elf64_Brandinfo freebsd_brand_info = {
.brand = ELFOSABI_FREEBSD,
.machine = EM_RISCV,