#
✕ nick:marcan
#asahi · 2021-03-04 14:36
marcanalso s3_0_c10_c3_0... same source says AMAIR_EL1
#asahi · 2021-03-04 14:35
marcandid they add something outside IMP-DEF?!
#asahi · 2021-03-04 14:35
marcanhuh, what's s3_1_c0_c0_7? that's not in the IMPDEF range... one google hit says AIDR_EL1
#asahi · 2021-03-04 14:33
marcanACTLR_EL1 is in with bit0, though I guess that's technically "IMPDEF". makes sense.
#asahi · 2021-03-04 14:32
marcanindeed it does...
#asahi · 2021-03-04 14:22
marcan(pushed that script to m1n1.git too)
#asahi · 2021-03-04 14:21
marcanthis should also be useful for figuring out IMPDEF sysregs, because it's conveniently grouping together related stuff
#asahi · 2021-03-04 14:21
marcanhttps://mrcn.st/p/05SKhIlG <- did an automated scan
#asahi · 2021-03-04 14:21
marcanthe bits trap specific things
#asahi · 2021-03-04 14:21
marcanTPIDR just traps everything
#asahi · 2021-03-04 14:21
marcanthey are ORed
#asahi · 2021-03-04 14:11
marcanI get the feeling most of HACR_EL2 is impdef trap bits
#asahi · 2021-03-04 14:10
marcansetting all the bits leaves only 7 impdef registers accessible at EL1
#asahi · 2021-03-04 14:08
marcanmaz: so TIDCP works as intended - which is actually relatively useless for VMing macOS because it traps way too much (in particular, that floating point stuff). however, HACR_EL2 has finer grained controls.
#asahi · 2021-03-04 09:04
marcanlovely
#asahi · 2021-03-04 03:20
marcanoh yes
#asahi · 2021-03-04 03:19
marcanno, like someone subscribed a customer support email so I'm getting "we've received your inquiry" to every email
#asahi · 2021-03-04 03:10
marcanmaz: is some Deutsche Bank stuff spamming replies to people who email linux-arm-kernel, or is it someone I CCed?
#asahi · 2021-03-03 18:27
marcanatomic_fetch_or(); atomic_read() is what would've worked if I hadn't run into that issue :)
#asahi · 2021-03-03 18:27
marcanI was leaning towards (1) too
#asahi · 2021-03-03 18:25
marcannote that atomic_fetch_or_acquire() does not cut it, as I need to order the *write* side of that, and _acquire applies to the *read* side.
#asahi · 2021-03-03 18:24
marcanthat one is obviously arch-independent
#asahi · 2021-03-03 18:24
marcan2) just atomic_or(); smp_mb__after_atomic(); atomic_read();
#asahi · 2021-03-03 18:24
marcanthat one relies on guarantees that ARM makes beyond Linux atomic ops (there is ordering between release-acquire pairs in the ARM ARM)
#asahi · 2021-03-03 18:23
marcan1) atomic_fetch_or_release(); atomic_read_acquire();
#asahi · 2021-03-03 18:23
marcanmaz: ok, so I have two options, pick your poison.
#asahi · 2021-03-03 16:53
marcanI will say Will's talks on this subject are great
#asahi · 2021-03-03 16:53
marcanfigures :)
#asahi · 2021-03-03 16:51
marcanbut yeah, I think this in combination with the atomics issue means it's probably time to stop here, throw a few barriers in (reasonable ones, still weaker and better thought out than I was using before) and if someone wants to suggest a better way of doing it and prove it with docs-lawyering they can do so :)
#asahi · 2021-03-03 16:50
marcanthings get very sticky once you involve shareability domains and device memory; AIUI the litmus tests don't cover any of that and just assume IS
#asahi · 2021-03-03 16:49
marcanbut I'm nowhere near certain I'm interpreting things right
#asahi · 2021-03-03 16:49
marcanlike for my latest question I'm pondering about atomics ordering vs MMIO... I'm basically jumping around 8 places in the doc and trying to piece together a coherent story, involving things like "oh, the word 'coherent' here probably means this only applies to the shareability domain it is mapped as... and then I guess there are no guarantees against other domains"
#asahi · 2021-03-03 16:48
marcanI swear though, the ARM ARM... I can't help but think surely there *must* be a better way of describing all this
#asahi · 2021-03-03 16:47
marcanha :D
#asahi · 2021-03-03 16:45
marcangood thing I can tell myself this was all worth it to have a better understanding of the memory model for everything that's to come :-)
#asahi · 2021-03-03 16:45
marcanmaz: so my current plan is I'll send v3 tomorrow, using explicit barriers in the IPI code based on my current understanding of the architecture and that apparent atomic bug, and let's see how that goes
#asahi · 2021-03-03 14:36
marcanI wonder what level of technical detail I should go into...
#asahi · 2021-03-03 14:36
marcanI'm going to start writing that progress update post for jan/feb too, that's long overdue
#asahi · 2021-03-03 14:36
marcanwell yes :)
#asahi · 2021-03-03 14:34
marcanbut yes, it qualifies as some stuff indirectly prompted by the M1 series
#asahi · 2021-03-03 14:34
marcanj`ey: I think some cleanup, but not any patches by me
#asahi · 2021-03-03 14:33
marcanIf only I didn't keep running into "this can't possibly be a bug, can it" bugs :-)
#asahi · 2021-03-03 14:33
marcanklaus: fwiw nothing is merged yet, but the first series should go into 5.13 if things don't drag on too much.
#asahi · 2021-03-03 12:44
marcan:)
#asahi · 2021-03-03 12:44
marcanbasically I convinced myself that the IO op ordering stuff was fine, only to now fall into another pit of ordering stuff related to atomics
#asahi · 2021-03-03 12:43
marcanthis has nothing to do with io reads, it's purely an atomics thing
#asahi · 2021-03-03 12:35
marcanmaz: fire of an email to the list and CC Will I guess?
#asahi · 2021-03-03 12:18
marcanso this is clearly inconsistent: adding an smp_mb() is stronger
#asahi · 2021-03-03 12:18
marcanbefore and an smp_mb() after the primitive.
#asahi · 2021-03-03 12:18
marcansubsequent. Therefore a fully ordered primitive is like having an smp_mb()

plus ›