From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP2+: omap_device: use late_initcall_sync
Date: Wed, 8 May 2013 16:17:36 -0700 [thread overview]
Message-ID: <20130508231736.GR32546@atomide.com> (raw)
In-Reply-To: <1367962765-13912-1-git-send-email-khilman@linaro.org>
* Kevin Hilman <khilman@linaro.org> [130507 14:44]:
> 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 in
> kernel/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.
>
> Reported-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Kevin Hilman <khilman@linaro.org>
Thanks applying into omap-for-v3.10/fixes.
Tony
> ---
> 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(-)
>
> diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
> index 381be7a..2d20d69 100644
> --- a/arch/arm/mach-omap2/omap_device.c
> +++ b/arch/arm/mach-omap2/omap_device.c
> @@ -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);
> diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
> index c62116b..de88611 100644
> --- a/arch/arm/mach-omap2/soc.h
> +++ b/arch/arm/mach-omap2/soc.h
> @@ -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__ */
>
> --
> 1.8.2
>
prev parent reply other threads:[~2013-05-08 23:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-07 21:39 [PATCH] ARM: OMAP2+: omap_device: use late_initcall_sync Kevin Hilman
2013-05-08 23:17 ` Tony Lindgren [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130508231736.GR32546@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).