#
✕ nick:marcan
#asahi · 2021-02-24 10:16
marcanobviously it has to be writable if AFP is enabled
#asahi · 2021-02-24 10:15
marcanis it writable from EL0 if AFP is disabled?
#asahi · 2021-02-24 10:14
marcan*covert channel
#asahi · 2021-02-24 10:07
marcanI'm going to need some kind of call_el0 thing in m1n1 to do EL0 tests...
#asahi · 2021-02-24 10:06
marcanif they also don't trap from EL0, then that's a two-bit sidechannel
#asahi · 2021-02-24 10:06
marcanaccesses do not trap, at least from EL2
#asahi · 2021-02-24 10:06
marcanit has to be enabled to *work*, but APFCR itself is not locked out if the feature is disabled; the bits just have no effect
#asahi · 2021-02-24 10:05
marcanarnd, maz: this one has me worried. it's a pre-standard implementation of FEAT_AFP (i.e. the SSE-compatible denormal handling), but with bits in a custom register, not FPCR
#asahi · 2021-02-24 10:04
marcandocumented another sysreg: AFPCR https://github.com/AsahiLinux/docs/wiki/HW:ARM-System-Registers#sys_apl_afpcr
#asahi · 2021-02-23 16:23
marcanbut once AIC gets involved it's going to be a mb() (or wmb())
#asahi · 2021-02-23 16:23
marcanI have fancier rationale for the stuff between normal memory accesses and atomics
#asahi · 2021-02-23 16:23
marcanI'm just going to punt and have a dsb for now then (as I already did in v2)
#asahi · 2021-02-23 16:17
marcanhonestly, I can't figure out from the ARM ARM how dmb affects ordering between Normal accesses and Device accesses
#asahi · 2021-02-23 14:08
marcanso we're probably good
#asahi · 2021-02-23 14:08
marcanarnd: yeah I think what we've ended up with doesn't really go against the discussion back then
#asahi · 2021-02-23 14:06
marcanthere were strong opinions that silent downgrade to ioremap() is a bad idea
#asahi · 2021-02-23 14:04
marcanbut returning NULL was already proposed as a better option for arches without support
#asahi · 2021-02-23 14:04
marcanlooks like this got dropped in favor of a one-off for pci config spaces
#asahi · 2021-02-23 13:59
marcanhttps://lkml.org/lkml/2017/3/27/220
#asahi · 2021-02-23 13:58
marcanturns out this was all done before, but never merged that way
#asahi · 2021-02-23 13:56
marcanoh hah
#asahi · 2021-02-23 13:44
marcanI can do that if you want, but I kind of worry about readability of the .rst version
#asahi · 2021-02-23 13:41
marcandon't worry too much about formatting, I'll double check that
#asahi · 2021-02-23 13:41
marcanyeah, I'll do the rst check
#asahi · 2021-02-23 13:39
marcanarnd: think it's good enough to throw into a patch and discuss it on the lists?
#asahi · 2021-02-23 13:37
marcanyup, sounds good
#asahi · 2021-02-23 13:30
marcanarnd: doc updated
#asahi · 2021-02-23 13:29
marcanyeah...
#asahi · 2021-02-23 13:19
marcanif you think this approach works I can give a shot at editing it in the doc
#asahi · 2021-02-23 13:15
marcanI was going to mention adding a sentence to that effect ("don't use this for PCIe drivers, ever")
#asahi · 2021-02-23 13:14
marcanbut that makes sense, no?
#asahi · 2021-02-23 13:14
marcanright
#asahi · 2021-02-23 13:13
marcanwhat do you mean?
#asahi · 2021-02-23 13:10
marcanthen every arm64 driver is allowed to use it (and if we have problems with SoCs where nE accesses are not truly nE, that's broken-SoC-needs-a-quirk territory and we can worry about it when we get there, if anyone ever does this)
#asahi · 2021-02-23 13:10
marcanthat could even be the "ioremap_np exists" signal; drivers can just try that, and fall back to ioremap
#asahi · 2021-02-23 13:09
marcanarnd: this makes me wonder if we shouldn't make the default ioremap_np not an alias for ioremap, but rather return NULL a la ioremap_uc
#asahi · 2021-02-23 13:08
marcanwhich is why I push people towards the abstractions that do the right thing
#asahi · 2021-02-23 13:07
marcanexactly
#asahi · 2021-02-23 10:36
marcanright now the flag means the latter
#asahi · 2021-02-23 10:36
marcanso we kind of have two situations to signal; "nonposted mode available and works", and "nonposted mode required"
#asahi · 2021-02-23 10:35
marcanbut most drivers don't *need* nonposted mode, and using it could decrease performance on platforms that have posted mode
#asahi · 2021-02-23 10:34
marcanso the thing is, the DT flag asks the standard APIs to always use nonposted mode
#asahi · 2021-02-23 10:33
marcanarnd: ah, it gets carried around with the transaction?
#asahi · 2021-02-23 10:06
marcanconversely, platforms which *support* but do not *require* nE semantics need not set that flag, but drivers may still want to use _np if it is known to work
#asahi · 2021-02-23 10:03
marcanI mean, I hope not, but if that were the case the flag would not mean that any more
#asahi · 2021-02-23 10:03
marcanI'm not even sure how true that is... in principle, we don't know for a fact that some sub-bus on the M1 doesn't break this, and thus requires nGnRnE due to the top-level fabric but then doesn't *actually* implemented non-posted semantics
#asahi · 2021-02-23 10:01
marcando you want specific examples, or what do you have in mind?
#asahi · 2021-02-23 10:00
marcanit's basically platform-specific, since even on arm64 platforms where nGnRnE is used I bet there are fabrics and buses that break it..
#asahi · 2021-02-23 09:58
marcanthat must clearly mean it's perfect :)
#asahi · 2021-02-23 09:56
marcanarnd: how did the draft go over with the other folks?

plus ›