From: Ian Campbell Subject: Re: [PATCH] xen/arm: Panic if we are unable to initialize platform timer Date: Tue, 19 Nov 2013 14:47:54 +0000 Message-ID: <1384872474.30014.119.camel@kazak.uk.xensource.com> References: <1384529257-7590-1-git-send-email-julien.grall@linaro.org> <1384529257-7590-3-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vimau-0003Uy-6l for xen-devel@lists.xenproject.org; Tue, 19 Nov 2013 14:48:00 +0000 In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, Julien Grall , tim@xen.org, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On Fri, 2013-11-15 at 15:58 +0000, Stefano Stabellini wrote: > On Fri, 15 Nov 2013, Julien Grall wrote: > > The caller of xen_init_time, start_xen, doesn't check the return value > > of the function. Xen will silently ignore the error and continue. > > > > Signed-off-by: Julien Grall > > Acked-by: Stefano Stabellini Acked-by: Ian Campbell I did wonder if it might be worth pushing the panic down into platform_time_init, so that the message could be more specific. But that seems like it relies on platform code to be more aware of when to panic and to use consistent wording etc. So all in all I think it is better here. > > > > xen/arch/arm/time.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c > > index a30d422..938995d 100644 > > --- a/xen/arch/arm/time.c > > +++ b/xen/arch/arm/time.c > > @@ -132,7 +132,7 @@ int __init init_xen_time(void) > > > > res = platform_init_time(); > > if ( res ) > > - return res; > > + panic("Timer: Cannot initialize platform timer\n"); > > > > /* Check that this CPU supports the Generic Timer interface */ > > if ( !cpu_has_gentimer ) > > -- > > 1.8.3.1 > >