All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] acpi: Only include asm header when available
@ 2020-10-30  8:45 Harm Berntsen
  2020-11-03 15:12 ` Simon Glass
  0 siblings, 1 reply; 5+ messages in thread
From: Harm Berntsen @ 2020-10-30  8:45 UTC (permalink / raw)
  To: u-boot

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@nedap.com>
CC: Simon Glass <sjg@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
?
?#endif /* __ACPI_TABLE_H__ */

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] acpi: Only include asm header when available
  2020-10-30  8:45 [PATCH 2/3] acpi: Only include asm header when available Harm Berntsen
@ 2020-11-03 15:12 ` Simon Glass
  2020-11-06 12:24   ` [PATCH v2 2/3] acpi: Add missing ARM acpi_table header Harm Berntsen
  0 siblings, 1 reply; 5+ messages in thread
From: Simon Glass @ 2020-11-03 15:12 UTC (permalink / raw)
  To: u-boot

On Fri, 30 Oct 2020 at 02:45, Harm Berntsen <harm.berntsen@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@nedap.com>
> CC: Simon Glass <sjg@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@chromium.org>

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

>
>  #endif /* __ACPI_TABLE_H__ */
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] acpi: Add missing ARM acpi_table header
  2020-11-03 15:12 ` Simon Glass
@ 2020-11-06 12:24   ` Harm Berntsen
  2020-11-06 18:50     ` Simon Glass
  2021-01-19 13:03     ` Tom Rini
  0 siblings, 2 replies; 5+ messages in thread
From: Harm Berntsen @ 2020-11-06 12:24 UTC (permalink / raw)
  To: u-boot

The pci_mmc.c driver can generate ACPI info and therefore includes
asm/acpi_table.h by proxy. This file does not exist for the ARM
architecture and thus code compilation failed when using this 
driver on ARM.

Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
CC: Simon Glass <sjg@chromium.org>
---
Changes for v2:
Different approach, the previous commit (acpi: Only include asm header
when available) used ifdefs to conditionally include acpi_table.h.
Based on Simon's suggestion this patch adds an empty file to fix the
issue.

 arch/arm/include/asm/acpi_table.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/acpi_table.h

diff --git a/arch/arm/include/asm/acpi_table.h
b/arch/arm/include/asm/acpi_table.h
new file mode 100644
index 0000000000..e69de29bb2
-- 
2.29.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] acpi: Add missing ARM acpi_table header
  2020-11-06 12:24   ` [PATCH v2 2/3] acpi: Add missing ARM acpi_table header Harm Berntsen
@ 2020-11-06 18:50     ` Simon Glass
  2021-01-19 13:03     ` Tom Rini
  1 sibling, 0 replies; 5+ messages in thread
From: Simon Glass @ 2020-11-06 18:50 UTC (permalink / raw)
  To: u-boot

On Fri, 6 Nov 2020 at 05:24, Harm Berntsen <harm.berntsen@nedap.com> wrote:
>
> The pci_mmc.c driver can generate ACPI info and therefore includes
> asm/acpi_table.h by proxy. This file does not exist for the ARM
> architecture and thus code compilation failed when using this
> driver on ARM.
>
> Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
> CC: Simon Glass <sjg@chromium.org>
> ---
> Changes for v2:
> Different approach, the previous commit (acpi: Only include asm header
> when available) used ifdefs to conditionally include acpi_table.h.
> Based on Simon's suggestion this patch adds an empty file to fix the
> issue.
>
>  arch/arm/include/asm/acpi_table.h | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/include/asm/acpi_table.h


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2 2/3] acpi: Add missing ARM acpi_table header
  2020-11-06 12:24   ` [PATCH v2 2/3] acpi: Add missing ARM acpi_table header Harm Berntsen
  2020-11-06 18:50     ` Simon Glass
@ 2021-01-19 13:03     ` Tom Rini
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2021-01-19 13:03 UTC (permalink / raw)
  To: u-boot

On Fri, Nov 06, 2020 at 12:24:17PM +0000, Harm Berntsen wrote:

> The pci_mmc.c driver can generate ACPI info and therefore includes
> asm/acpi_table.h by proxy. This file does not exist for the ARM
> architecture and thus code compilation failed when using this 
> driver on ARM.
> 
> Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
> CC: Simon Glass <sjg@chromium.org>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210119/19049256/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-19 13:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30  8:45 [PATCH 2/3] acpi: Only include asm header when available Harm Berntsen
2020-11-03 15:12 ` Simon Glass
2020-11-06 12:24   ` [PATCH v2 2/3] acpi: Add missing ARM acpi_table header Harm Berntsen
2020-11-06 18:50     ` Simon Glass
2021-01-19 13:03     ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.