Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756788AbcC2NQQ (ORCPT ); Tue, 29 Mar 2016 09:16:16 -0400 Received: from www.linutronix.de ([62.245.132.108]:54674 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756068AbcC2NQF (ORCPT ); Tue, 29 Mar 2016 09:16:05 -0400 From: Richard Cochran To: Cc: , Len Brown , linux-pm@vger.kernel.org Subject: [PATCH 03/10] intel_idle: Remove redundant initialization calls. Date: Tue, 29 Mar 2016 15:15:55 +0200 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1159 Lines: 38 The function, intel_idle_cpuidle_driver_init, makes calls on each CPU to auto_demotion_disable() and c1e_promotion_disable(). These calls are redundant, as intel_idle_cpu_init() does the same calls just a bit later on. They are also premature, as the driver registration may yet fail. This patch removes the redundant code. Cc: Len Brown Cc: linux-pm@vger.kernel.org Signed-off-by: Richard Cochran --- drivers/idle/intel_idle.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index dfa9055..cb85c4c 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -1163,16 +1163,10 @@ static void __init intel_idle_cpuidle_driver_init(void) drv->state_count += 1; } - if (icpu->auto_demotion_disable_flags) - on_each_cpu(auto_demotion_disable, NULL, 1); - if (icpu->byt_auto_demotion_disable_flag) { wrmsrl(MSR_CC6_DEMOTION_POLICY_CONFIG, 0); wrmsrl(MSR_MC6_DEMOTION_POLICY_CONFIG, 0); } - - if (icpu->disable_promotion_to_c1e) /* each-cpu is redundant */ - on_each_cpu(c1e_promotion_disable, NULL, 1); } -- 2.1.4