硬件:T5000 + 自研载板
软件:Jetpack7.2 + 编译内核
问题:在自己添加的bmc.ko中,用register_reboot_notifier注册函数用来在reboot和shutdown时发消息。该代码在Jetpack7.1上运行正常,但是在Jetpack7.2上注册的函数不会被调用。请问该如何解决?
硬件:T5000 + 自研载板
软件:Jetpack7.2 + 编译内核
问题:在自己添加的bmc.ko中,用register_reboot_notifier注册函数用来在reboot和shutdown时发消息。该代码在Jetpack7.1上运行正常,但是在Jetpack7.2上注册的函数不会被调用。请问该如何解决?
Hi hyla_huang1,
register_reboot_notifier() is still present in JetPack 7.2/K6.8, so it has not been removed.
However, for new code we recommend migrating this logic to the sys-off framework.
e.g. SYS_OFF_MODE_RESTART_PREPARE and SYS_OFF_MODE_POWER_OFF_PREPARE, especially if your BMC notification path may sleep.
In Tegra K6.8, restart/poweroff handling is already using devm_register_sys_off_handler(), so aligning your bmc.ko with that API is the recommended solution.