This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: Linux 06.00.00 - Device sporadically not rebooting/turning off

Part Number: AM5728

Tool/software: Linux

Hi,

With SDK 06.00.00 - non-RT Linux Kernel I have the behavior that my device is not turning off/rebooting roughly every 3 try.  (Doesn't matter if I use "reboot" or "poweroff")

[   26.296779] systemd-shutdown[1]: All filesystems unmounted.
[   26.302658] systemd-shutdown[1]: Deactivating swaps.
[   26.307998] systemd-shutdown[1]: All swaps deactivated.
[   26.313510] systemd-shutdown[1]: Detaching loop devices.
[   26.322826] systemd-shutdown[1]: All loop devices detached.
[   26.328730] systemd-shutdown[1]: Detaching DM devices.

It's just stopping after this messages and does not reboot neither turn of the PMIC.

I observed this before with the 4.14 Kernel. See thread here: https://e2e.ti.com/support/processors/f/791/p/707480/2611704#2611704

The issue was fixed by "" by reverting the commit "0d5e04e sched/core: Require cpu_active() in select_task_rq(), for user tasks". Which also made it to the SDK last year.

With the switch to the 4.19 Kernel the commit is not reverted any more. But even with reverting it myself I still experience the issue. So it is kind of different.

I'm currently testing with our own HW (which design is pretty close to the IDK). If I find the time I'll dig out the am5728 IDK and see if I can produce it there too.

Regards,

Michael

  • Hi Michael,

    This might be a different issue. The poweroff failure in the earlier kernels was
    due to the PMIC i2c write(shutdown command) not getting executed due to
    i2c write never going through. May i know this behavior is seen again?

    There are a bunch of patches that introduce i2c_xfer_atomic calls post 4.19 that make
    sure i2c write happens atomically during poweroff.  Wonder if that can help
    fix poweroff issue. Could you confirm that i2c writes to shutdown pmic are failing
    during Poweroff?

    - Keerthy

  • Hi,

    indeed it seems to be something different this time.

    I tracked it down to the shutdown function in drivers/pci/controller/dwc/pci-dra7xx.c which sometimes does block endlessly. It seems to be some kind of race condition. Because if I add some debug printk inside the function the issue seems to go away or at least happen less often.

    It happens on a Root Complex where we have a custom Device plugged in (doesn't make a different if I have a driver for it loaded). I have to investigate further. This issue did not happen with 4.14 but I have not been able up to now to find out where code has changed.


    Regards,

    Michael

  • Hello Michael,

    Thanks for reporting this. Please keep us updated. If you are able to replicate behavior on a TI board, we will be able to run tests on our side.

    Regards,

    Nick