[PATCH] powerpc/mm: Use VM_WARN_ONCE() for irqs disabled check
Michael Ellerman
mpe at ellerman.id.au
Tue Jun 28 16:38:21 AEST 2016
The check for !arch_irqs_disabled() in find_linux_pte_or_hugepte() is a
debugging aid, and needn't be enabled for production builds.
Switch it to a VM_WARN_ONCE(), which is compiled out when
CONFIG_DEBUG_VM=n.
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
arch/powerpc/include/asm/pgtable.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index ee09e99097f0..651848039dc4 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -71,10 +71,8 @@ pte_t *__find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
static inline pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
bool *is_thp, unsigned *shift)
{
- if (!arch_irqs_disabled()) {
- pr_info("%s called with irq enabled\n", __func__);
- dump_stack();
- }
+ VM_WARN_ONCE(!arch_irqs_disabled(),
+ "find_linux_pte_or_hugepte() called with irqs enabled!\n");
return __find_linux_pte_or_hugepte(pgdir, ea, is_thp, shift);
}
--
2.5.0
More information about the Linuxppc-dev
mailing list