mirror of https://gitee.com/openkylin/linux.git
powerpc/book3e: drop BUG_ON() in map_kernel_page()
early_alloc_pgtable() never returns NULL as it panics on failure. This patch drops the three BUG_ON() which check the non nullity of early_alloc_pgtable() returned value. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
e620d45065
commit
a1ac2a9c4f
|
@ -98,20 +98,17 @@ int map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t prot)
|
||||||
#ifndef __PAGETABLE_PUD_FOLDED
|
#ifndef __PAGETABLE_PUD_FOLDED
|
||||||
if (pgd_none(*pgdp)) {
|
if (pgd_none(*pgdp)) {
|
||||||
pudp = early_alloc_pgtable(PUD_TABLE_SIZE);
|
pudp = early_alloc_pgtable(PUD_TABLE_SIZE);
|
||||||
BUG_ON(pudp == NULL);
|
|
||||||
pgd_populate(&init_mm, pgdp, pudp);
|
pgd_populate(&init_mm, pgdp, pudp);
|
||||||
}
|
}
|
||||||
#endif /* !__PAGETABLE_PUD_FOLDED */
|
#endif /* !__PAGETABLE_PUD_FOLDED */
|
||||||
pudp = pud_offset(pgdp, ea);
|
pudp = pud_offset(pgdp, ea);
|
||||||
if (pud_none(*pudp)) {
|
if (pud_none(*pudp)) {
|
||||||
pmdp = early_alloc_pgtable(PMD_TABLE_SIZE);
|
pmdp = early_alloc_pgtable(PMD_TABLE_SIZE);
|
||||||
BUG_ON(pmdp == NULL);
|
|
||||||
pud_populate(&init_mm, pudp, pmdp);
|
pud_populate(&init_mm, pudp, pmdp);
|
||||||
}
|
}
|
||||||
pmdp = pmd_offset(pudp, ea);
|
pmdp = pmd_offset(pudp, ea);
|
||||||
if (!pmd_present(*pmdp)) {
|
if (!pmd_present(*pmdp)) {
|
||||||
ptep = early_alloc_pgtable(PAGE_SIZE);
|
ptep = early_alloc_pgtable(PAGE_SIZE);
|
||||||
BUG_ON(ptep == NULL);
|
|
||||||
pmd_populate_kernel(&init_mm, pmdp, ptep);
|
pmd_populate_kernel(&init_mm, pmdp, ptep);
|
||||||
}
|
}
|
||||||
ptep = pte_offset_kernel(pmdp, ea);
|
ptep = pte_offset_kernel(pmdp, ea);
|
||||||
|
|
Loading…
Reference in New Issue