mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
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)
Date: Thu, 10 Nov 2022 13:52:57 +0100	[thread overview]
Message-ID: <20221110125544.661001508@infradead.org> (raw)
In-Reply-To: <20221110125253.240704966@infradead.org>

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) <peterz@infradead.org>
---
 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;



      parent reply	other threads:[~2022-11-10 12:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 12:52 [PATCH 0/4] x86/mm: Fix set_memory_rox() Peter Zijlstra
2022-11-10 12:52 ` [PATCH 1/4] x86/mm: Add a few comments Peter Zijlstra
2022-11-10 16:22   ` Linus Torvalds
2022-11-10 18:02     ` Peter Zijlstra
2022-11-11 11:50       ` Peter Zijlstra
2022-11-10 12:52 ` [PATCH 2/4] x86/mm: Untangle __change_page_attr_set_clr(.checkalias) Peter Zijlstra
2022-11-10 12:52 ` [PATCH 3/4] x86/mm: Inhibit _PAGE_NX changes from cpa_process_alias() Peter Zijlstra
2022-11-14 16:08   ` Dave Hansen
2022-11-10 12:52 ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221110125544.661001508@infradead.org \
    --to=peterz@infradead.org \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.sang@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®