Message ID | 20200106100347.1559-15-drjones@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,kvm-unit-tests,01/17] arm: Add missing test name prefix for pl031 and spinlock | expand |
diff --git a/lib/arm/mmu.c b/lib/arm/mmu.c index 928a3702c563..111e3a52591a 100644 --- a/lib/arm/mmu.c +++ b/lib/arm/mmu.c @@ -68,8 +68,12 @@ void mmu_enable(pgd_t *pgtable) extern void asm_mmu_disable(void); void mmu_disable(void) { + unsigned long sp = current_stack_pointer; int cpu = current_thread_info()->cpu; + assert_msg(__virt_to_phys(sp) == sp, + "Attempting to disable MMU with non-identity mapped stack"); + mmu_mark_disabled(cpu); asm_mmu_disable();