From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 12/15] xen: arm: enable synchronous console while starting secondary CPUs Date: Fri, 22 Nov 2013 17:36:15 +0000 Message-ID: <528F960F.1010300@linaro.org> References: <1385137474-31245-12-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1385137474-31245-12-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: Keir Fraser , pranavkumar@linaro.org, tim@xen.org, Anup Patel , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 11/22/2013 04:24 PM, Ian Campbell wrote: > Setting synchronous console ensures that any printk hits the buffer > immediately and that any outstanding queued log messages are flushed. This > ensures that such log messages are not being printed while the secondary CPU > may be using early_printk during early bringup. stefano: There is some place in x86 (shutdown, kexec) when console_*_sync are used. So far after console_endboot. I think it's also fine for us. > Signed-of-by: Ian Campbell > Cc: Keir Fraser > --- > v2: improved commit message. > --- > xen/arch/arm/smpboot.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c > index b6a1307..f6cd9d7 100644 > --- a/xen/arch/arm/smpboot.c > +++ b/xen/arch/arm/smpboot.c > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include > #include > > cpumask_t cpu_online_map; > @@ -356,6 +357,8 @@ int __cpu_up(unsigned int cpu) > if ( rc < 0 ) > return rc; > > + console_start_sync(); /* Secondary may use early_printk */ > + I though have asked on the first version this question: early printk is only enabled when CONFIG_EARLY_PRINTK is defined. Why don't you surround console_*_sync with #ifdef CONFIG_EARLY_PRINTK? -- Julien Grall