ARM: OMAP2+: omap_device: use late_initcall_sync
Subsystems (3)
PATCH 1/1 ARM: OMAP2+: omap_device: use late_initcall_sync
If DEBUG_LL and earlyprintk are enabled, and omap-serial.c is compiled as a module, the kernel boot hangs early as the clocks for serial port are cut while earlyprintk still uses the port.
The problem is a race between the late_initcall for omap_device (which idles devices that have no drivers) and the late_initcall inkernel/printk.c which turns off the earlyconsole. Any printks
that happen between this omap_device late initcall and the earlyconsole late initcall will crash when accessing the UART.
The fix is to ensure the omap_device initcall happens after the earlyconsole initcall.
---
Based on v3.9-rc8
arch/arm/mach-omap2/omap_device.c | 2 +- arch/arm/mach-omap2/soc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap_device.c +1 -1
@@ -879,4 +879,4 @@ static int __init omap_device_late_init(void)bus_for_each_dev (&platform_bus_type,NULL ,NULL , omap_device_late_idle);return 0 ; } -omap_late_initcall (omap_device_late_init); +omap_late_initcall_sync (omap_device_late_init);
arch/arm/mach-omap2/soc.h +1 -0
@@ -494,6 +494,7 @@ level(__##fn);#define omap_subsys_initcall (fn) omap_initcall(subsys_initcall, fn)#define omap_device_initcall (fn) omap_initcall(device_initcall, fn)#define omap_late_initcall (fn) omap_initcall(late_initcall, fn) +#define omap_late_initcall_sync (fn) omap_initcall(late_initcall_sync, fn)#endif /* __ASSEMBLY__ */
Signature · 1 line
1.8.2
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP2+: omap_device: use late_initcall_sync
Quoted 10 lines · Kevin Hilman
If
DEBUG_LLand earlyprintk are enabled, andomap-serial.cis compiled as a module, the kernel boot hangs early as the clocks for serial port are cut while earlyprintk still uses the port.The problem is a race between the
late_initcallforomap_device(which idles devices that have no drivers) and thelate_initcallinkernel/printk.cwhich turns off the earlyconsole. Any printks
that happen between thisomap_devicelate initcall and the earlyconsole late initcall will crash when accessing the UART.
Quoted 5 lines
The fix is to ensure the
omap_deviceinitcall happens after the earlyconsole initcall.Reported-by Tony Lindgren <[email protected]>Signed-off-by Kevin Hilman <[email protected]>
Thanks applying into omap-for-v3.10/fixes.
Tony
Quoted 32 lines
---
Based on v3.9-rc8arch/arm/mach-omap2/omap_device.c | 2 +- arch/arm/mach-omap2/soc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)arch/arm/mach-omap2/omap_device.c +1
-1@@ -879,4 +879,4 @@ static int __init omap_device_late_init(void)bus_for_each_dev (&platform_bus_type,NULL ,NULL , omap_device_late_idle);return 0 ; } -omap_late_initcall (omap_device_late_init); +omap_late_initcall_sync (omap_device_late_init);arch/arm/mach-omap2/soc.h +1
-0@@ -494,6 +494,7 @@ level(__##fn);#define omap_subsys_initcall (fn) omap_initcall(subsys_initcall, fn)#define omap_device_initcall (fn) omap_initcall(device_initcall, fn)#define omap_late_initcall (fn) omap_initcall(late_initcall, fn) +#define omap_late_initcall_sync (fn) omap_initcall(late_initcall_sync, fn)#endif /* __ASSEMBLY__ */ Signature · 1 line
1.8.2