mirror of https://github.com/acidanthera/audk.git
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 <eugene@hp.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
parent
4af3dd80ab
commit
e3aa7252ba
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include <Guid/IdleLoopEvent.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue