aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pageattr.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/pageattr.c')
-rw-r--r--arch/x86/mm/pageattr.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index a629cea5e465..f60b93dc2e57 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -405,8 +405,18 @@ static int __change_page_attr_set_clr(unsigned long addr, int numpages,
405static int change_page_attr_set_clr(unsigned long addr, int numpages, 405static int change_page_attr_set_clr(unsigned long addr, int numpages,
406 pgprot_t mask_set, pgprot_t mask_clr) 406 pgprot_t mask_set, pgprot_t mask_clr)
407{ 407{
408 int ret = __change_page_attr_set_clr(addr, numpages, mask_set, 408 int ret;
409 mask_clr); 409
410 /*
411 * Check, if we are requested to change a not supported
412 * feature:
413 */
414 mask_set = canon_pgprot(mask_set);
415 mask_clr = canon_pgprot(mask_clr);
416 if (!pgprot_val(mask_set) && !pgprot_val(mask_clr))
417 return 0;
418
419 ret = __change_page_attr_set_clr(addr, numpages, mask_set, mask_clr);
410 420
411 /* 421 /*
412 * On success we use clflush, when the CPU supports it to 422 * On success we use clflush, when the CPU supports it to