[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:53:52 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222234

--- Comment #5 from Mark Millard <markmi at dsl-only.net> ---
(In reply to Mark Millard from comment #4)

I found ARMv7 material indicating the same sort
of issue for sev use:

The Event signal is seen to be a non-memory communication, and as such the
update to memory releasing the lock must actually be observable by all
observers when the SEV instruction is executed and the event is sent. This then
requires the use of DSB rather than DMB.

There is:

/usr/src/sys/arm/include/cpu-v6.h:#define sev()  __asm __volatile("sev" : : :
"memory")

# grep -r 'sev()' /usr/src/sys/ | more
/usr/src/sys/arm/altera/socfpga/socfpga_mp.c:   sev();
/usr/src/sys/arm/allwinner/aw_mp.c:     sev();
/usr/src/sys/arm/allwinner/aw_mp.c:     sev();
/usr/src/sys/arm/mv/armada38x/pmsu.c:   sev();
/usr/src/sys/arm/broadcom/bcm2835/bcm2836_mp.c:         sev();
/usr/src/sys/arm/broadcom/bcm2835/bcm2836_mp.c:         sev();
/usr/src/sys/arm/xilinx/zy7_mp.c:       sev();
/usr/src/sys/arm/amlogic/aml8726/aml8726_mp.c:  sev();
/usr/src/sys/arm/include/cpu-v6.h:#define sev()  __asm __volatile("sev" : : :
"memory")
/usr/src/sys/arm/arm/mp_machdep.c:      sev();
/usr/src/sys/arm/ti/omap4/omap4_mp.c:   sev();
/usr/src/sys/arm/freescale/imx/imx6_mp.c:       sev();
/usr/src/sys/arm/rockchip/rk30xx_mp.c:  sev();
/usr/src/sys/arm/nvidia/tegra124/tegra124_mp.c: sev();
/usr/src/sys/arm/samsung/exynos/exynos5_mp.c:   sev();

These all seem to have dsb use, for example
/usr/src/sys/arm/arm/mp_machdep.c has:

        atomic_store_rel_int(&aps_ready, 1);
        /* Wake the other threads up */
        dsb();
        sev();

        printf("Release APs\n");

in its release_aps .

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list