#
✕ nick:arnd
#asahi · 2021-02-22 12:20
arndnever_released: I thought it was NVIDIA who wanted RISC-V to adopt the weakest possible ordering model, I wonder if I mixed that up or if it was simply a different part of the company with different requirements
#asahi · 2021-02-22 12:16
arndI have seen multiple reports about broken framebuffer access on arm64, in particular with unaligned cacheable writes to the framebuffer, but I think that is a separate bug
#asahi · 2021-02-22 12:15
arndnever_released: on powerpc it blows up spectacularly, on arm you technically get undefined behavior but it will (mostly?) work in practice
#asahi · 2021-02-22 12:14
arndand now I read proc_bus_pci_ioctl() and wish I had never learned about that
#asahi · 2021-02-22 12:07
arndbut it does not affect the in-kernel mapping
#asahi · 2021-02-22 12:07
arndAh, I found arch_can_pci_mmap_wc(), which makes the user space mapping for a PCI bar write-combined when it comes from a IORESOURCE_PREFETCH BAR
#asahi · 2021-02-22 11:57
arndI see that some old x86 fbdev drivers force write-combining with MTRR
#asahi · 2021-02-22 11:55
arndI have this vague memory of PCI prefetchable memory BARs being mapped to write-combining page mappings on some architectures, but can't find that now
#asahi · 2021-02-22 11:35
arndI think this has changed hands more frequently than any other subsystem. Usually it's someone who needs to get something done, but then gets frustrated to moves on to other work and abandons it again
#asahi · 2021-02-22 11:34
arndmarcan: be careful, or you might end up as the fbdev subsystem maintainer
#asahi · 2021-02-22 11:32
arndanything else is in user space, which uses a separate mapping
#asahi · 2021-02-22 11:32
arndI suspect nobody cares enough about the speed of the text console on fbdev
#asahi · 2021-02-22 11:31
arndand powermac
#asahi · 2021-02-22 11:31
arndthose are the even older ones that are m68k specific
#asahi · 2021-02-22 11:29
arnddrivers/video/fbdev is 95% obsolete
#asahi · 2021-02-22 11:28
arndmy guess is that they predated the ioremap_wt interface, so they used what they could get
#asahi · 2021-02-22 11:25
arndefifb was changed to memremap()
#asahi · 2021-02-22 11:23
arndlooks like I was on Cc, but none of the arm (or other) architecture maintainers were
#asahi · 2021-02-22 11:22
arndyes, found the same
#asahi · 2021-02-22 11:21
arndprobably copied from arm32
#asahi · 2021-02-22 11:15
arndarm32 has "#define ioremap_wt ioremap_wc"
#asahi · 2021-02-22 11:15
arndDon't know why there is no real ioremap_wt() though
#asahi · 2021-02-22 11:15
arndthat sounds correct, yes
#asahi · 2021-02-22 11:13
arnda8ff78f7f773 ("mfd: intel-lpss: Use devm_ioremap_uc for MMIO") explains one of the two, I think the other is similar but old
#asahi · 2021-02-22 11:11
arndsee "git grep ioremap_nocache v3.0"
#asahi · 2021-02-22 11:10
arndright, there was a larger cleanup to remove it from almost all drivers that previously used it
#asahi · 2021-02-22 11:07
arndI have to read up on previous mailing list discussions about ioremap_uc(), I think this is also wrong. It's definitely specific to x86 and ia64
#asahi · 2021-02-22 11:00
arndioremap_wt() is like ioremap_wc(), plus it is cached (but not write-back)
#asahi · 2021-02-22 11:00
arndioremap_wc() is like ioremap(), plus write-combining
#asahi · 2021-02-22 10:59
arndmarcan: I think the description of ioremap_wc() is misleading as it sounds like this is cached plus allows write-combining, while I think it is the reverse:
#asahi · 2021-02-22 10:53
arndMy brain dump on readl/writel gets fairly long, but that probably means it was indeed necessary do document it properly
#asahi · 2021-02-22 09:41
arndah yes, good point
#asahi · 2021-02-22 09:41
arndmarcan: I'd prefer to just add one or two sections to the document for the moment and not touch the other bits
#asahi · 2021-02-22 09:39
arndright
#asahi · 2021-02-22 09:38
arndI can write that section, probably should have done that years ago, because I keep having to explain it in code review ;-)
#asahi · 2021-02-22 09:37
arndI see we are also lacking proper documentation for the differences between readl()/readl_relaxed()/ioread32()/ioread32_be()/__raw_readl()
#asahi · 2021-02-22 09:36
arndI prefer google docs, but wiki might be easier for others to join in
#asahi · 2021-02-22 09:34
arndmarcan: if you start a Documentation text in a wiki or your favourite web based shared text editing platform, I'll help fill in some blanks for the other functions and architecture specfics
#asahi · 2021-02-19 09:45
arndSTM32L5 is the only STM32 variant that I could find that has both built-in USB PD logic and a UART that can operate on 1.2V without level shifters
#asahi · 2021-02-19 09:44
arndI wonder how hard it would be to turn this off-the-shelf device into a uart adapter: https://www.digikey.de/product-detail/de/stmicro/NUCLEO-L552ZE-Q/497-NUCLEO-L552ZE-Q-ND/11501277
#asahi · 2021-02-17 13:47
arndI tried to see what it's actually doing, but I don't seem to have permissions to run iosnoop
#asahi · 2021-02-17 13:46
arndI wonder if you can move the swap file to an external ssd to see if the remaining I/O within the expected range
#asahi · 2021-02-15 17:31
arndwe used to not include asm-generic/io.h anywhere at all, it took a while to creep into all architectures except for the least actively maintained ones
#asahi · 2021-02-15 17:30
arndnote that sparc32 is pretty much unmaintained except for the Cobham Gaisler LEON CPU part that is missing a number of patches, while the sparc64 port hasn't seen much work in the past few years either but at least still is still usable on workstations.
#asahi · 2021-02-15 17:27
arndI frequently do cross-architecture changes like that through the asm-generic tree
#asahi · 2021-02-15 17:27
arndmarcan: I don't think davem minds me picking up that oneline change
#asahi · 2021-02-15 14:29
arndI would also suggest 115200 as the default in the dts file if the driver requires one, but allow the bootloader to override it with whatever it uses for the uart itself. Having the bootloader and the kernel use different rates would be worse than either default
#asahi · 2021-02-15 14:08
arndmodwizcode: that's not what I see: https://lore.kernel.org/lkml/CAK8P3a1bXiWcieqTSZARN+to=J5RjC2cwbn_8ZOCYw2hhyyBYw@mail.gmail.com/raw
#asahi · 2021-02-15 13:52
arndit also occasionally goes back to html replies for me instead of plain text, so the replies get silently dropped by many mailing lists
#asahi · 2021-02-15 13:51
arndthe annoying bit with gmail is that it adds a couple of empty lines above the quote and puts your cursor there, so you have to trim both the extra newlines and the unneeded text

plus ›