ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
apritzel has quit [Ping timeout: 484 seconds]
rajkosto has joined #linux-sunxi
rajkosto has quit [Read error: Connection reset by peer]
rajkosto has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
cnxsoft has joined #linux-sunxi
cnxsoft1 has joined #linux-sunxi
cnxsoft has quit [Ping timeout: 480 seconds]
JohnDoe_71Rus has joined #linux-sunxi
ftg has quit [Ping timeout: 480 seconds]
cnxsoft1 has quit []
gsz has joined #linux-sunxi
Hypfer has quit [Quit: Ping timeout (120 seconds)]
Hypfer has joined #linux-sunxi
Hypfer has quit [Ping timeout: 480 seconds]
Hypfer has joined #linux-sunxi
apritzel has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
apritzel has joined #linux-sunxi
<hunbalazs> smaeul: is it possible that this is some kind of compiler issue? like this one: https://lists.infradead.org/pipermail/linux-riscv/2022-May/014724.html
<montjoie> smaeul: I still hit the cache problem on crypto, it seems the patch author of "D1 riscV dma" did not read my mail
ftg has joined #linux-sunxi
<montjoie> smaeul: which version of "riscv: implement Zicbom-based CMO instructions + the t-head variant" did you use ?
<montjoie> There is a v3 with new changes
ftg has quit [Ping timeout: 480 seconds]
rajkosto has quit [Ping timeout: 480 seconds]
Danct12 has quit [Remote host closed the connection]
Danct12 has joined #linux-sunxi
hentai has quit [Ping timeout: 480 seconds]
hentai has joined #linux-sunxi
rajkosto has joined #linux-sunxi
hentai has quit [Ping timeout: 480 seconds]
<smaeul> hunbalazs: possibly, but I think it's unlikely with gcc. I'm using 11.1, which is close to your compiler version (11.3)
ats_ has quit []
<smaeul> montjoie: the cache issue with crypto is a bug in the driver. if you map a buffer as DMA_FROM_DEVICE, you should expect any writes made by the CPU to be ignored/clobbered
ats has joined #linux-sunxi
<smaeul> that is how ~all of the architectures work, not just riscv
vagrantc has joined #linux-sunxi
<smaeul> so you either need to flush the cache before mapping the buffer, or map it as DMA_BIDIRECTIONAL
<hunbalazs> smaeul: I tried with clan/LLVM too but the only difference is that it prints a different address
<hunbalazs> (interestingly it is 0x000000*, with GCC it is 0xffffff*)
<smaeul> were you able to get a booting kernel with any combination of sources/config?
<hunbalazs> never, only with downloaded blobs
<smaeul> and you tried the defconfig from my branch?
<hunbalazs> yes, that was one of my statring points
<smaeul> in that case, the only variable left is the toolchain. I notice that you are using gentoo hardened. maybe stack-protector or FORTIFY_SOURCE is breaking something.
<hunbalazs> this is the current: # CONFIG_STACKPROTECTOR is not set
<smaeul> hmm, right, the kernel does pass -fno-stack-protector if that option is unset, so the compiler default shouldn't make a difference
<hunbalazs> and clang/LLVM does not have hardened variants
<smaeul> can you paste the full boot log from any recent attempt? maybe that would give me some clue
<hunbalazs> sure
<smaeul> I just built a kernel with CONFIG_STACKPROTECTOR_STRONG=y and it booted fine here
<smaeul> so that's not the problem (even though we already knew it probably wasn't)
<hunbalazs> 5.18.3 (clang/LLVM 14.0.4): https://pastebin.com/M5xJc2Vj
<hunbalazs> 5.18.0-rc4 (GCC 11.3.0): https://pastebin.com/9J1cA5ZM
gsz has quit [Quit: leaving]
<smaeul> hunbalazs: thanks! I was able to reproduce by disabling preemption: https://tpaste.us/OqZ8
<montjoie> smaeul: not a bug in driver, but in crypto selftests
<hunbalazs> smaeul: nice (different topic: how do you fake build time?)
<smaeul> montjoie: yes, true
<smaeul> hunbalazs: SOURCE_DATE_EPOCH=0
<montjoie> smaeul: it is why I found this strange, it is really the first arch doing that
<smaeul> this makes incremental U-Boot compiles much faster. it used to not even relink if there were no changes, but recently they added some files that get regenerated every time (default environment)
<montjoie> or perhaps the first arch with a DMA driver
<smaeul> hmm? I pointed out on the ML that arm, arm64, openrisc, and powerpc have the exact same behavior
<smaeul> though possibly D1 cache controller is very agressive with writeback
<hunbalazs> smaeul: CONFIG_PREEMPT_VOLUNTARY or CONFIG_PREEMPT?
<smaeul> hunbalazs: I have been using CONFIG_PREEMPT
<montjoie> smaeul: could you try to update to v3 ? I am trying to do it but patch do not apply
<hunbalazs> montjoie: you have to revert first, then it will apply
<smaeul> I can push what i have based on v5.19-rc1, give me a few minutes to fix up a couple of things
<hunbalazs> 5.18.3 /w PREEMPT: https://pastebin.com/hjgspShh
<hunbalazs> 5.18.0-rc4 /w PREEMPT: https://pastebin.com/5v0Vn3iJ
<smaeul> I really would suggest trying 5.18.0-rc4 with my defconfig (no customizations) as a baseline. otherwise we are just guessing
<smaeul> I can try to get a !PREEMPT kernel working on my end, but there's obviously something else broken as well
<hunbalazs> ok, I'll try
<hunbalazs> nezha_defconfig right?
<smaeul> yes
<montjoie> hunbalazs: one of patch do not revert
<hunbalazs> which one?
<hunbalazs> smaeul: 5.18.3 (LLVM) boots but at USB init it prints some garbage on serial
<smaeul> montjoie: I just pushed my working branch which includes the v3 CMO series
apritzel has quit [Ping timeout: 480 seconds]
<hunbalazs> (I couldn't disable line wrapping so it is cut at 80 chars)
<hunbalazs> (or something like that)
apritzel has joined #linux-sunxi
<smaeul> v3 of the CMO series is broken, so what I just pushed is broken, too. I'm working on a fix.
apritzel has quit [Ping timeout: 480 seconds]
ynezz has quit [Remote host closed the connection]
ynezz has joined #linux-sunxi
ynezz is now known as Guest1885
rajkosto has quit [Quit: Leaving]
<smaeul> hunbalazs: montjoie: I pushed a fixed branch. Booting now works for me with or without preemption, the USB garbage is fixed, and so is a longstanding issue with the SD card sometimes not getting detected.
sunshavi has quit [Ping timeout: 480 seconds]
<hunbalazs> is it still the d1-wip branch which contains the lastest fixes?
JohnDoe_71Rus has quit []
<smaeul> yes
hlauer has joined #linux-sunxi
Danct12 has quit [Remote host closed the connection]
Danct12 has joined #linux-sunxi
Danct12 has quit [Quit: Quitting]
Danct12 has joined #linux-sunxi
Danct12 has quit []
Danct12 has joined #linux-sunxi
paulk-bis has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
apritzel has joined #linux-sunxi
ftg has joined #linux-sunxi
Guest1885 is now known as ynezz
sunshavi has joined #linux-sunxi
<hunbalazs> smaeul: thank you! I'll try to test it tomorrow
DuClare has quit [Ping timeout: 480 seconds]
paulk-bis has quit [Ping timeout: 480 seconds]
DuClare has joined #linux-sunxi
hlauer has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
freemangordon has quit [Ping timeout: 480 seconds]