From: Heiko Carstens Date: Thu, 19 May 2016 14:25:30 +0000 (+0200) Subject: s390/mm: always use PAGE_KERNEL when mapping pages X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3e76ee99b095e5bee71165fda5edbe6b66b39700;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git s390/mm: always use PAGE_KERNEL when mapping pages Always use PAGE_KERNEL when re-enabling pages within the kernel mapping due to debug pagealloc. Without using this pgprot value pte_mkwrite() and pte_wrprotect() won't work on such mappings after an unmap -> map cycle anymore. Signed-off-by: Heiko Carstens Acked-by: Martin Schwidefsky Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c index f2a5c29a97e9..e67a8f712e19 100644 --- a/arch/s390/mm/pageattr.c +++ b/arch/s390/mm/pageattr.c @@ -138,7 +138,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable) nr = min(numpages - i, nr); if (enable) { for (j = 0; j < nr; j++) { - pte_val(*pte) = __pa(address); + pte_val(*pte) = address | pgprot_val(PAGE_KERNEL); address += PAGE_SIZE; pte++; }