opnsense-src/sys/arm
Olivier Certner 5e9a82e898
atomics: Constify loads
In order to match reality, allow using these functions with pointers on
const objects, and bring us closer to C11.

Remove the '+' modifier in the atomic_load_acq_64_i586()'s inline asm
statement's constraint for '*p' (the value to load).  CMPXCHG8B always
writes back some value, even when the value exchange does not happen in
which case what was read is written back.  atomic_load_acq_64_i586()
further takes care of the operation atomically writing back the same
value that was read in any case.  All in all, this makes the inline
asm's write back undetectable by any other code, whether executing on
other CPUs or code on the same CPU before and after the call to
atomic_load_acq_64_i586(), except for the fact that CMPXCHG8B will
trigger a #GP(0) if the memory address is part of a read-only mapping.
This unfortunate property is however out of scope of the C abstract
machine, and in particular independent of whether the 'uint64_t' pointed
to is declared 'const' or not.

Approved by:    markj (mentor)
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D46887
2024-12-16 15:42:26 +01:00
..
allwinner aw_gpio: Add a missing comma 2024-12-12 14:45:11 +08:00
annapurna/alpine Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
arm Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
broadcom/bcm2835 bus_delayed_attach_children: Switch return type to void 2024-12-06 17:27:14 -05:00
conf Remove TI reference from arm/GENERIC 2024-09-19 20:15:47 +02:00
freescale bus_delayed_attach_children: Switch return type to void 2024-12-06 17:27:14 -05:00
include atomics: Constify loads 2024-12-16 15:42:26 +01:00
mv bus_delayed_attach_children: Switch return type to void 2024-12-06 17:27:14 -05:00
nvidia vm_page: pass page to iter_remove 2024-12-08 14:30:22 -06:00
qemu sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
qualcomm Replace calls to bus_generic_attach with bus_attach_children 2024-12-06 17:26:16 -05:00
rockchip conf: deduplicate dwmmc config logic 2024-02-27 18:10:14 -04:00
ti bus_delayed_attach_children: Switch return type to void 2024-12-06 17:27:14 -05:00
xilinx Use bus_delayed_attach_children instead of its inline implementation 2024-10-21 10:24:39 -04:00