summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/hugetlb.h
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.ibm.com>2018-07-13 12:28:26 +0200
committerJanosch Frank <frankja@linux.ibm.com>2018-07-30 12:20:18 +0200
commit3afdfca69870963ae01e280732a5ee493a2fcbb3 (patch)
tree70dbb40d24460ea9daa00141e9161fe38c76efc8 /arch/s390/include/asm/hugetlb.h
parents390/mm: Clear huge page storage keys on enable_skey (diff)
downloadlinux-3afdfca69870963ae01e280732a5ee493a2fcbb3.tar.xz
linux-3afdfca69870963ae01e280732a5ee493a2fcbb3.zip
s390/mm: Clear skeys for newly mapped huge guest pmds
Similarly to the pte skey handling, where we set the storage key to the default key for each newly mapped pte, we have to also do that for huge pmds. With the PG_arch_1 flag we keep track if the area has already been cleared of its skeys. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/hugetlb.h')
-rw-r--r--arch/s390/include/asm/hugetlb.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h
index 9c5fc50204dd..2d1afa58a4b6 100644
--- a/arch/s390/include/asm/hugetlb.h
+++ b/arch/s390/include/asm/hugetlb.h
@@ -37,7 +37,10 @@ static inline int prepare_hugepage_range(struct file *file,
return 0;
}
-#define arch_clear_hugepage_flags(page) do { } while (0)
+static inline void arch_clear_hugepage_flags(struct page *page)
+{
+ clear_bit(PG_arch_1, &page->flags);
+}
static inline void huge_pte_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, unsigned long sz)