Calling i2c_transfer() from NMI context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi i2c developers,

I have a weird use case where I need to call i2c_transfer() from NMI
context. The idea is to save some useful information in an i2c flash
memory before crashing the system (the NMI is triggered by a hardware
watchdog).

The problem is that i2c_transfer() ends up calling i2c_trylock_bus()
when in NMI context and the latter is basically just a wrapper around
rt_mutex_trylock(&adapter->bus_lock), which is not supposed to be
called from NMI context as per commit 6ce47fd961fa.

Since I'm not familiar with the overall i2c subsystem design, I'd like
to ask if what I'm trying to do is fundamentally wrong or is simply an
atypical use case that hasn't been considered in the design (and could
be worked around).

Thanks,
Radu Rendec




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux