summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2021-08-03 15:42:29 +0300
committerHeiko Carstens <hca@linux.ibm.com>2021-08-05 15:10:53 +0300
commitcfafad6d7897b4add601ed6ee0bd0221b7f81e30 (patch)
tree76eb05542be50f5a18b98d776ca220879861f9e3
parent52b6defae7de31aaa960e78e506f882c12b4af53 (diff)
downloadlinux-cfafad6d7897b4add601ed6ee0bd0221b7f81e30.tar.xz
s390/mm: use page_to_virt() in __kernel_map_pages()
Fix virtual vs physical address confusion (which currently are the same). Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-rw-r--r--arch/s390/mm/pageattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c
index dd45010f0e8d..45197b71d55f 100644
--- a/arch/s390/mm/pageattr.c
+++ b/arch/s390/mm/pageattr.c
@@ -351,7 +351,7 @@ void __kernel_map_pages(struct page *page, int numpages, int enable)
pte_t *pte;
for (i = 0; i < numpages;) {
- address = page_to_phys(page + i);
+ address = (unsigned long)page_to_virt(page + i);
pte = virt_to_kpte(address);
nr = (unsigned long)pte >> ilog2(sizeof(long));
nr = PTRS_PER_PTE - (nr & (PTRS_PER_PTE - 1));