mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kevin Brodsky <kevin.brodsky@arm.com>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org,
	Kevin Brodsky <kevin.brodsky@arm.com>,
	bp@alien8.de, dan.j.williams@intel.com,
	dave.hansen@linux.intel.com, david@redhat.com,
	jane.chu@oracle.com, osalvador@suse.de, tglx@linutronix.de
Subject: [PATCH v2 1/2] x86/mm: Remove unused __set_memory_prot()
Date: Thu, 12 Dec 2024 08:09:03 +0000	[thread overview]
Message-ID: <20241212080904.2089632-2-kevin.brodsky@arm.com> (raw)
In-Reply-To: <20241212080904.2089632-1-kevin.brodsky@arm.com>

__set_memory_prot() is unused since commit 5c11f00b09c1 ("x86:
remove memory hotplug support on X86_32"). Let's remove it.

Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
---
 arch/x86/include/asm/set_memory.h |  1 -
 arch/x86/mm/pat/set_memory.c      | 13 -------------
 2 files changed, 14 deletions(-)

diff --git a/arch/x86/include/asm/set_memory.h b/arch/x86/include/asm/set_memory.h
index cc62ef70ccc0..6586d533fe3a 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/mm/pat/set_memory.c b/arch/x86/mm/pat/set_memory.c
index 95bc50a8541c..2dc1145cfdb8 100644
--- a/arch/x86/mm/pat/set_memory.c
+++ b/arch/x86/mm/pat/set_memory.c
@@ -1944,19 +1944,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)
 {
 	/*
-- 
2.47.0


  reply	other threads:[~2024-12-12  8:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12  8:09 [PATCH v2 0/2] Remove problematic include in <asm/set_memory.h> Kevin Brodsky
2024-12-12  8:09 ` Kevin Brodsky [this message]
2025-02-28 17:03   ` [tip: x86/headers] x86/mm: Remove unused __set_memory_prot() tip-bot2 for Kevin Brodsky
2024-12-12  8:09 ` [PATCH v2 2/2] x86/mm: Remove unnecessary include in set_memory.h Kevin Brodsky
2025-02-27 13:02   ` Ingo Molnar
2025-02-27 13:03     ` Ingo Molnar
2025-02-28 10:56       ` Kevin Brodsky
2025-02-28 17:14         ` Ingo Molnar
2025-02-28 17:43           ` Kevin Brodsky
2025-02-28 17:03   ` [tip: x86/headers] x86/mm: Reduce header dependencies in <asm/set_memory.h> tip-bot2 for Kevin Brodsky
2024-12-20 10:28 ` [PATCH v2 0/2] Remove problematic include " David Hildenbrand

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=20241212080904.2089632-2-kevin.brodsky@arm.com \
    --to=kevin.brodsky@arm.com \
    --cc=bp@alien8.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=david@redhat.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=osalvador@suse.de \
    --cc=tglx@linutronix.de \
    --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®