From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A7B9DC6FA8E for ; Fri, 24 Feb 2023 18:14:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6548985BE2; Fri, 24 Feb 2023 19:13:58 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="DprBkP7f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D538485B9C; Fri, 24 Feb 2023 19:12:03 +0100 (CET) Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2689385B84 for ; Fri, 24 Feb 2023 19:11:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troykiskyboundary@gmail.com Received: by mail-pj1-x1035.google.com with SMTP id z20-20020a17090a8b9400b002372d7f823eso3661834pjn.4 for ; Fri, 24 Feb 2023 10:11:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jHyjEZwxwgvkPp59YxEw3YGr6hiSCxbd5Is606DVZxc=; b=DprBkP7fcTMufTO2A4GEbqO6EuMS346x+uNAMjniZZU10WpYGrj/tTLZTRvLvH+x7G 32LEgUOgXz+FXH6Mr+cn/F7giPUzUQHtRJYweQVgtP7XWgk0P9tga5K0jTY7eGOzRqc6 Lbzdwc41KQ5uQCP/U3oQdEvbornrmKIDVNxIiDkjc7fcDaDGcguGbOKtOy6HXER67rnc a/wKVYxiNpKoBJNzt3E+pgwP9hI+jODT4LClC+aD4olB/hdUtdCxMLXc0kI/Jdji5EOW VoeCxQo926cTxuOTADv1aBNa/djxHRIHmXiWqo7rNKnramyxhlHX3AklJFIfpGbpgufL sbTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jHyjEZwxwgvkPp59YxEw3YGr6hiSCxbd5Is606DVZxc=; b=TCINHzxI3x7bIgsdZkt8TiF/cnoTgSPqEjhmBvJvDxeILt5hMWxL1kO/HWKZwp1Oei KfYZm+LW70DaEy9TzNn57kKK/zr9+r3vjGpuJiabgMasHmkjR5APq7+2oO12GE3WWI/k muvtW7dXP/XlOih2JLWnjAHz0+3/qDsrZviuW/e17VSlxi3HjqUQ4phAbWIoMuaZI+v3 THw/dMgeuDwfuwxBQBv8e3ZBbRKtMFZyCcrObv/h0AHsdiiequU0GgEMsqJam8rnXy+X VsskV9CNaL0/GXRTQckoYDk/yZGk+Kqo8O5PondBOqfiFEg7DRa6oqA9BpuVstCU65DC 6sOQ== X-Gm-Message-State: AO0yUKW/egSmhaVrH6JIKRNHwQzafBSMSWCUFICFKEIfovW+4HMK1FPE zODKvrXHsZ/U4Zww1oBUZsc= X-Google-Smtp-Source: AK7set8Hrqo8Ij07JPLG0s0QVZifYnKh7pu56Bm9v45TsbYreTmROZRoMNxOfypgvAbgCkTWB7V/4g== X-Received: by 2002:a17:902:f54f:b0:199:2ee:6238 with SMTP id h15-20020a170902f54f00b0019902ee6238mr22025430plf.16.1677262286694; Fri, 24 Feb 2023 10:11:26 -0800 (PST) Received: from OS2.boundarydevices.com. (wsip-184-189-120-117.oc.oc.cox.net. [184.189.120.117]) by smtp.gmail.com with ESMTPSA id o1-20020a170902bcc100b0019c922911a2sm7513957pls.40.2023.02.24.10.11.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:11:26 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , AKASHI Takahiro , Bin Meng , Heinrich Schuchardt , Jason Liu , Rasmus Villemoes , Stefan Roese Subject: [PATCH v2 22/26] x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI) Date: Fri, 24 Feb 2023 10:10:43 -0800 Message-Id: <20230224181047.2775829-23-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224181047.2775829-1-troykiskyboundary@gmail.com> References: <20230224181047.2775829-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean This avoids an error when ifdef CONFIG_PCI is changed to if CONFIG_IS_ENABLED(PCI) Signed-off-by: Troy Kisky --- Changes in v2: - use an accessor function gd_set_pci_ram_top arch/x86/cpu/i386/cpu.c | 2 +- include/asm-generic/global_data.h | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index c7f6c5a013e..068670dfc41 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -415,7 +415,7 @@ 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) { - gd->pci_ram_top = 0x80000000U; + gd_set_pci_ram_top(0x80000000U); } static void setup_mtrr(void) diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 987fb66c17a..952e17b2c13 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -560,6 +560,12 @@ static_assert(sizeof(struct global_data) == GD_SIZE); #define gd_event_state() NULL #endif +#if CONFIG_IS_ENABLED(PCI) +#define gd_set_pci_ram_top(val) gd->pci_ram_top = val +#else +#define gd_set_pci_ram_top(val) +#endif + /** * enum gd_flags - global data flags * -- 2.34.1