diff mbox

[U-Boot] x86: acpi: Fix build error with certain configuration

Message ID 1502192107-31602-1-git-send-email-bmeng.cn@gmail.com
State Accepted
Commit 323a6d691079bd15f0a9c0c9607bebadf958cd16
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng Aug. 8, 2017, 11:35 a.m. UTC
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.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

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

Comments

Stefan Roese Aug. 8, 2017, 11:44 a.m. UTC | #1
On 08.08.2017 13:35, Bin Meng wrote:
> 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.
> 
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
> 
>   arch/x86/lib/acpi_s3.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/lib/acpi_s3.c b/arch/x86/lib/acpi_s3.c
> index 3175da8..182379b 100644
> --- a/arch/x86/lib/acpi_s3.c
> +++ b/arch/x86/lib/acpi_s3.c
> @@ -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;
>   
> 

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan
Bin Meng Aug. 8, 2017, 1:24 p.m. UTC | #2
On Tue, Aug 8, 2017 at 7:44 PM, Stefan Roese <sr@denx.de> wrote:
> On 08.08.2017 13:35, Bin Meng wrote:
>>
>> 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.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>   arch/x86/lib/acpi_s3.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/x86/lib/acpi_s3.c b/arch/x86/lib/acpi_s3.c
>> index 3175da8..182379b 100644
>> --- a/arch/x86/lib/acpi_s3.c
>> +++ b/arch/x86/lib/acpi_s3.c
>> @@ -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;
>>
>
>
> Reviewed-by: Stefan Roese <sr@denx.de>

applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/arch/x86/lib/acpi_s3.c b/arch/x86/lib/acpi_s3.c
index 3175da8..182379b 100644
--- a/arch/x86/lib/acpi_s3.c
+++ b/arch/x86/lib/acpi_s3.c
@@ -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;