Re: da9063 - Reboot issue : koops rcu_note_context_switch

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

 



Hi Hariprasad,

On 28/03/2019 19:24, hariprasad kelam wrote:
Hi Kory Maincent.

On Tue, 26 Mar 2019 at 13:21, Köry Maincent <kory.maincent@xxxxxxxxxxx> wrote:
Hello,

I got a kernel warning on the reboot of my embedded board, and sometimes I got stuck in the reboot.
I work on the IMX6Q with a PMIC da9063 and the last kernel release.

It happens in the da9063_wdt_restart function at the regmap_write call in the CONTROL_F register. (drivers/watchdog/da9063_wdt.c)


From trace we are able figure out the flow,

reboot  
|
|
invokes system call(sys_reboot)
|
|
 watchdog_restart)notifier
|
|
da9063_wdt_restart 
|
|
It sending I2c rear/write commands.

Is this expected behaviour  ??
Yes it is.
If I access to other register in that function, I don't have this issue.
The reason could be ,you are accessing other registers directly not through I2C.
I was wrong on this point, because of bad order debug printing in the drivers.


I manage to avoid the issue with a hotfix : adding rcu_read_unlock(); before I2C writing in the da9063_wdt_restart function. There is no more koops warning neither freezing reboot.
I don't think it is a clean patch and I don't understand the relation to preemption.
It may happens because of an RCU critical section not closed?



Regards,
Kory

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux