git: 1c41e411b554 - main - arm64: Have get_kernel_reg return void
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 09 Feb 2026 17:25:27 UTC
The branch main has been updated by andrew:
URL: https://cgit.FreeBSD.org/src/commit/?id=1c41e411b5545a9e68f83b445f67030cb0e79010
commit 1c41e411b5545a9e68f83b445f67030cb0e79010
Author: Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2026-02-09 17:24:28 +0000
Commit: Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2026-02-09 17:24:28 +0000
arm64: Have get_kernel_reg return void
It now panics when it's unable to find the register, so doesn't need
to return a status.
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D55106
---
sys/arm64/arm64/identcpu.c | 8 ++++----
sys/arm64/include/cpu.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index a1e7a43977f0..91078a411b88 100644
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -2514,7 +2514,7 @@ mrs_field_cmp(uint64_t a, uint64_t b, u_int shift, int width, bool sign)
return (a - b);
}
-bool
+void
get_kernel_reg_iss(u_int iss, uint64_t *val)
{
int i;
@@ -2522,7 +2522,7 @@ get_kernel_reg_iss(u_int iss, uint64_t *val)
for (i = 0; i < nitems(user_regs); i++) {
if (user_regs[i].iss == iss) {
*val = CPU_DESC_FIELD(kern_cpu_desc, i);
- return (true);
+ return;
}
}
@@ -2533,7 +2533,7 @@ get_kernel_reg_iss(u_int iss, uint64_t *val)
* Fetch the specified register's value, ensuring that individual field values
* do not exceed those in the mask.
*/
-bool
+void
get_kernel_reg_iss_masked(u_int iss, uint64_t *valp, uint64_t mask)
{
const struct mrs_field *fields;
@@ -2549,7 +2549,7 @@ get_kernel_reg_iss_masked(u_int iss, uint64_t *valp, uint64_t mask)
fields[j].shift, fields[j].sign);
}
*valp = mask;
- return (true);
+ return;
}
}
diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h
index b15210633d37..9f1db23744d4 100644
--- a/sys/arm64/include/cpu.h
+++ b/sys/arm64/include/cpu.h
@@ -282,10 +282,10 @@ void update_special_regs(u_int);
void update_special_reg_iss(u_int, uint64_t, uint64_t);
#define update_special_reg(reg, clear, set) \
update_special_reg_iss(reg ## _ISS, clear, set)
-bool get_kernel_reg_iss(u_int, uint64_t *);
+void get_kernel_reg_iss(u_int, uint64_t *);
#define get_kernel_reg(reg, valp) \
get_kernel_reg_iss(reg ## _ISS, valp)
-bool get_kernel_reg_iss_masked(u_int, uint64_t *, uint64_t);
+void get_kernel_reg_iss_masked(u_int, uint64_t *, uint64_t);
#define get_kernel_reg_masked(reg, valp, mask) \
get_kernel_reg_iss_masked(reg ## _ISS, valp, mask)
bool get_user_reg_iss(u_int, uint64_t *, bool);