Skip to contentSkip to conversation

x86: acpi: Fix build error with certain configuration

PATCH New Bin Meng 2 participants 3 messages Aug 8, 2017 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 x86: acpi: Fix build error with certain configuration

When CONFIG_EFI_PARTITION is not set, the following build error is seen in arch/x86/lib/acpi_s3.c:

error: expected declaration specifiers or '...' before '*' token static void asmlinkage (*acpi_do_wakeup)(void *vector) = (void*)WAKEUP_BASE;

This is actually caused by missing asmlinkage declaration, but with CONFIG_EFI_PARTITION on, the declaration comes from part.h which is included from common.h.

---

 arch/x86/lib/acpi_s3.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/lib/acpi_s3.c +1 -0
index 3175da8..182379b 100644
@@ -8,6 +8,7 @@
 #include <asm/acpi_s3.h>
 #include <asm/acpi_table.h>
 #include <asm/post.h>
+#include <linux/linkage.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
2.9.2
#1 lore raw

PATCH 1/1 x86: acpi: Fix build error with certain configuration

Quoted 22 lines · Bin Meng

When CONFIG_EFI_PARTITION is not set, the following build error is seen in arch/x86/lib/acpi_s3.c:

error: expected declaration specifiers or '...' before '*' token static void asmlinkage (*acpi_do_wakeup)(void *vector) = (void*)WAKEUP_BASE;

This is actually caused by missing asmlinkage declaration, but with CONFIG_EFI_PARTITION on, the declaration comes from part.h which is included from common.h.

---

  arch/x86/lib/acpi_s3.c | 1 +
  1 file changed, 1 insertion(+)
arch/x86/lib/acpi_s3.c +0 -0
index 3175da8..182379b 100644

arch/x86/lib/acpi_s3.c line 14

Quoted 7 lines
arch/x86/lib/acpi_s3.c +1 -0
@@ -8,6 +8,7 @@
  #include <asm/acpi_s3.h>
  #include <asm/acpi_table.h>
  #include <asm/post.h>
+#include <linux/linkage.h>
 
  DECLARE_GLOBAL_DATA_PTR;
 

Thanks,
Stefan

author
#2 lore raw

PATCH 1/1 x86: acpi: Fix build error with certain configuration

Quoted 19 lines · Stefan Roese
Quoted 18 lines · Bin Meng

When CONFIG_EFI_PARTITION is not set, the following build error is seen in arch/x86/lib/acpi_s3.c:

error: expected declaration specifiers or '...' before '*' token static void asmlinkage (*acpi_do_wakeup)(void *vector) =
(void*)WAKEUP_BASE;

This is actually caused by missing asmlinkage declaration, but with CONFIG_EFI_PARTITION on, the declaration comes from part.h which is included from common.h.

---

  arch/x86/lib/acpi_s3.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 14 lines

arch/x86/lib/acpi_s3.c line 13

Quoted 11 lines
arch/x86/lib/acpi_s3.c +1 -0
index 3175da8..182379b 100644
@@ -8,6 +8,7 @@
  #include <asm/acpi_s3.h>
  #include <asm/acpi_table.h>
  #include <asm/post.h>
+#include <linux/linkage.h>
    DECLARE_GLOBAL_DATA_PTR;
 

applied to u-boot-x86, thanks!