From patchwork Wed Jun 10 00:13:49 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 29128 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 n5A3ak1e014892 for ; Wed, 10 Jun 2009 03:36:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756175AbZFJDea (ORCPT ); Tue, 9 Jun 2009 23:34:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756180AbZFJDea (ORCPT ); Tue, 9 Jun 2009 23:34:30 -0400 Received: from kroah.org ([198.145.64.141]:56857 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756388AbZFJDe2 (ORCPT ); Tue, 9 Jun 2009 23:34:28 -0400 Received: from localhost (124-9-6-2.static.tfn.net.tw [124.9.6.2]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by coco.kroah.org (Postfix) with ESMTPSA id 9C61B4900A; Tue, 9 Jun 2009 20:34:30 -0700 (PDT) X-Mailbox-Line: From greg@blue.kroah.org Tue Jun 9 17:23:44 2009 Message-Id: <20090610002344.559460966@blue.kroah.org> User-Agent: quilt/0.48-1 Date: Tue, 09 Jun 2009 17:13:49 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, linux-acpi@vger.kernel.org, lenb@kernel.org, Shaohua Li , Len Brown , Greg Kroah-Hartman Subject: [patch 21/60] cpuidle: make AMC C1E work in processor_idle References: <20090610001328.251476848@blue.kroah.org> Content-Disposition: inline; filename=cpuidle-make-amc-c1e-work-in-processor_idle.patch Lines: 56 In-Reply-To: <20090610032135.GA19346@kroah.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org -stable review patch. If anyone has any objections, please let us know. ------------------ From: Shaohua Li commit 87ad57bacb25c3f24c54f142ef445f68277705f0 upstream When AMD C1E is enabled, local APIC timer will stop even in C1. This patch uses broadcast ipi to replace local APIC timer in C1. http://bugzilla.kernel.org/show_bug.cgi?id=13233 [ impact: avoid boot hang in AMD CPU with C1E enabled ] Tested-by: Dmitry Lyzhyn Signed-off-by: Shaohua Li Signed-off-by: Len Brown Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/processor_idle.c | 6 ++++++ 1 file changed, 6 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -303,6 +303,9 @@ static void acpi_timer_check_state(int s struct acpi_processor_power *pwr = &pr->power; u8 type = local_apic_timer_c2_ok ? ACPI_STATE_C3 : ACPI_STATE_C2; + if (boot_cpu_has(X86_FEATURE_AMDC1E)) + type = ACPI_STATE_C1; + /* * Check, if one of the previous states already marked the lapic * unstable @@ -1154,6 +1157,7 @@ static int acpi_processor_power_verify(s switch (cx->type) { case ACPI_STATE_C1: cx->valid = 1; + acpi_timer_check_state(i, pr, cx); break; case ACPI_STATE_C2: @@ -1476,12 +1480,14 @@ static int acpi_idle_enter_c1(struct cpu if (pr->flags.bm_check) acpi_idle_update_bm_rld(pr, cx); + acpi_state_timer_broadcast(pr, cx, 1); t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); acpi_idle_do_entry(cx); t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); local_irq_enable(); cx->usage++; + acpi_state_timer_broadcast(pr, cx, 0); return ticks_elapsed_in_us(t1, t2); }