Module Name: src Committed By: riastradh Date: Sun Nov 14 16:56:32 UTC 2021
Modified Files: src/sys/arch/aarch64/aarch64: locore.S src/sys/arch/arm/arm: armv6_start.S cpu_subr.c Log Message: arm: Fix CPU startup synchronization. - Use load-acquire instead of (wrong) membar_consumer then load in cpu_boot_secondary_processors and cpu_hatched_p. => (Could use load then membar_consumer instead but load-acquire is shorter.) - Issue dmb ish before setting or clearing the bit in cpu_set_hatched and cpu_clr_mbox to effect a store-release. => (Could use membar_exit, which is semantically weaker than dmb ish but on arm is just implemented as dmb ish.) => (Could use stlr except we don't have atomic_ops(9) to do that.) This way, everything before cpu_set_hatched or cpu_clr_mbox is guaranteed to happen before everything after cpu_boot_secondary_processors, which was previously not guaranteed. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/arch/aarch64/aarch64/locore.S cvs rdiff -u -r1.36 -r1.37 src/sys/arch/arm/arm/armv6_start.S cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/arm/cpu_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.