fix: no exception information output, when the system is abnormal

after holding the scheduling lock in SMP.

Change-Id: I6f148d7b36d7aa6d0df09300949f53ea3c3d63b7
This commit is contained in:
YOUR_NAME 2021-04-26 20:13:13 +08:00
parent 28aa777191
commit 5bf4d1c712
1 changed files with 3 additions and 6 deletions

View File

@ -190,16 +190,13 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3
UINT32 fsrFlag;
BOOL write = FALSE;
UINT32 ret;
#ifdef LOSCFG_KERNEL_SMP
BOOL irqEnable = TRUE;
#endif
PRINT_INFO("page fault entry!!!\n");
if (OsGetSystemStatus() == OS_SYSTEM_EXC_CURR_CPU) {
return LOS_ERRNO_VM_NOT_FOUND;
}
#ifdef LOSCFG_KERNEL_SMP
irqEnable = !(LOS_SpinHeld(&g_taskSpin) && (OsPercpuGet()->taskLockCnt != 0));
#if defined(LOSCFG_KERNEL_SMP) && defined(LOSCFG_DEBUG_VERSION)
BOOL irqEnable = !(LOS_SpinHeld(&g_taskSpin) && (OsPercpuGet()->taskLockCnt != 0));
if (irqEnable) {
ArchIrqEnable();
} else {
@ -237,7 +234,7 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3
ret = LOS_ERRNO_VM_NOT_FOUND;
break;
}
#ifdef LOSCFG_KERNEL_SMP
#if defined(LOSCFG_KERNEL_SMP) && defined(LOSCFG_DEBUG_VERSION)
if (irqEnable) {
ArchIrqDisable();
}