ChanServ changed the topic of #armlinux to: ARM kernel talk [Upstream kernel, find your vendor forums for questions about their kernels] | https://libera.irclog.whitequark.org/armlinux
<apritzel>
SikkiLadho: if you use TF-A, only the primary CPU should enter your HV, so your MPIDR gate should not be necessary
<apritzel>
and your kernel would probably do smc calls to bring up secondaries (what we patch into the DT in TF-A)
torez has quit [Quit: torez]
<apritzel>
which means they will start in EL2(!), but at kernel provided code
<apritzel>
I think the kernel will be irritated, and puts them away
<apritzel>
to solve this, you would need to trap smc in your HV, and do the right thing (TM)
djrscally has quit [Ping timeout: 250 seconds]
<apritzel>
(what that is depends on what you want to achieve with your HV)
<sikkiladho>
for now, I just want to print Hello World to UART with the hypervisor and run the standard kernel soon after.
<apritzel>
then it shouldn't matter, for now, and maxcpus=1 should tell the kernel to ignore secondaries
<sikkiladho>
so 1) I should remove the MPIDR gate because with TF-A secondary processors won't enter the code.
<sikkiladho>
It has been days, I just want to see the standard kernel after hello world for now. :)
<sikkiladho>
XD
<sikkiladho>
I will work on other hypervisor functionalities later but it won't happen when it is just stuck at hello world.
<apritzel>
well, a hypervisor is not exactly the easiest way to beginning with bare metal / kernel programming ;-)
<sikkiladho>
It's morning here, I will sleep now and see later, what to do with this. Thank you for patiently helping me apritzel.
<apritzel>
SikkiLadho: yw, have a good rest!
sikkiladho has quit [Quit: Connection closed]
rbutler1728 has quit [Read error: Connection reset by peer]
ravan has quit [Remote host closed the connection]
apritzel has joined #armlinux
iivanov has joined #armlinux
guillaume_g has joined #armlinux
iivanov has quit [Quit: Leaving...]
iivanov has joined #armlinux
dliviu has quit [Ping timeout: 260 seconds]
dliviu has joined #armlinux
apritzel has quit [Ping timeout: 256 seconds]
sszy has joined #armlinux
matthias_bgg has joined #armlinux
Amit_T has joined #armlinux
sudeepholla has quit [Ping timeout: 240 seconds]
sudeepholla has joined #armlinux
djrscally has joined #armlinux
Pali has joined #armlinux
tre has joined #armlinux
Pali has quit [Ping timeout: 268 seconds]
System_Error has joined #armlinux
jbru1 is now known as jbru
tudorel has joined #armlinux
apritzel has joined #armlinux
nsaenz has joined #armlinux
Nact has quit [Read error: Connection reset by peer]
macromorgan has quit [Read error: Connection reset by peer]
tudorel has quit [Quit: tudorel]
Amit_T has quit [Remote host closed the connection]
kristo has quit [Remote host closed the connection]
josem has joined #armlinux
josem has left #armlinux [#armlinux]
<mwalle_>
https://pastebin.com/raw/PVEk1hDb << with the latest next i get this kernel oops on reboot, actually i just noticed its already present in v5.15
<mwalle_>
i don't even know how mutex_unlock() can end up in queued_spin_lock_slowpath() but I doubt that one is broken. so its likely something wrong with spi or fsl_dspi
<ukleinek>
mwalle_: calling remove from shutdown (as done in dspi_shutdown()) calls for trouble
<ukleinek>
it's at least racy, consider you shut down while the device is about to be removed and in the middle of running through dspi_remove()
<ukleinek>
(not entirely sure this is prevented by the driver core)
<ukleinek>
See also 0650bf52b31f for a similar issue description
nsaenz has quit [Read error: Connection reset by peer]
nsaenz_ has joined #armlinux
apritzel has quit [Remote host closed the connection]
apritzel_ has joined #armlinux
Turingtoast has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jlinton has quit [Quit: Client closed]
bps has quit [Ping timeout: 240 seconds]
apritzel has joined #armlinux
<mwalle_>
ukleinek: ok, but then I should see that dspi_remove is called twice, no?
<ukleinek>
mwalle_: might be
<ukleinek>
mwalle_: maybe it's also a generic problem that also happens when you unbind the device via sysfs?!
torez has joined #armlinux
<ukleinek>
mwalle_: this is arm64 without CONFIG_DEBUG_LOCK_ALLOC?
<mwalle_>
ukleinek: ahh, indeed, echo 2120000.spi > /sys/bus/platform/drivers/fsl-dspi/unbind triggers the same
<ukleinek>
mwalle_: can you try reverting 16a8e2fbb2d49111004efc1c7342e083eafabeb0 and 6098475d4cb48d821bdf453c61118c56e26294f0
<ukleinek>
mwalle_: if this fixes the problem I don't understand why, but these recent commits touch that area.
<mwalle_>
ukleinek: both at once, or one after another?
sikkiladho has quit [Client Quit]
<ukleinek>
mwalle_: up to you
apritzel has quit [Ping timeout: 240 seconds]
sikkiladho has joined #armlinux
<ukleinek>
mwalle_: if one of these is the culprit, please report by mail. If not I have no better idea than to bisect.
<ukleinek>
mwalle_: ah, before bisecting, comment out the line "put_device(&ctlr->dev);"
<ukleinek>
mwalle_: at least the spi-fsl-dspi driver doesn't use devm (so the put_device is executed) and this is a possible location that destroys the lock.
<ukleinek>
mwalle_: also consider enabling CONFIG_LOCKDEP
<ukleinek>
and CONFIG_DEBUG_OBJECTS_FREE
<mwalle_>
ukleinek: btw i've tried to use the devm_ version (and removed the spi_unregister_ctlr()) but the oops persits
* ukleinek
assumes mwalle_ is clever enough to not just add // to the line with put_device
<mwalle_>
ukleinek: i don't think bisect is necessary
cmarinas_ has joined #armlinux
cmarinas_ has quit [Client Quit]
cmarinas_ has joined #armlinux
cmarinas has quit [Ping timeout: 268 seconds]
<mwalle_>
ukleinek: could you have a quick look at http://sprunge.us/MZFTJk ? the revert didn't apply cleanly, so thats what I've come up with. Then I'd raise that on the ML
<mwalle_>
ukleinek: if it's not clear, after that, the oops is gone
cmarinas_ has quit [Client Quit]
<mwalle_>
ukleinek: so yes, it seems ctrl->add_lock is either corrupted or gone in my case
cmarinas has joined #armlinux
<javierm>
cmarinas has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
cmarinas has joined #armlinux
bps has joined #armlinux
bps has joined #armlinux
bps has quit [Changing host]
sikkiladho has quit [Ping timeout: 240 seconds]
<ukleinek>
javierm: speechless?
<ukleinek>
mwalle_: data point: On an i.MX25 running 5.15 echo 43fa4000.spi > /sys/bus/platform/drivers/spi_imx/unbind doesn't trigger that problem
<ukleinek>
mwalle_: can you add at the start of spi_unregister_controller: get_device(&ctlr->dev);
<ukleinek>
mwalle_: maybe even twice to be sure
tre has quit [Remote host closed the connection]
<javierm>
ukleinek: hehe. sorry, I pressed it by mistake
<ukleinek>
mwalle_: I'm afk for a while now, but look forward to your findings.
macromorgan has joined #armlinux
<mwalle_>
ukleinek: well yeah, that get_device() will make the error go away. the "if (devm_allocated) put_device()" will eventually call spi_controller_release(), which then frees the controller and the mutex at the end of the spi_unregister_contoller() is used after its already freed
<mwalle_>
I must have been mistaken, converting it to devm_ will also make the problem go away
<mwalle_>
but then I'll read something like 8d559a64f0 which converts devm_ to the non-devm_ version. uhh..
<sikkiladho>
Now I want to jump from el2-kernel to the standard linux kernel. I have been tried to do it for a few weeks but the standard kernel won't run.