From a68850e00f05a33dc03f89650136968660b1ed13 Mon Sep 17 00:00:00 2001 From: Jason Chen CJ Date: Thu, 5 Apr 2018 08:43:19 +0800 Subject: [PATCH] mmu: replace ASSERT with panic in fetch_page_table_offset all callers for fetch_page_table_offset should already make sure it will not come to an unknown table_leve, so just panic here. Signed-off-by: Jason Chen CJ --- hypervisor/arch/x86/mmu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hypervisor/arch/x86/mmu.c b/hypervisor/arch/x86/mmu.c index 0f8b15269..431767765 100644 --- a/hypervisor/arch/x86/mmu.c +++ b/hypervisor/arch/x86/mmu.c @@ -325,8 +325,10 @@ static uint32_t fetch_page_table_offset(void *addr, uint32_t table_level) break; default: - pr_err("Wrong page table level = 0x%lx", table_level); - ASSERT(false, "Wrong page table level"); + /* all callers should already make sure it will not come + * to here + */ + panic("Wrong page table level"); break; }