From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbXCUM01 (ORCPT ); Wed, 21 Mar 2007 08:26:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752693AbXCUM01 (ORCPT ); Wed, 21 Mar 2007 08:26:27 -0400 Received: from www.osadl.org ([213.239.205.134]:40884 "EHLO mail.tglx.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752687AbXCUM00 (ORCPT ); Wed, 21 Mar 2007 08:26:26 -0400 Subject: Re: BUG lapic: Can't boot on battery (2.6.21-rc{1,2,3,4}) From: Thomas Gleixner Reply-To: tglx@linutronix.de To: Andi Kleen Cc: Grzegorz Chwesewicz , Stefan Prechtel , linux-kernel@vger.kernel.org, mingo@elte.hu, Len Brown , john stultz In-Reply-To: <1174479339.10840.59.camel@localhost.localdomain> References: <200703211046.20724.ak@suse.de> <1174471808.10840.28.camel@localhost.localdomain> <200703211137.10884.ak@suse.de> <1174475666.10840.44.camel@localhost.localdomain> <1174479339.10840.59.camel@localhost.localdomain> Content-Type: text/plain Date: Wed, 21 Mar 2007 13:33:37 +0100 Message-Id: <1174480417.10840.63.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2007-03-21 at 13:15 +0100, Thomas Gleixner wrote: > + return; > + }} > + Ooops, sorry. Did not quilt refresh before sending it out. Correct version below. tglx diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 5cff797..83cf98d 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c @@ -61,6 +61,8 @@ static int enable_local_apic __initdata = 0; /* Local APIC timer verification ok */ static int local_apic_timer_verify_ok; +/* Disable local APIC timer from the kernel commandline */ +static int local_apic_timer_disabled; /* * Debug level, exported for io_apic.c @@ -340,6 +342,13 @@ void __init setup_boot_APIC_clock(void) long delta, deltapm; int pm_referenced = 0; + if (local_apic_timer_disabled) { + /* No broadcast on UP ! */ + if (num_possible_cpus() > 1) + setup_APIC_timer(); + return; + } + apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n" "calibrating APIC timer ...\n"); @@ -1179,6 +1188,13 @@ static int __init parse_nolapic(char *arg) } early_param("nolapic", parse_nolapic); +static int __init parse_disable_lapic_timer(char *arg) +{ + local_apic_timer_disabled = 1; + return 0; +} +early_param("nolapic_timer", parse_disable_lapic_timer); + static int __init apic_set_verbosity(char *str) { if (strcmp("debug", str) == 0)