tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: membar_enter semantics
On Fri, Feb 11, 2022 at 11:33:39AM -0500, Mouse wrote:
> >> sparc64: [...]
> > Almost forgot to mention ... I wouldn't read too much into how sparc64's bar$
>
> Is that choice run-time configurable? I thought it was baked into the
> hardware...but admittedly that's based on documents I read Quite Some
> Time Ago.
For v9 it can be set per process even. See the TSTATE_MM_* bits:
#define PSTATE_MM 0x0c0 /* memory model */
#define PSTATE_MM_TSO 0x000 /* total store order */
#define PSTATE_MM_PSO 0x040 /* partial store order */
#define PSTATE_MM_RMO 0x080 /* Relaxed memory order */
And we use TSO for the kernel:
#define PSTATE_KERN (PSTATE_MM_TSO|PSTATE_PRIV)
so Jason is correct. For userland we default to RMO for 64bit binaries
(but honor their elf flags), and TSO for 32bit.
Martin
Home |
Main Index |
Thread Index |
Old Index