#asahi · 2021-02-22 11:23
marcanand z2ram#asahi · 2021-02-22 11:23
marcanthe only things using ioremap_wt are certain framebuffers, and I bet there are 0 intances of any of those being used on ARM64#asahi · 2021-02-22 11:21
marcanthe better question is why was it nGnRE to begin with#asahi · 2021-02-22 11:21
marcanlooks like that was a multi-arch NFC cleanup patch#asahi · 2021-02-22 11:18
marcan(cc maz, any idea why we don't have this yet?)#asahi · 2021-02-22 11:17
marcanI hope that doesn't break any broken drivers that wrongly used it :)#asahi · 2021-02-22 11:16
marcanwe just need #define ioremap_wt(addr, size) __ioremap((addr), (size), __pgprot(PROT_NORMAL_WT))#asahi · 2021-02-22 11:16
marcanyeah#asahi · 2021-02-22 11:15
marcanyeah, it's a thing anyway, so it should be implemented#asahi · 2021-02-22 11:14
marcanthat feels odd, if the order is ioremap > ioremap_wc > ioremap_wt, then ioremap_wt should fall back to ioremap_wc, not ioremap#asahi · 2021-02-22 11:14
marcanbut ioremap_wc is#asahi · 2021-02-22 11:14
marcanioremap_wt is not implemented on ARM64, which means it falls back to ioremap#asahi · 2021-02-22 11:14
marcanwell I just realized something silly perhaps#asahi · 2021-02-22 11:10
marcanatyfb and intel-lpss#asahi · 2021-02-22 11:09
marcanit's used in... two drivers outside of arch/#asahi · 2021-02-22 11:00
marcanah, right, I have them in the wrong order then#asahi · 2021-02-22 10:53
marcanI had to think pretty hard about readl() vs _relaxed for AIC and I'm still not 100% on the details#asahi · 2021-02-22 10:53
marcanit's very hard to wrap your head around this stuff if you're not already familiar with the semantics#asahi · 2021-02-22 10:53
marcanabsolutely#asahi · 2021-02-22 10:43
marcan(uhh nevermind the pharmacy, mission abort on that)#asahi · 2021-02-22 10:41
marcan(comments welcome, I'm no expert on the ioremap_*() sematics :))#asahi · 2021-02-22 10:41
marcan(bbiab, need to make a quick trip to the pharmacy)#asahi · 2021-02-22 09:45
marcanhttps://docs.google.com/document/d/1A1wUqhtnOcZdoJRb5ji14gWemRIWNqAP_gNUpxtQkT0/edit?usp=sharing#asahi · 2021-02-22 09:41
marcaneven if we don't touch it#asahi · 2021-02-22 09:41
marcanoh sure, but I figured I might as well have the whole doc in there for context#asahi · 2021-02-22 09:40
marcan(I'll make sure not to spuriously re-wrap stuff we didn't touch, but it's easier to do all that in one final pass anyway rather than try to keep stuff wrapped)#asahi · 2021-02-22 09:40
marcanhow about I de-wrap Documentation/driver-api/device-io.rst into a doc, we can mess with it there, and then I can take care of re-wrapping it for the submission?#asahi · 2021-02-22 09:39
marcanit should be a short-term thing anyway, not a living doc#asahi · 2021-02-22 09:38
marcangoogle docs should work for everyone, I can just have by-link access#asahi · 2021-02-22 09:38
marcanyeah, honestly I think Documentation/driver-api/device-io.rst probably needs a big revamp to make this all clearer, and also give arches a template to work off of#asahi · 2021-02-22 09:36
marcanyup, I saw that one#asahi · 2021-02-22 09:35
marcanoh, that works for me; I can throw it on the Asahi wiki as a WIP text, or google docs or something like that if you prefer real-time collaboration as a one-off thing?#asahi · 2021-02-22 09:32
marcanthanks, will do :)#asahi · 2021-02-22 09:31
marcanthat mentions ioremap, but none of the variants#asahi · 2021-02-22 09:31
marcanmaybe a new section in Documentation/driver-api/device-io.rst then#asahi · 2021-02-22 09:26
marcanat least listing out the mapping between ioremap types, MAIR settings, and what they mean#asahi · 2021-02-22 09:26
marcanmaz: oh yeah, one more thing, since I had a request for documenting ioremap_np... I haven't found any actual arch-agnostic ioremap docs, and I have no idea if I'd dare write one from scratch given all the "fun" details involved... but maybe it's worth giving a shot at writing an arm64 one?#asahi · 2021-02-22 09:25
marcansome of them are the same, some of them have identical function in the E/P registers#asahi · 2021-02-22 09:24
marcanpart of this I'm guessing based on the chicken bit names#asahi · 2021-02-22 09:24
marcanso you would expect them to match in behavior (which is also pretty important not to run into horribleness with SMP)#asahi · 2021-02-22 09:23
marcanbut not so much be a completely different design#asahi · 2021-02-22 09:23
marcanso the power-efficient cores will have less wide dispatch, be built with less leaky / slower cells, have downsized elements, and stuff like that#asahi · 2021-02-22 09:23
marcanAIUI, the way these big.LITTLE systems are engineered (at least in Apple's case) is that the CPUs basically share the same design, and instead are just largely different configurations and synthesis options#asahi · 2021-02-22 09:22
marcanha#asahi · 2021-02-22 09:22
marcanfair point#asahi · 2021-02-22 09:20
marcanI'll also base it off of Mark's tree with the FIQ changes#asahi · 2021-02-22 09:19
marcanfair :)#asahi · 2021-02-22 09:18
marcanso... as for that patch... are you happy with it as it is, or do we need to come up with another solution?#asahi · 2021-02-22 09:18
marcanyup#asahi · 2021-02-22 09:16
marcanI think it is safe to assume that both CPU types will behave identically in details such as this; I would only expect differences in corner cases and errata