From patchwork Sun Aug 14 20:23:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 9279913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A7F6860839 for ; Sun, 14 Aug 2016 20:27:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 993FF289F3 for ; Sun, 14 Aug 2016 20:27:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8DCD428A13; Sun, 14 Aug 2016 20:27:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 23C6F28A33 for ; Sun, 14 Aug 2016 20:27:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ1y2-0006AR-QW; Sun, 14 Aug 2016 20:25:10 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bZ1y2-0006AE-4o for xen-devel@lists.xenproject.org; Sun, 14 Aug 2016 20:25:10 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 07/BD-12874-5A3D0B75; Sun, 14 Aug 2016 20:25:09 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgkeJIrShJLcpLzFFi42LpubySR3fJ5Q3 hBle26Vt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBl3exUKVvJXNL/TaWCcw9vFyMkhJLCNUeLH Q74uRg4ONgFTiRn/VUDCIgIKEpt7n7GC2MwC31gldp0uB7GFBfwkTp+fywhiswioSmy+eYgZx OYVsJL40viQHcSWEJCTuLTtC1icU8BaovPXGiaIVVYSp6e3gM0UFRCT2Ny2ixWiV1Di5MwnLC AnMAuoS6yfJzSBkXcWkswshMwCRqZVjBrFqUVlqUW6RsZ6SUWZ6RkluYmZObqGBqZ6uanFxYn pqTmJScV6yfm5mxiBIVPPwMC4g3FHu98hRkkOJiVRXh3zdeFCfEn5KZUZicUZ8UWlOanFhxhl ODiUJHgnXNoQLiRYlJqeWpGWmQMMXpi0BAePkgjvGpA0b3FBYm5xZjpE6hSjopQ4rylIQgAkk VGaB9cGi5hLjLJSwryMDAwMQjwFqUW5mSWo8q8YxTkYlYR5d4NM4cnMK4Gb/gpoMRPQYn1psM UliQgpqQZG6QeKogdWWTBxTO/Tv555qYUptDn4gUyEvraGczPXlvW6ZatrY3J+LUxq3iu4P+9 X7CaRaWG3yg+J3W8P9qpjl34tuO7K/JNLOj/2vl7UdFPYufCLxyMGI4UUHm27HuPFam/4t6vp Xf+yY/GyBTFTHzXq6z2R/c57L4gho3v322NtG3/uuDdLiaU4I9FQi7moOBEAfyS64pMCAAA= X-Env-Sender: gregkh@linuxfoundation.org X-Msg-Ref: server-13.tower-206.messagelabs.com!1471206307!38829004!1 X-Originating-IP: [140.211.169.12] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 33283 invoked from network); 14 Aug 2016 20:25:08 -0000 Received: from mail.linuxfoundation.org (HELO mail.linuxfoundation.org) (140.211.169.12) by server-13.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 14 Aug 2016 20:25:08 -0000 Received: from localhost (pes75-3-78-192-101-3.fbxo.proxad.net [78.192.101.3]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 699C578D; Sun, 14 Aug 2016 20:25:05 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Date: Sun, 14 Aug 2016 22:23:25 +0200 Message-Id: <20160814202303.871241183@linuxfoundation.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160814202302.493206349@linuxfoundation.org> References: <20160814202302.493206349@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Cc: Juergen Gross , Denys Vlasenko , xen-devel@lists.xenproject.org, Toshi Kani , Peter Zijlstra , Greg Kroah-Hartman , "Luis R. Rodriguez" , "H. Peter Anvin" , stable@vger.kernel.org, Andy Lutomirski , paul.gortmaker@windriver.com, Ingo Molnar , Borislav Petkov , Brian Gerst , Toshi Kani , Andrew Morton , Borislav Petkov , Linus Torvalds , Thomas Gleixner , Robert Elliott Subject: [Xen-devel] [PATCH 4.4 25/49] x86/mm/pat: Replace cpu_has_pat with boot_cpu_has() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Toshi Kani commit d63dcf49cf5ae5605f4d14229e3888e104f294b1 upstream. Borislav Petkov suggested: > Please use on init paths boot_cpu_has(X86_FEATURE_PAT) and on fast > paths static_cpu_has(X86_FEATURE_PAT). No more of that cpu_has_XXX > ugliness. Replace the use of cpu_has_pat on init paths with boot_cpu_has(). Suggested-by: Borislav Petkov Signed-off-by: Toshi Kani Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Juergen Gross Cc: Linus Torvalds Cc: Luis R. Rodriguez Cc: Peter Zijlstra Cc: Robert Elliott Cc: Toshi Kani Cc: konrad.wilk@oracle.com Cc: paul.gortmaker@windriver.com Cc: xen-devel@lists.xenproject.org Link: http://lkml.kernel.org/r/1458769323-24491-4-git-send-email-toshi.kani@hpe.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/mm/pat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c @@ -212,7 +212,7 @@ static void pat_bsp_init(u64 pat) { u64 tmp_pat; - if (!cpu_has_pat) { + if (!boot_cpu_has(X86_FEATURE_PAT)) { pat_disable("PAT not supported by CPU."); return; } @@ -230,7 +230,7 @@ static void pat_bsp_init(u64 pat) static void pat_ap_init(u64 pat) { - if (!cpu_has_pat) { + if (!boot_cpu_has(X86_FEATURE_PAT)) { /* * If this happens we are on a secondary CPU, but switched to * PAT on the boot CPU. We have no way to undo PAT.