From c160cae765412f5736cf88a9ebcc6138aa761a48 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Wed, 15 Jun 2016 08:33:28 +0800 Subject: Divergence: Port declarators back to ACPICA Linux uses asmlinkage and sparse macros to mark function symbols. This leads to the divergences between the Linux and the ACPICA. This patch ports such declarators back to ACPICA. Lv Zheng. Signed-off-by: Lv Zheng --- source/components/tables/tbutils.c | 2 +- source/components/tables/tbxface.c | 4 ++-- source/components/tables/tbxfload.c | 4 ++-- source/components/tables/tbxfroot.c | 4 ++-- source/components/utilities/utxface.c | 2 +- source/components/utilities/utxfinit.c | 6 +++--- source/include/acpixf.h | 18 +++++++++--------- source/include/actables.h | 2 +- source/include/platform/acenv.h | 4 ++++ source/include/platform/aclinux.h | 2 ++ source/include/platform/aclinuxex.h | 2 +- 11 files changed, 28 insertions(+), 22 deletions(-) diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index fd1d427d6..f270b9446 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -345,7 +345,7 @@ AcpiTbGetRootTableEntry ( * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiTbParseRootTable ( ACPI_PHYSICAL_ADDRESS RsdpAddress) { diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 09753bf34..9ac9dc132 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -175,7 +175,7 @@ AcpiAllocateRootTable ( * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInitializeTables ( ACPI_TABLE_DESC *InitialTableArray, UINT32 InitialTableCount, @@ -251,7 +251,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeTables) * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiReallocateRootTable ( void) { diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c index 6c6f2bee8..6ffc3ccba 100644 --- a/source/components/tables/tbxfload.c +++ b/source/components/tables/tbxfload.c @@ -137,7 +137,7 @@ * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiLoadTables ( void) { @@ -372,7 +372,7 @@ UnlockAndExit: * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInstallTable ( ACPI_PHYSICAL_ADDRESS Address, BOOLEAN Physical) diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c index c5275c8b8..abd29a8e7 100644 --- a/source/components/tables/tbxfroot.c +++ b/source/components/tables/tbxfroot.c @@ -228,7 +228,7 @@ AcpiTbValidateRsdp ( * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiFindRootPointer ( ACPI_PHYSICAL_ADDRESS *TableAddress) { @@ -334,7 +334,7 @@ AcpiFindRootPointer ( return_ACPI_STATUS (AE_NOT_FOUND); } -ACPI_EXPORT_SYMBOL (AcpiFindRootPointer) +ACPI_EXPORT_SYMBOL_INIT (AcpiFindRootPointer) /******************************************************************************* diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index b616ed905..a8aeef6ac 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -135,7 +135,7 @@ * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiTerminate ( void) { diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c index c6a26d992..c6f875c23 100644 --- a/source/components/utilities/utxfinit.c +++ b/source/components/utilities/utxfinit.c @@ -144,7 +144,7 @@ AeDoObjectOverrides ( * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInitializeSubsystem ( void) { @@ -223,7 +223,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeSubsystem) * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiEnableSubsystem ( UINT32 Flags) { @@ -335,7 +335,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiEnableSubsystem) * ******************************************************************************/ -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInitializeObjects ( UINT32 Flags) { diff --git a/source/include/acpixf.h b/source/include/acpixf.h index 2f939b1f5..f2278dcfd 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -492,29 +492,29 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning); * Initialization */ ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInitializeTables ( ACPI_TABLE_DESC *InitialStorage, UINT32 InitialTableCount, BOOLEAN AllowResize)) ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInitializeSubsystem ( void)) ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiEnableSubsystem ( UINT32 Flags)) ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInitializeObjects ( UINT32 Flags)) ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiTerminate ( void)) @@ -592,7 +592,7 @@ AcpiDecodePldBuffer ( * ACPI table load/unload interfaces */ ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiInstallTable ( ACPI_PHYSICAL_ADDRESS Address, BOOLEAN Physical)) @@ -608,7 +608,7 @@ AcpiUnloadParentTable ( ACPI_HANDLE Object)) ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiLoadTables ( void)) @@ -617,12 +617,12 @@ AcpiLoadTables ( * ACPI table manipulation interfaces */ ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiReallocateRootTable ( void)) ACPI_EXTERNAL_RETURN_STATUS ( -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiFindRootPointer ( ACPI_PHYSICAL_ADDRESS *RsdpAddress)) diff --git a/source/include/actables.h b/source/include/actables.h index 204af438c..31a4b7d19 100644 --- a/source/include/actables.h +++ b/source/include/actables.h @@ -314,7 +314,7 @@ AcpiTbInstallFixedTable ( char *Signature, UINT32 *TableIndex); -ACPI_STATUS +ACPI_STATUS ACPI_INIT_FUNCTION AcpiTbParseRootTable ( ACPI_PHYSICAL_ADDRESS RsdpAddress); diff --git a/source/include/platform/acenv.h b/source/include/platform/acenv.h index 7a7245624..caf7b8c10 100644 --- a/source/include/platform/acenv.h +++ b/source/include/platform/acenv.h @@ -479,4 +479,8 @@ typedef char *va_list; #endif /* ACPI_APPLICATION */ #endif /* ACPI_FILE */ +#ifndef ACPI_INIT_FUNCTION +#define ACPI_INIT_FUNCTION +#endif + #endif /* __ACENV_H__ */ diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h index 912773593..cdba2f01e 100644 --- a/source/include/platform/aclinux.h +++ b/source/include/platform/aclinux.h @@ -161,6 +161,8 @@ #include #endif +#define ACPI_INIT_FUNCTION __init + #ifndef CONFIG_ACPI /* External globals for __KERNEL__, stubs is needed */ diff --git a/source/include/platform/aclinuxex.h b/source/include/platform/aclinuxex.h index fb259b031..7f24989c9 100644 --- a/source/include/platform/aclinuxex.h +++ b/source/include/platform/aclinuxex.h @@ -143,7 +143,7 @@ /* * Overrides for in-kernel ACPICA */ -ACPI_STATUS __init AcpiOsInitialize ( +ACPI_STATUS ACPI_INIT_FUNCTION AcpiOsInitialize ( void); ACPI_STATUS AcpiOsTerminate ( -- cgit v1.2.1