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

Troy Kisky
2023-02-22T01:43:21Z

This avoids an error when ifdef CONFIG_PCI is changed to
if CONFIG_IS_ENABLED(PCI)

Signed-off-by: Troy Kisky <troykiskyboundary@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
}

static void setup_mtrr(void)
--
2.34.1