From patchwork Tue May 24 01:10:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 810492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4O1AS81005766 for ; Tue, 24 May 2011 01:10:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757834Ab1EXBK1 (ORCPT ); Mon, 23 May 2011 21:10:27 -0400 Received: from mga02.intel.com ([134.134.136.20]:56749 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757835Ab1EXBK1 (ORCPT ); Mon, 23 May 2011 21:10:27 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 23 May 2011 18:10:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.65,259,1304319600"; d="scan'208";a="3641241" Received: from sli10-conroe.sh.intel.com (HELO [10.239.36.19]) ([10.239.36.19]) by orsmga001.jf.intel.com with ESMTP; 23 May 2011 18:10:25 -0700 Subject: [PATCH]intel_idle: misuse API From: Shaohua Li To: Len Brown Cc: linux acpi Date: Tue, 24 May 2011 09:10:25 +0800 Message-ID: <1306199425.2375.127.camel@sli10-conroe> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 24 May 2011 01:10:28 +0000 (UTC) smp_call_function() only lets all other CPUs execute specific function, while we expect all CPUs do. BTW, auto_demotion_disable should hook to cpu hotplug to make sure hot added cpu disable auto demotion really. Signed-off-by: Shaohua Li --- 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 diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index a46dddf..55fbb02 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -367,7 +367,7 @@ static int intel_idle_probe(void) if (boot_cpu_has(X86_FEATURE_ARAT)) /* Always Reliable APIC Timer */ lapic_timer_reliable_states = LAPIC_TIMER_ALWAYS_RELIABLE; else { - smp_call_function(__setup_broadcast_timer, (void *)true, 1); + on_each_cpu(__setup_broadcast_timer, (void *)true, 1); register_cpu_notifier(&setup_broadcast_notifier); } @@ -459,7 +459,7 @@ static int intel_idle_cpuidle_devices_init(void) } } if (auto_demotion_disable_flags) - smp_call_function(auto_demotion_disable, NULL, 1); + on_each_cpu(auto_demotion_disable, NULL, 1); return 0; } @@ -499,7 +499,7 @@ static void __exit intel_idle_exit(void) cpuidle_unregister_driver(&intel_idle_driver); if (lapic_timer_reliable_states != LAPIC_TIMER_ALWAYS_RELIABLE) { - smp_call_function(__setup_broadcast_timer, (void *)false, 1); + on_each_cpu(__setup_broadcast_timer, (void *)false, 1); unregister_cpu_notifier(&setup_broadcast_notifier); }