diff options
Diffstat (limited to 'lib/ioremap.c')
-rw-r--r-- | lib/ioremap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ioremap.c b/lib/ioremap.c index b808a390e4c3..54e5bbaa3200 100644 --- a/lib/ioremap.c +++ b/lib/ioremap.c | |||
@@ -91,7 +91,8 @@ static inline int ioremap_pmd_range(pud_t *pud, unsigned long addr, | |||
91 | 91 | ||
92 | if (ioremap_pmd_enabled() && | 92 | if (ioremap_pmd_enabled() && |
93 | ((next - addr) == PMD_SIZE) && | 93 | ((next - addr) == PMD_SIZE) && |
94 | IS_ALIGNED(phys_addr + addr, PMD_SIZE)) { | 94 | IS_ALIGNED(phys_addr + addr, PMD_SIZE) && |
95 | pmd_free_pte_page(pmd)) { | ||
95 | if (pmd_set_huge(pmd, phys_addr + addr, prot)) | 96 | if (pmd_set_huge(pmd, phys_addr + addr, prot)) |
96 | continue; | 97 | continue; |
97 | } | 98 | } |
@@ -117,7 +118,8 @@ static inline int ioremap_pud_range(p4d_t *p4d, unsigned long addr, | |||
117 | 118 | ||
118 | if (ioremap_pud_enabled() && | 119 | if (ioremap_pud_enabled() && |
119 | ((next - addr) == PUD_SIZE) && | 120 | ((next - addr) == PUD_SIZE) && |
120 | IS_ALIGNED(phys_addr + addr, PUD_SIZE)) { | 121 | IS_ALIGNED(phys_addr + addr, PUD_SIZE) && |
122 | pud_free_pmd_page(pud)) { | ||
121 | if (pud_set_huge(pud, phys_addr + addr, prot)) | 123 | if (pud_set_huge(pud, phys_addr + addr, prot)) |
122 | continue; | 124 | continue; |
123 | } | 125 | } |