[PATCH v3 02/30] acpi: x86: Write FADT in common code

Simon Glass sjg at chromium.org
Thu Sep 12 02:58:15 CEST 2024


Hi Patrick,

On Wed, 11 Sept 2024 at 00:25, Patrick Rudolph
<patrick.rudolph at 9elements.com> wrote:
>
> From: Maximilian Brune <maximilian.brune at 9elements.com>
>
> Write the FADT in common code since it's used on all architectures.
> Let the cpu code fill out the FADT body by introducing a new weak
> function acpi_fill_fadt().
>
> Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> ---
>  arch/x86/cpu/apollolake/acpi.c    | 20 +++------------
>  arch/x86/cpu/baytrail/acpi.c      | 17 +------------
>  arch/x86/cpu/quark/acpi.c         | 19 +-------------
>  arch/x86/cpu/tangier/acpi.c       | 25 ++----------------
>  arch/x86/include/asm/acpi_table.h | 12 ---------
>  arch/x86/lib/acpi_table.c         | 23 -----------------
>  include/acpi/acpi_table.h         |  9 +++++++
>  lib/acpi/acpi_table.c             | 42 +++++++++++++++++++++++++++++++
>  8 files changed, 59 insertions(+), 108 deletions(-)

This seems the wrong way around to me. We should not need weak functions.

The ACPI_WRITER() should be in each file, then each function should
call your common function.

Regards,
Simon


More information about the U-Boot mailing list