How can I read some kernel variable and print it?
Currenlty I am having a problem where a read operation from an SD card simply hangs. Because of the many read operations, simply adding printk statements to the read function will not work, because it will cause timing problems that run out of hand before the actual problem pops up.
So I thought of having some global variable (say read_status), that is changed to specific value at certain steps while executing the read. Now when the program hangs, simply reading this variable will tell me where exactly the program is. But reading this variable has proven to be very difficult. Can anybody help me out?