git: d101d5732143 - main - arm dbg: Use PCPU_GET(cpuid) directly in assertions.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Apr 2022 23:09:44 UTC
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=d101d5732143455d98bf756d728bb2f5a1947a9b
commit d101d5732143455d98bf756d728bb2f5a1947a9b
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-13 23:08:21 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-13 23:08:21 +0000
arm dbg: Use PCPU_GET(cpuid) directly in assertions.
---
sys/arm/arm/debug_monitor.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sys/arm/arm/debug_monitor.c b/sys/arm/arm/debug_monitor.c
index 7f4dd829b4f9..1d00c0473dde 100644
--- a/sys/arm/arm/debug_monitor.c
+++ b/sys/arm/arm/debug_monitor.c
@@ -1013,7 +1013,6 @@ CTASSERT(sizeof(struct dbreg) == sizeof(((struct pcpu *)NULL)->pc_dbreg));
void
dbg_monitor_init_secondary(void)
{
- u_int cpuid;
int err;
/*
* This flag is set on the primary CPU
@@ -1022,8 +1021,6 @@ dbg_monitor_init_secondary(void)
if (!dbg_capable())
return;
- cpuid = PCPU_GET(cpuid);
-
err = dbg_reset_state();
if (err != 0) {
/*
@@ -1031,7 +1028,7 @@ dbg_monitor_init_secondary(void)
* WPs/BPs will not work correctly on this CPU.
*/
KASSERT(0, ("%s: Failed to reset Debug Architecture "
- "state on CPU%d", __func__, cpuid));
+ "state on CPU%d", __func__, PCPU_GET(cpuid)));
/* Disable HW debug capabilities for all CPUs */
atomic_set_int(&dbg_capable_var, 0);
return;
@@ -1039,7 +1036,7 @@ dbg_monitor_init_secondary(void)
err = dbg_enable_monitor();
if (err != 0) {
KASSERT(0, ("%s: Failed to enable Debug Monitor"
- " on CPU%d", __func__, cpuid));
+ " on CPU%d", __func__, PCPU_GET(cpuid)));
atomic_set_int(&dbg_capable_var, 0);
}
}