[PATCH v1 20/24] x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI)

Simon Glass sjg at chromium.org
Wed Feb 22 22:20:03 CET 2023


Hi Troy,

On Tue, 21 Feb 2023 at 18:39, Troy Kisky <troykiskyboundary at gmail.com> wrote:
>
> This avoids an error when ifdef CONFIG_PCI is changed to
> if CONFIG_IS_ENABLED(PCI)
>
> Signed-off-by: Troy Kisky <troykiskyboundary at gmail.com>
> ---
>
>  arch/x86/cpu/i386/cpu.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c
> index c7f6c5a013e..07a73f79768 100644
> --- a/arch/x86/cpu/i386/cpu.c
> +++ b/arch/x86/cpu/i386/cpu.c
> @@ -415,7 +415,9 @@ int cpu_phys_address_size(void)
>  /* Don't allow PCI region 3 to use memory in the 2-4GB memory hole */
>  static void setup_pci_ram_top(void)
>  {
> +#if CONFIG_IS_ENABLED(PCI)
>         gd->pci_ram_top = 0x80000000U;
> +#endif

Can you add an accessor in the header file, so this can be:

if (CONFIG_IS_ENABLED(PCI))
   gd_set_pci_ram_top(0x80000000U);



>  }
>
>  static void setup_mtrr(void)
> --
> 2.34.1
>


More information about the U-Boot mailing list