[PATCH 2/3] acpi: Only include asm header when available

Simon Glass sjg at chromium.org
Tue Nov 3 16:12:04 CET 2020


On Fri, 30 Oct 2020 at 02:45, Harm Berntsen <harm.berntsen at nedap.com> wrote:
>
> The only platforms with an asm/acpi_table.h file are X86 and Sandbox.
> Some drivers, i.e. pci_mmc.c, can generate ACPI info and therefore
> include asm/acpi_table.h by proxy. This commit ensures that the
> platforms wishing to use such driver and do not have ACPI support do not
> fail on this include. The if defined structure is also used in other
> places to conditionally include asm headers, i.e.
> arch/arm/include/asm/gpio.h
>
> Signed-off-by: Harm Berntsen <harm.berntsen at nedap.com>
> CC: Simon Glass <sjg at chromium.org>
> ---
>
>  include/acpi/acpi_table.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
> index abbca6530d..8d9d0f8d19 100644
> --- a/include/acpi/acpi_table.h
> +++ b/include/acpi/acpi_table.h
> @@ -690,6 +690,8 @@ void acpi_setup_base_tables(struct acpi_ctx *ctx, void *start);
>
>  #endif /* !__ACPI__*/
>
> +#if defined(CONFIG_X86) || defined(CONFIG_SANDBOX)
>  #include <asm/acpi_table.h>
> +#endif

Reviewed-by: Simon Glass <sjg at chromium.org>

But how about adding an empty file for the other architecture?

>
>  #endif /* __ACPI_TABLE_H__ */
>


More information about the U-Boot mailing list