-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
axi-spi-engine driver watchdog timer still calls back after being canceled #2298
Comments
Sooo, I had to deal with this thing and saw the same behavior. As it turns out the problem is not as crazy or in core code as we were thinking... Note the below log (additional printk placed by me):
From the above it's clear that we're being faster in processing the spi transfer than calling
and no spurious soft interrupt. This was actually causing a kernel panic in a usecase where we play with overlays and a loop with load + unloading the overlay would eventually panic as we would end up (at some point) in the timer callback with the spi controller unbound... So, a simple patch for this would be:
Now we are calling mod_timer() with the spin lock held but AFAICT, it should not be an issue... Do you see any issue with it @dlech? I just checked and this should not be an issue in the upstream version of the driver but we will probably only sync the upstream version of the controller in the main branch and not in 2022_R2 where we also need a fix and that is why I'm asking if this looks sane to you :). I can also just call mod_timer() right before acquiring the spin... |
I think it is fine in the spinlock since the timer should have the |
Alright, I'll do this for the 2022_R2 branch and assume for main we well get it in sync with upstream + offload stuff |
del_timer()
is called immediately beforespi_engine_complete_message()
so I would expect it to be canceled and not call the callback.Originally posted by @dlech in #2287 (comment)
The text was updated successfully, but these errors were encountered: