Skip to content

Commit d17d4fa

Browse files
jiegan0107shashim-quic
authored andcommitted
QCLINUX: memory-dump: use late_initcall and build as built-in for boot debug
The memory dump device stub driver was registered with module_init(), which runs before late_initcall(). The memory dump subsystem depends on resources that are not yet available at that point, causing the driver to fail silently during early boot. Switch to late_initcall() so the driver initialises after all subsystem dependencies are ready. Remove the module_exit() registration since the driver is now built-in only. Update qcom_debug.config to build CONFIG_QCOM_MEMORY_DUMP_DEV as built-in (=y) instead of a loadable module (=m) to match the late_initcall() requirement and allow early boot debugging. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
1 parent 01e7462 commit d17d4fa

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
CONFIG_QCOM_DCC=y
22
CONFIG_QCOM_DCC_DEV=y
33
CONFIG_QCOM_MEMORY_DUMP_V2=y
4-
CONFIG_QCOM_MEMORY_DUMP_DEV=m
4+
CONFIG_QCOM_MEMORY_DUMP_DEV=y

drivers/firmware/qcom/memory_dump_dev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,6 @@ static void __exit mem_dump_dev_exit(void)
506506
platform_device_unregister(mem_dump_pdev);
507507
}
508508

509-
module_init(mem_dump_dev_init);
510-
module_exit(mem_dump_dev_exit);
509+
late_initcall(mem_dump_dev_init);
511510
MODULE_LICENSE("GPL");
512511
MODULE_DESCRIPTION("Qualcomm Technologies Inc. Memory Dump driver V2, device stub");

0 commit comments

Comments
 (0)