Re: [PATCH v2 3/6] s390/mm: Complete ptep_get() conversion

Alexander Gordeev
2026-04-24T11:54:34Z

On Thu, Apr 23, 2026 at 12:51:18PM +0200, Heiko Carstens wrote:
> Was this a manual conversion, or did you use some tooling?

Manual :) But I will try to recheck with a tool.

> I'm wondering since I can spot not converted locations, e.g. one in
> __kernel_map_pages().

Whether this fixup is fine?

diff --git a/arch/s390/mm/pageattr.c b/arch/s390/mm/pageattr.c
index 3a54860cb05f..e6f788696dd1 100644
--- a/arch/s390/mm/pageattr.c
+++ b/arch/s390/mm/pageattr.c
@@ -455,7 +455,8 @@ 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 = clear_pte_bit(*ptep, __pgprot(_PAGE_INVALID));
+ pte = ptep_get(ptep);
+ pte = clear_pte_bit(pte, __pgprot(_PAGE_INVALID));
set_pte(ptep, pte);
address += PAGE_SIZE;
ptep++;

> Besides that:
> Acked-by: Heiko Carstens <hca@linux.ibm.com>