[Bug 222234] head -r323246 aarch64 (Pine64+ 2GB) boot time context, sometimes: acquiring blockable sleep lock with spinlock or critical section held
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Sep 17 03:43:22 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222234
--- Comment #4 from Mark Millard <markmi at dsl-only.net> ---
(In reply to Mark Millard from comment #2)
There appears to be another potential
example of the lack of dsb before sev
for aarch64:
identcpu.c has:
void
identify_cpu(void)
{
. . .
if (cpu != 0) {
/*
* This code must run on one cpu at a time, but we are
* not scheduling on the current core so implement a
* simple spinlock.
*/
while (atomic_cmpset_acq_int(&ident_lock, 0, 1) == 0)
__asm __volatile("wfe" ::: "memory");
. . .
/* Wake up the other CPUs */
atomic_store_rel_int(&ident_lock, 0);
__asm __volatile("sev" ::: "memory");
}
}
vs. as shown in the patch for release_aps :
# svnlite diff /usr/src/sys/arm64/arm64/mp_machdep.c
Index: /usr/src/sys/arm64/arm64/mp_machdep.c
===================================================================
--- /usr/src/sys/arm64/arm64/mp_machdep.c (revision 323246)
+++ /usr/src/sys/arm64/arm64/mp_machdep.c (working copy)
@@ -236,7 +236,9 @@
atomic_store_rel_int(&aps_ready, 1);
/* Wake up the other CPUs */
- __asm __volatile("sev");
+ __asm __volatile(
+ "dsb ish \n"
+ "sev \n");
printf("Release APs\n");
One difference vs. the origin release_aps
text is the notation:
::: "memory"
in identify_cpu . I'm not expert in the relevant
notation and its usage/intent.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list