From: "tip-bot2 for Coiby Xu" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Coiby Xu <coxu@redhat.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] x86/crash: Use set_memory_p() instead of __set_memory_prot()
Date: Tue, 13 Jan 2026 15:12:56 -0000 [thread overview]
Message-ID: <176831717666.510.18263565875642068854.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260106095100.656292-1-coxu@redhat.com>
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 8a4e92b3260ae7664d0531e1b42c38d336e7717a
Gitweb: https://git.kernel.org/tip/8a4e92b3260ae7664d0531e1b42c38d336e7717a
Author: Coiby Xu <coxu@redhat.com>
AuthorDate: Tue, 06 Jan 2026 17:50:58 +08:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 13 Jan 2026 15:28:59 +01:00
x86/crash: Use set_memory_p() instead of __set_memory_prot()
set_memory_p() is available to use outside of its compilation unit since:
030ad7af9437 ("x86/mm: Regularize set_memory_p() parameters and make non-static").
There is no use for __set_memory_prot() anymore so drop it too.
[ bp: Massage commit message. ]
Signed-off-by: Coiby Xu <coxu@redhat.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://patch.msgid.link/20260106095100.656292-1-coxu@redhat.com
---
arch/x86/include/asm/set_memory.h | 1 -
arch/x86/kernel/machine_kexec_64.c | 5 +----
arch/x86/mm/pat/set_memory.c | 13 -------------
3 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/arch/x86/include/asm/set_memory.h b/arch/x86/include/asm/set_memory.h
index 61f56cd..4362c26 100644
--- a/arch/x86/include/asm/set_memory.h
+++ b/arch/x86/include/asm/set_memory.h
@@ -38,7 +38,6 @@ int set_memory_rox(unsigned long addr, int numpages);
* The caller is required to take care of these.
*/
-int __set_memory_prot(unsigned long addr, int numpages, pgprot_t prot);
int _set_memory_uc(unsigned long addr, int numpages);
int _set_memory_wc(unsigned long addr, int numpages);
int _set_memory_wt(unsigned long addr, int numpages);
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 201137b..0590d39 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -673,10 +673,7 @@ static void kexec_mark_dm_crypt_keys(bool protect)
if (protect)
set_memory_np((unsigned long)phys_to_virt(start_paddr), nr_pages);
else
- __set_memory_prot(
- (unsigned long)phys_to_virt(start_paddr),
- nr_pages,
- __pgprot(_PAGE_PRESENT | _PAGE_NX | _PAGE_RW));
+ set_memory_p((unsigned long)phys_to_virt(start_paddr), nr_pages);
}
}
diff --git a/arch/x86/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
index 6c6eb48..40581a7 100644
--- a/arch/x86/mm/pat/set_memory.c
+++ b/arch/x86/mm/pat/set_memory.c
@@ -2145,19 +2145,6 @@ static inline int cpa_clear_pages_array(struct page **pages, int numpages,
CPA_PAGES_ARRAY, pages);
}
-/*
- * __set_memory_prot is an internal helper for callers that have been passed
- * a pgprot_t value from upper layers and a reservation has already been taken.
- * If you want to set the pgprot to a specific page protocol, use the
- * set_memory_xx() functions.
- */
-int __set_memory_prot(unsigned long addr, int numpages, pgprot_t prot)
-{
- return change_page_attr_set_clr(&addr, numpages, prot,
- __pgprot(~pgprot_val(prot)), 0, 0,
- NULL);
-}
-
int _set_memory_uc(unsigned long addr, int numpages)
{
/*
prev parent reply other threads:[~2026-01-13 15:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 9:50 [PATCH 1/2] x86/crash: Use set_memory_p instead of __set_memory_prot Coiby Xu
2026-01-06 9:50 ` [PATCH 2/2] Reapply "x86/mm: Remove unused __set_memory_prot()" Coiby Xu
2026-01-09 20:11 ` [PATCH 1/2] x86/crash: Use set_memory_p instead of __set_memory_prot Borislav Petkov
2026-01-13 10:14 ` Coiby Xu
2026-01-13 14:27 ` Borislav Petkov
2026-01-14 2:36 ` Coiby Xu
2026-01-13 15:12 ` tip-bot2 for Coiby Xu [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=176831717666.510.18263565875642068854.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=coxu@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.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®