* [PATCH] powerpc/book3e: drop BUG_ON() in map_kernel_page()
@ 2019-03-28 13:03 Christophe Leroy
2019-05-03 6:59 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2019-03-28 13:03 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linuxppc-dev, linux-kernel
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>
---
arch/powerpc/mm/pgtable-book3e.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/powerpc/mm/pgtable-book3e.c b/arch/powerpc/mm/pgtable-book3e.c
index 1032ef7aaf62..390a6d0b216d 100644
--- a/arch/powerpc/mm/pgtable-book3e.c
+++ b/arch/powerpc/mm/pgtable-book3e.c
@@ -98,20 +98,17 @@ int map_kernel_page(unsigned long ea, unsigned long pa, pgprot_t prot)
#ifndef __PAGETABLE_PUD_FOLDED
if (pgd_none(*pgdp)) {
pudp = early_alloc_pgtable(PUD_TABLE_SIZE);
- BUG_ON(pudp == NULL);
pgd_populate(&init_mm, pgdp, pudp);
}
#endif /* !__PAGETABLE_PUD_FOLDED */
pudp = pud_offset(pgdp, ea);
if (pud_none(*pudp)) {
pmdp = early_alloc_pgtable(PMD_TABLE_SIZE);
- BUG_ON(pmdp == NULL);
pud_populate(&init_mm, pudp, pmdp);
}
pmdp = pmd_offset(pudp, ea);
if (!pmd_present(*pmdp)) {
ptep = early_alloc_pgtable(PAGE_SIZE);
- BUG_ON(ptep == NULL);
pmd_populate_kernel(&init_mm, pmdp, ptep);
}
ptep = pte_offset_kernel(pmdp, ea);
--
2.13.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/book3e: drop BUG_ON() in map_kernel_page()
2019-03-28 13:03 [PATCH] powerpc/book3e: drop BUG_ON() in map_kernel_page() Christophe Leroy
@ 2019-05-03 6:59 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2019-05-03 6:59 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras
Cc: linuxppc-dev, linux-kernel
On Thu, 2019-03-28 at 13:03:45 UTC, Christophe Leroy wrote:
> 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>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/a1ac2a9c4f98482e49305ab5551b7b32
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-03 7:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 13:03 [PATCH] powerpc/book3e: drop BUG_ON() in map_kernel_page() Christophe Leroy
2019-05-03 6:59 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).