From patchwork Fri May 15 05:40:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 23985 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4F5eCtG007779 for ; Fri, 15 May 2009 05:40:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755560AbZEOFkJ (ORCPT ); Fri, 15 May 2009 01:40:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756203AbZEOFkI (ORCPT ); Fri, 15 May 2009 01:40:08 -0400 Received: from vms173009pub.verizon.net ([206.46.173.9]:31586 "EHLO vms173009pub.verizon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754393AbZEOFkH (ORCPT ); Fri, 15 May 2009 01:40:07 -0400 Received: from localhost.localdomain ([96.237.168.40]) by vms173009.mailsrvcs.net (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPA id <0KJO00IP87QUB3ZE@vms173009.mailsrvcs.net>; Fri, 15 May 2009 00:40:06 -0500 (CDT) Received: from localhost.localdomain (d975xbx2 [127.0.0.1]) by localhost.localdomain (8.14.2/8.14.2) with ESMTP id n4F5e3oT010093; Fri, 15 May 2009 01:40:04 -0400 Received: from localhost (lenb@localhost) by localhost.localdomain (8.14.2/8.14.2/Submit) with ESMTP id n4F5e1sA010088; Fri, 15 May 2009 01:40:02 -0400 X-Authentication-warning: localhost.localdomain: lenb owned process doing -bs Date: Fri, 15 May 2009 01:40:01 -0400 (EDT) From: Len Brown X-X-Sender: lenb@localhost.localdomain To: Venkatesh Pallipadi Cc: Thomas Gleixner , Janne Kulmala , Frans Pop , Linux Kernel Mailing List , Steven Rostedt , Ingo Molnar , johnstul@us.ibm.com, linux-acpi@vger.kernel.org Subject: [PATCH] ACPI: Idle C-states disabled by max_cstate should not disable the TSC In-reply-to: Message-id: References: <200905110226.50115.elendil@planet.nl> <4A0855A5.8040109@tut.fi> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Len Brown Processor idle power states C2 and C3 stop the TSC on many machines. Linux recognizes this situation and marks the TSC as unstable: Marking TSC unstable due to TSC halts in idle But if those same machines are booted with "processor.max_cstate=1", then there is no need to validate C2 and C3, and no need to disable the TSC, which can be reliably used as a clocksource. Signed-off-by: Len Brown Acked-by: Thomas Gleixner --- drivers/acpi/processor_idle.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index e39a40a..e65476f 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -582,7 +582,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) pr->power.timer_broadcast_on_state = INT_MAX; - for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { + for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { struct acpi_processor_cx *cx = &pr->power.states[i]; switch (cx->type) {