#
✕ nick:marcan
#asahi · 2021-03-03 12:18
marcanFully ordered primitives are ordered against everything prior and everything
#asahi · 2021-03-03 12:18
marcanthe docs say
#asahi · 2021-03-03 12:18
marcantests positive; adding a dmb ish between the ldsetal and the ldr makes it negative
#asahi · 2021-03-03 12:17
marcanmaz: try this: https://mrcn.st/p/m1ZaX7Lm
#asahi · 2021-03-03 12:17
marcanand herd7 says I'm right :-)
#asahi · 2021-03-03 12:14
marcanah yeah, that one does work
#asahi · 2021-03-03 12:09
marcanI tried writing a litmus test for this, but I think RMEM doesn't support the LSE atomic memory ops...
#asahi · 2021-03-03 12:09
marcanwhich means those are not fully ordered as atomic_t.txt says
#asahi · 2021-03-03 12:09
marcannothing stops the store-release operation from moving after subsequent operations, and vice versa for the load
#asahi · 2021-03-03 12:08
marcanthat is weaker, isn't it?
#asahi · 2021-03-03 12:08
marcanhowever, the *al instructions are defined as having load-acquire semantics for the load, and store-release semantics for the store, AFAICT
#asahi · 2021-03-03 12:02
marcanthose ops are implemented using e.g. ldsetal
#asahi · 2021-03-03 12:02
marcanatomic_t.txt says "RMW operations that have a return value are fully ordered"
#asahi · 2021-03-03 12:01
marcanplease prove me wrong :D
#asahi · 2021-03-03 12:01
marcanI now have a theory that the atomic_lse.h implementation on arm64 is incorrect vs the atomics documentation
#asahi · 2021-03-03 12:00
marcanmaz: current status: back at agonizing over memory ordering
#asahi · 2021-03-03 12:00
marcanklaus: I'm working on getting the basic stuff checked there upstreamed first
#asahi · 2021-03-01 15:54
marcanmaz: good point; that means I need to do EL1 testing now :>
#asahi · 2021-03-01 10:34
marcanwatched a couple of Will's talks earlier too, those were a good source of info too (though now obsolete with the dmb story)
#asahi · 2021-03-01 10:33
marcan(plus I might find more CPU bugs... hopefully not of the security variety this time)
#asahi · 2021-03-01 10:32
marcanmight still play around with making a little litmus test framework for m1n1 though, because this won't be the first ordering question we have, and with Apple's proprietary sysreg stuff there are unanswered questions anyway
#asahi · 2021-03-01 10:31
marcanso I'll buy that dmb is enough :-)
#asahi · 2021-03-01 10:31
marcanwhich obsoletes the older thinking that dsb is needed
#asahi · 2021-03-01 10:31
marcani.e. that it was a *change* in the spec
#asahi · 2021-03-01 10:31
marcanglad I found that commit though, that finally explains the dmb vs dsb story
#asahi · 2021-03-01 10:28
marcanI'll do all of it then, seems cleaner. I'll make sure 32bit still builds.
#asahi · 2021-03-01 10:27
marcanI'll test the 32bit build anyway to make sure
#asahi · 2021-03-01 10:27
marcanmaz: already switched to only the required register in my local branch (or do you want all of ICH_*?)
#asahi · 2021-03-01 04:20
marcanalso, this commit is a good read: 22ec71615
#asahi · 2021-03-01 04:07
marcan(and in that case I can get away with the relaxed; the ordering before it is guaranteed by the readl() for the main AIC reason register)
#asahi · 2021-03-01 04:06
marcanmaz: re the AIC ordering, since the IPI ack is an MMIO *write*, not a *read*, and writel() orders before the write, not after, at the very least it seems I'd need a dma_wmb() after it, before the atomic op
#asahi · 2021-03-01 04:04
marcanin particular, the latter says the _relaxed versions do *not* guarantee ordering with spinlocks
#asahi · 2021-03-01 04:04
marcanarnd: going to put together v3, but I just realized that your section of device-io.rst somewhat overlaps with, and partially contradicts, memory-barriers.txt
#asahi · 2021-03-01 01:33
marcan"
#asahi · 2021-03-01 01:33
marcanShareable shareability domain.
#asahi · 2021-03-01 01:33
marcankettenis: it does say " This architecture assumes that all PEs that use the same operating system or hypervisor are in the same Inner
#asahi · 2021-02-28 06:37
marcantested macvdmtool as a host, vdmtool target, etc on the Macbook Air. No change. 11.2.2 is fine.
#asahi · 2021-02-28 06:32
marcanI get the feeling these machines will claim to be "powered" by an adapter supplying only 5V/500mA but not *actually* run off of that...
#asahi · 2021-02-28 06:32
marcanthat's clearly a lie; possibly a bug
#asahi · 2021-02-28 06:32
marcanoh, it says "not charging" but "power source: power adapter"
#asahi · 2021-02-28 06:30
marcanthat seems.... unlikely
#asahi · 2021-02-28 06:30
marcanheh, my MBA claimed to be charging, with VBUS powered off of an Arduino GPIO output
#asahi · 2021-02-28 04:35
marcanthis is a completely baseless hypothetical
#asahi · 2021-02-28 04:35
marcanbut why would they?
#asahi · 2021-02-28 04:35
marcanI mean of course they could remove the feature altogether if they felt like it
#asahi · 2021-02-28 04:31
marcanI can do that in a sec
#asahi · 2021-02-28 04:31
marcanI haven't tested it yet but I doubt they broke the serial support?
#asahi · 2021-02-28 04:30
marcanbgb: what, the usb c thing?
#asahi · 2021-02-28 01:45
marcanand in theory writel() is supposed to be safe for exactly that use case
#asahi · 2021-02-28 01:44
marcankettenis: that's how I read it too, but yet the way Linux does writel() is just `dmb oshst` before the write

plus ›