Commit 72a7af33 authored by Mike Rapoport's avatar Mike Rapoport Committed by David S. Miller

sparc32: use PUD rather than PGD to get PMD in srmmu_inherit_prom_mappings()

This is a misprint in the page table traversal in
srmmu_inherit_prom_mappings`() function which accessed a PMD entry using
PGD rather than PUD.

Since sparc32 has only 3 page table levels, the PGD and PUD are
essentially the same and usage of __nocache_fix() removed the type
checking.

Use PUD for the consistency and to avoid breakage because of upcoming
addition of type checking into __nocache_fix().

Fixes: 7235db26 ("sparc32: use pgtable-nopud instead of 4level-fixup")
Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7780918b
...@@ -822,7 +822,7 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start, ...@@ -822,7 +822,7 @@ static void __init srmmu_inherit_prom_mappings(unsigned long start,
memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE); memset(__nocache_fix(pmdp), 0, SRMMU_PMD_TABLE_SIZE);
pud_set(__nocache_fix(pudp), pmdp); pud_set(__nocache_fix(pudp), pmdp);
} }
pmdp = pmd_offset(__nocache_fix(pgdp), start); pmdp = pmd_offset(__nocache_fix(pudp), start);
if (what == 1) { if (what == 1) {
*(pmd_t *)__nocache_fix(pmdp) = __pmd(probed); *(pmd_t *)__nocache_fix(pmdp) = __pmd(probed);
start += PMD_SIZE; start += PMD_SIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment