From e3aa7252ba58aefc0c8780dd20f169bcdbc9a3d3 Mon Sep 17 00:00:00 2001 From: "Cohen, Eugene" Date: Mon, 22 Feb 2016 23:08:27 +0000 Subject: [PATCH] ArmPkg: CpuDxe: don't track interrupt state in a global variable Update the CpuDxe driver to remove an assumption that it is the only component modifying interrupt state since this can be done through BaseLib as well. Instead of using a global variable for last interrupt state we now check the current PSTATE value directly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen Reviewed-by: Ard Biesheuvel --- ArmPkg/Drivers/CpuDxe/CpuDxe.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c index 0c49acb510..b1cac31d67 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c @@ -17,8 +17,6 @@ #include -BOOLEAN mInterruptState = FALSE; - /** This function flushes the range of addresses from Start to Start+Length @@ -92,7 +90,6 @@ CpuEnableInterrupt ( { ArmEnableInterrupts (); - mInterruptState = TRUE; return EFI_SUCCESS; } @@ -114,7 +111,6 @@ CpuDisableInterrupt ( { ArmDisableInterrupts (); - mInterruptState = FALSE; return EFI_SUCCESS; } @@ -143,7 +139,7 @@ CpuGetInterruptState ( return EFI_INVALID_PARAMETER; } - *State = mInterruptState; + *State = ArmGetInterruptState(); return EFI_SUCCESS; } -- 2.39.5