diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2025-01-29 11:20:17 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-01-30 13:07:05 +0000 |
commit | e5b56d6ef9fb028957683fd546347edf5232a024 (patch) | |
tree | 942e27d8a674ab3b5810cc0c9225acb23615c90a | |
parent | afdae789cd0d33c6f7debce2fc41f1af4946d869 (diff) | |
download | edk2-e5b56d6ef9fb028957683fd546347edf5232a024.tar.gz |
ArmPkg/CpuDxe: Use STATIC linkage where possible
Use static linkage for variables and routines that are not referenced
from other objects. This is generally preferred, because it gives the
compiler more freedom for optimization.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
-rw-r--r-- | ArmPkg/Drivers/CpuDxe/CpuDxe.c | 10 | ||||
-rw-r--r-- | ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c index 9bb2b4a600..f109a8e0cf 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c @@ -42,6 +42,7 @@ BOOLEAN mIsFlushingGCD; from the processor's data cache.
**/
+STATIC
EFI_STATUS
EFIAPI
CpuFlushCpuDataCache (
@@ -77,6 +78,7 @@ CpuFlushCpuDataCache ( @retval EFI_DEVICE_ERROR Interrupts could not be enabled on the processor.
**/
+STATIC
EFI_STATUS
EFIAPI
CpuEnableInterrupt (
@@ -97,6 +99,7 @@ CpuEnableInterrupt ( @retval EFI_DEVICE_ERROR Interrupts could not be disabled on the processor.
**/
+STATIC
EFI_STATUS
EFIAPI
CpuDisableInterrupt (
@@ -121,6 +124,7 @@ CpuDisableInterrupt ( @retval EFI_INVALID_PARAMETER State is NULL.
**/
+STATIC
EFI_STATUS
EFIAPI
CpuGetInterruptState (
@@ -152,6 +156,7 @@ CpuGetInterruptState ( @retval EFI_DEVICE_ERROR The processor INIT failed.
**/
+STATIC
EFI_STATUS
EFIAPI
CpuInit (
@@ -162,6 +167,7 @@ CpuInit ( return EFI_UNSUPPORTED;
}
+STATIC
EFI_STATUS
EFIAPI
CpuRegisterInterruptHandler (
@@ -173,6 +179,7 @@ CpuRegisterInterruptHandler ( return RegisterInterruptHandler (InterruptType, InterruptHandler);
}
+STATIC
EFI_STATUS
EFIAPI
CpuGetTimerValue (
@@ -193,6 +200,7 @@ CpuGetTimerValue ( which is implementation-dependent.
**/
+STATIC
VOID
EFIAPI
IdleLoopEventCallback (
@@ -206,7 +214,7 @@ IdleLoopEventCallback ( //
// Globals used to initialize the protocol
//
-EFI_CPU_ARCH_PROTOCOL mCpu = {
+STATIC EFI_CPU_ARCH_PROTOCOL mCpu = {
CpuFlushCpuDataCache,
CpuEnableInterrupt,
CpuDisableInterrupt,
diff --git a/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c b/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c index dbe71e4d59..489c0a17a4 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c +++ b/ArmPkg/Drivers/CpuDxe/CpuMmuCommon.c @@ -27,6 +27,7 @@ @retval EFI_NOT_FOUND The requested descriptors does not exist.
**/
+STATIC
EFI_STATUS
SearchGcdMemorySpaces (
IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap,
|