sparc32: fix page table traversal in srmmu_nocache_init()

The srmmu_nocache_init() uses __nocache_fix() macro to add an offset to
page table entry to access srmmu_nocache_pool.

But since sparc32 has only three actual page table levels, pgd, p4d and
pud are essentially the same thing and pgd_offset() and p4d_offset() are
no-ops, the __nocache_fix() should be done only at PUD level.

Remove __nocache_fix() for p4d_offset() and pud_offset() and keep it
only for PUD and lower levels.

Fixes: c2bc26f7ca1f ("sparc32: use PUD rather than PGD to get PMD in srmmu_nocache_init()")
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Anatoly Pugachev <matorola@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Mike Rapoport and committed by Linus Torvalds 0cfc8a8d 423b8baf

Changed files
+2 -2
arch
sparc
mm
+2 -2
arch/sparc/mm/srmmu.c
··· 331 331 332 332 while (vaddr < srmmu_nocache_end) { 333 333 pgd = pgd_offset_k(vaddr); 334 - p4d = p4d_offset(__nocache_fix(pgd), vaddr); 335 - pud = pud_offset(__nocache_fix(p4d), vaddr); 334 + p4d = p4d_offset(pgd, vaddr); 335 + pud = pud_offset(p4d, vaddr); 336 336 pmd = pmd_offset(__nocache_fix(pud), vaddr); 337 337 pte = pte_offset_kernel(__nocache_fix(pmd), vaddr); 338 338