From patchwork Thu Sep 25 08:32:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "lan,Tianyu" X-Patchwork-Id: 4973691 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 947819F1D4 for ; Thu, 25 Sep 2014 08:36:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 484CF202B8 for ; Thu, 25 Sep 2014 08:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F150D202D1 for ; Thu, 25 Sep 2014 08:36:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753023AbaIYIgY (ORCPT ); Thu, 25 Sep 2014 04:36:24 -0400 Received: from mga11.intel.com ([192.55.52.93]:57318 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751601AbaIYIgX (ORCPT ); Thu, 25 Sep 2014 04:36:23 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 25 Sep 2014 01:36:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,595,1406617200"; d="scan'208";a="596612049" Received: from lantianyu-ws.sh.intel.com (HELO localhost) ([10.239.37.18]) by fmsmga001.fm.intel.com with ESMTP; 25 Sep 2014 01:36:19 -0700 From: Lan Tianyu To: peterz@infradead.org, mingo@kernel.org, rafael.j.wysocki@intel.com, srivatsa.bhat@linux.vnet.ibm.com, toshi.kani@hp.com, tianyu.lan@intel.com, ego@linux.vnet.ibm.com, ktkhai@parallels.com, laijs@cn.fujitsu.com, todd.e.brandt@linux.intel.com, srivatsa@mit.edu, fabf@skynet.be, viresh.kumar@linaro.org Cc: akpm@linux-foundation.org, tipbot@zytor.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [RFC PATCH V2 2/3] X86/CPU: Initialize MTRR/PAT when each cpu is online during system resume. Date: Thu, 25 Sep 2014 16:32:04 +0800 Message-Id: <1411633925-9018-3-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1411633925-9018-1-git-send-email-tianyu.lan@intel.com> References: <1411633925-9018-1-git-send-email-tianyu.lan@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP SDM Vol 3a section titled "MTRR considerations in MP systems" specifies the need for synchronizing the logical cpu's while initializing/updating MTRR. Commit d0af9eed5a(x86, pat/mtrr: Rendezvous all the cpus for MTRR/PAT init) delay the MTRR/PAT init for APs till all the logical cpu's come online and the rendezvous process at the end of AP's bringup, will initialize the MTRR/PAT for all AP's during boot and resume. Currently, APs enabling are paralleled with resume devices during system resume and the AP will be assigned with task before all APs' bringup. MTRR/PAT should be initialized before running tasks. So this patch is to remove set_mtrr_aps_delayed_init() for system resume and do the MTRR/PAT init when the AP comes online just like dynamic single cpu online. Signed-off-by: Lan Tianyu --- kernel/cpu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 24c4889..30ffdd9 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -592,13 +592,10 @@ static int async_enable_nonboot_cpus(void *data) { int cpu; - arch_enable_nonboot_cpus_begin(); - for_each_cpu(cpu, frozen_cpus) { _cpu_up_for_pm(cpu); } - arch_enable_nonboot_cpus_end(); cpumask_clear(frozen_cpus); cpu_maps_update_done(); return 0;