From patchwork Thu Nov 10 12:52:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Zijlstra X-Patchwork-Id: 18118 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp132044wru; Thu, 10 Nov 2022 05:01:57 -0800 (PST) X-Google-Smtp-Source: AMsMyM4kG9FkhAnvklmGz6WSE7TLVUASRBIpqiUIksrQEZj7m0kuA+dRP6xAhHf7XTditK9srdnh X-Received: by 2002:a17:906:4898:b0:78d:4935:1ad8 with SMTP id v24-20020a170906489800b0078d49351ad8mr2706635ejq.564.1668085317643; Thu, 10 Nov 2022 05:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668085317; cv=none; d=google.com; s=arc-20160816; b=nQTdi7QEMhF1zM49s11PrARKKoBOJSIbjvpEEegM8bGKR5b/9aQ9lTnkvKOXioMKmE YUTiH+QZJlSD2lc0SQqNaq4XYweOVftRw6Yt/+Imi1u2QFFGBdgblWt/iACjkniC8UWa IukjpUgidw+AbRLLKvSdS0uBA+mneq2BdWcxE4BqfXfKewWXR2FEWe44UvN8BmagPrVt v5Ws4+mlv3RLvf3mRe/NNTDa4vcWSuRgm1RPG6k830eypDflFfTlQPr15oGHhQFleI3x /oiN867whRwW7wwoA3WOs51UVf4LQivVzcwluhdmfERzSLKZsHWspv2/G80qGXFYF0ya Ca0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:subject:cc:to:from:date :user-agent:message-id:dkim-signature; bh=0TJ9GM3QmpQqqobwlFgaZAhiMEzovhIsHgiWH55IfFY=; b=Ux5pxAm8P4ahlLjS1u+m/Fp7N2QLIz4xmYGhIcC7s4mHJpDra/ZOOvgSNPSgChc2bV yAyPsHrgzDlTtuimbv0JuhlldxLDFy9MC/XvJEi0y5vDocJxxTe/XACuoj0G0EEwZSsN OchIPkjY8MfisA1Cn12khnGYPKB5e2Z/nSyY7WJgqXeJ2GnKXN8rJ0mpVER2udY4Yyxa 6Ut9pJjAReHAkm2ShcNFf0uj3+Q+AkvU0n5kWDkScZ9aF+Qh8jB4+ErzpPGSK30J80+p L5lqc0oAIza1HTdsMq//TXW7FKpaxfOyYWo5HsraOeE9TAbinqmNTxLLUNk8vjCTb/5g VJhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=XVvw5AjH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht11-20020a170907608b00b007ade4c97618si21482963ejc.930.2022.11.10.05.01.24; Thu, 10 Nov 2022 05:01:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=XVvw5AjH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230002AbiKJM64 (ORCPT + 99 others); Thu, 10 Nov 2022 07:58:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbiKJM6p (ORCPT ); Thu, 10 Nov 2022 07:58:45 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5236F70199 for ; Thu, 10 Nov 2022 04:58:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=0TJ9GM3QmpQqqobwlFgaZAhiMEzovhIsHgiWH55IfFY=; b=XVvw5AjHBW7Sr896LTSC7q1lTz TmNKXxDIJ+ya8FM34oNVTeso6esOE++ayL2r+MfpByrxlZ1WpZ0ItL/7Tcbui7nrjSENwsg9VzgOL acJlrVu58mBRM4xnRZdYOZtjr5BoW0i8yAtlHxzgl/inBU8mzdgfPo2rxKakdabucPTGh9u8YXUhj jMqLjW4pEp2MCEzv8glvWlQK8GaPPvqO0hbeK56/q049j5MrO6D7lAoMadiIbPtjBsZhL3q5mU9k4 6qrbtAafR93T7d+qoGY05eYmUBf6bgjl6PM3dDntz3tEBIw6prMQdhWdDWFWJQMaKLVBhtJ41SFjs o58/HQZQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot78X-00AHCi-A2; Thu, 10 Nov 2022 12:58:30 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id CF382300C26; Thu, 10 Nov 2022 13:58:27 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id AEFD02B31AD65; Thu, 10 Nov 2022 13:58:27 +0100 (CET) Message-ID: <20221110125544.661001508@infradead.org> User-Agent: quilt/0.66 Date: Thu, 10 Nov 2022 13:52:57 +0100 From: Peter Zijlstra To: x86@kernel.org, dave.hansen@intel.com Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, torvalds@linux-foundation.org, oliver.sang@intel.com Subject: [PATCH 4/4] x86/mm: Rename __change_page_attr_set_clr(.checkalias) References: <20221110125253.240704966@infradead.org> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749114229581729586?= X-GMAIL-MSGID: =?utf-8?q?1749114229581729586?= Now that the checkalias functionality is taken by CPA_NO_CHECK_ALIAS rename the argument to better match is remaining purpose: primary, matching __change_page_attr(). Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/mm/pat/set_memory.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/arch/x86/mm/pat/set_memory.c +++ b/arch/x86/mm/pat/set_memory.c @@ -1635,7 +1635,7 @@ static int __change_page_attr(struct cpa return err; } -static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias); +static int __change_page_attr_set_clr(struct cpa_data *cpa, int primary); /* * Check the directmap and "high kernel map" 'aliases'. @@ -1712,7 +1712,7 @@ static int cpa_process_alias(struct cpa_ return 0; } -static int __change_page_attr_set_clr(struct cpa_data *cpa, int checkalias) +static int __change_page_attr_set_clr(struct cpa_data *cpa, int primary) { unsigned long numpages = cpa->numpages; unsigned long rempages = numpages; @@ -1736,13 +1736,13 @@ static int __change_page_attr_set_clr(st if (!debug_pagealloc_enabled()) spin_lock(&cpa_lock); - ret = __change_page_attr(cpa, checkalias); + ret = __change_page_attr(cpa, primary); if (!debug_pagealloc_enabled()) spin_unlock(&cpa_lock); if (ret) goto out; - if (checkalias && !(cpa->flags & CPA_NO_CHECK_ALIAS)) { + if (primary && !(cpa->flags & CPA_NO_CHECK_ALIAS)) { ret = cpa_process_alias(cpa); if (ret) goto out;