From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751834AbZHXG4m (ORCPT ); Mon, 24 Aug 2009 02:56:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751648AbZHXG4l (ORCPT ); Mon, 24 Aug 2009 02:56:41 -0400 Received: from centrinvest.ru ([94.25.115.130]:41099 "EHLO centrinvest.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751574AbZHXG4l (ORCPT ); Mon, 24 Aug 2009 02:56:41 -0400 From: "Andrey Panin" Date: Mon, 24 Aug 2009 10:48:25 +0400 To: Thomas Gleixner Cc: LKML , x86 team , Andrew Morton , Peter Zijlstra , Arjan van de Veen , Avi Kivity , Jeremy Fitzhardinge , Rusty Russell , Alok N Kataria , Pan Jacob jun Subject: Re: [RFC patch 21/32] x86: Add timer_init to platform Message-ID: <20090824064309.GA24326@centrinvest.ru> Mail-Followup-To: Thomas Gleixner , LKML , x86 team , Andrew Morton , Peter Zijlstra , Arjan van de Veen , Avi Kivity , Jeremy Fitzhardinge , Rusty Russell , Alok N Kataria , Pan Jacob jun References: <20090821205008.518392436@linutronix.de> <20090821205602.826717491@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090821205602.826717491@linutronix.de> X-Uname: Linux 2.6.26-1-amd64 x86_64 User-Agent: Mutt/1.5.20 (2009-06-14) X-Anti-Virus: kav4lms: continue Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 233, 08 21, 2009 at 09:31:20 -0000, Thomas Gleixner wrote: > The timer init code is convoluted with several quirks and the paravirt > timer chooser. Figuring out which code path is actually taken is not > for the faint hearted. > > Move the numaq TSC quirk to tsc_pre_init platform function and replace > the paravirt time chooser and the remaining x86 quirk with a simple > platform setup function. > Index: linux-2.6/arch/x86/kernel/visws_quirks.c > =================================================================== > --- linux-2.6.orig/arch/x86/kernel/visws_quirks.c > +++ linux-2.6/arch/x86/kernel/visws_quirks.c > @@ -30,6 +30,7 @@ > #include > #include > #include > +#include > #include > > #include > @@ -53,8 +54,10 @@ int is_visws_box(void) > return visws_board_type >= 0; > } > > -static int __init visws_time_init(void) > +static void __init visws_time_init(void) > { > + hpet_time_init(); What's the purpose of this line ? It's highly unlikely that there is HPET hidden somewhere inside VisWs :) > printk(KERN_INFO "Starting Cobalt Timer system clock\n"); > > /* Set the countdown value */ > @@ -65,12 +68,6 @@ static int __init visws_time_init(void) > > /* Enable (unmask) the timer interrupt */ > co_cpu_write(CO_CPU_CTRL, co_cpu_read(CO_CPU_CTRL) & ~CO_CTRL_TIMEMASK); > - > - /* > - * Zero return means the generic timer setup code will set up > - * the standard vector: > - */ > - return 0; > } >