everybody knows that interrupt handler should be short as possible. and adding functions like printk
for debugging inside an interrupt handler is something that shouldn't be done.
Actually, I tried it before when I was debugging the linux kernel for an interrupt driven char device I written, and it wrecked the timing of the driver.
The question I have, is why this is happening ?
printk
function is buffered ! it means, as far as I understand that the data is inserted in to a queue, and it's being handled later, most probably after the interrupt handler is finished.
So why doesn't it work ?
printk
is designed to be called from interrupt or process context. If it wasn't, it wouldn't be much use for debugging. You obviously don't call it in interrupt context in a production driver, though. – Ruminant