[PATCH v3 3/4] x86: Avoid #ifdef with CONFIG_HAVE_ACPI_RESUME

Bin Meng bmeng.cn at gmail.com
Mon Jul 13 04:17:08 CEST 2020


On Fri, Jul 10, 2020 at 8:43 AM Simon Glass <sjg at chromium.org> wrote:
>
> At present this enables a few arch-specific members of the global_data
> struct which are otherwise not part of the struct. As a result we have to
> use #ifdef in various places.
>
> The cost of always having these in the struct is small. Adjust things so
> that we can use compile-time code instead of #ifdefs.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v2)
>
> Changes in v2:
> - Use new three-argument CONFIG_IS_ENABLED() instead
>
>  arch/x86/cpu/apollolake/cpu_spl.c    | 13 +++++-----
>  arch/x86/cpu/apollolake/fsp_s.c      | 10 ++++----
>  arch/x86/cpu/baytrail/acpi.c         |  2 --
>  arch/x86/cpu/broadwell/power_state.c |  5 ++--
>  arch/x86/cpu/cpu.c                   | 38 ++++++++++++++--------------
>  arch/x86/include/asm/global_data.h   |  2 --
>  arch/x86/lib/coreboot_table.c        |  6 ++---
>  arch/x86/lib/fsp/fsp_common.c        |  2 --
>  arch/x86/lib/fsp/fsp_dram.c          | 26 +++++++++++--------
>  arch/x86/lib/fsp1/fsp_common.c       | 16 +++++++-----
>  arch/x86/lib/fsp2/fsp_dram.c         |  7 +++--
>  11 files changed, 63 insertions(+), 64 deletions(-)
>

applied to u-boot-x86, thanks!


More information about the U-Boot mailing list