Skip to content

Commit

Permalink
Divergence: Port declarators back to ACPICA
Browse files Browse the repository at this point in the history
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 <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Jun 15, 2016
1 parent e62fd48 commit c160cae
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion source/components/tables/tbutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ AcpiTbGetRootTableEntry (
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTbParseRootTable (
ACPI_PHYSICAL_ADDRESS RsdpAddress)
{
Expand Down
4 changes: 2 additions & 2 deletions source/components/tables/tbxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ AcpiAllocateRootTable (
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeTables (
ACPI_TABLE_DESC *InitialTableArray,
UINT32 InitialTableCount,
Expand Down Expand Up @@ -251,7 +251,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeTables)
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiReallocateRootTable (
void)
{
Expand Down
4 changes: 2 additions & 2 deletions source/components/tables/tbxfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiLoadTables (
void)
{
Expand Down Expand Up @@ -372,7 +372,7 @@ AcpiTbLoadNamespace (
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallTable (
ACPI_PHYSICAL_ADDRESS Address,
BOOLEAN Physical)
Expand Down
4 changes: 2 additions & 2 deletions source/components/tables/tbxfroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ AcpiTbValidateRsdp (
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiFindRootPointer (
ACPI_PHYSICAL_ADDRESS *TableAddress)
{
Expand Down Expand Up @@ -334,7 +334,7 @@ AcpiFindRootPointer (
return_ACPI_STATUS (AE_NOT_FOUND);
}

ACPI_EXPORT_SYMBOL (AcpiFindRootPointer)
ACPI_EXPORT_SYMBOL_INIT (AcpiFindRootPointer)


/*******************************************************************************
Expand Down
2 changes: 1 addition & 1 deletion source/components/utilities/utxface.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTerminate (
void)
{
Expand Down
6 changes: 3 additions & 3 deletions source/components/utilities/utxfinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ AeDoObjectOverrides (
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeSubsystem (
void)
{
Expand Down Expand Up @@ -223,7 +223,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeSubsystem)
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiEnableSubsystem (
UINT32 Flags)
{
Expand Down Expand Up @@ -335,7 +335,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiEnableSubsystem)
*
******************************************************************************/

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeObjects (
UINT32 Flags)
{
Expand Down
18 changes: 9 additions & 9 deletions source/include/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down Expand Up @@ -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))
Expand All @@ -608,7 +608,7 @@ AcpiUnloadParentTable (
ACPI_HANDLE Object))

ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiLoadTables (
void))

Expand All @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion source/include/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ AcpiTbInstallFixedTable (
char *Signature,
UINT32 *TableIndex);

ACPI_STATUS
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTbParseRootTable (
ACPI_PHYSICAL_ADDRESS RsdpAddress);

Expand Down
4 changes: 4 additions & 0 deletions source/include/platform/acenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */
2 changes: 2 additions & 0 deletions source/include/platform/aclinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@
#include <asm/acenv.h>
#endif

#define ACPI_INIT_FUNCTION __init

#ifndef CONFIG_ACPI

/* External globals for __KERNEL__, stubs is needed */
Expand Down
2 changes: 1 addition & 1 deletion source/include/platform/aclinuxex.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
/*
* Overrides for in-kernel ACPICA
*/
ACPI_STATUS __init AcpiOsInitialize (
ACPI_STATUS ACPI_INIT_FUNCTION AcpiOsInitialize (
void);

ACPI_STATUS AcpiOsTerminate (
Expand Down

0 comments on commit c160cae

Please sign in to comment.