mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-04 20:57:45 -04: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:
030ad7af94 ("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
This commit is contained in:
committed by
Borislav Petkov (AMD)
parent
736a2dcfda
commit
8a4e92b326
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user