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 C087BC6FD1C for ; Mon, 13 Mar 2023 21:36:56 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A9E35861B0; Mon, 13 Mar 2023 22:33:16 +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="AQZB6M0H"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F0F7485E3E; Mon, 13 Mar 2023 22:32:30 +0100 (CET) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (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 9B25D86160 for ; Mon, 13 Mar 2023 22:32:16 +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-x102a.google.com with SMTP id fy10-20020a17090b020a00b0023b4bcf0727so5636300pjb.0 for ; Mon, 13 Mar 2023 14:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743136; 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=+kW/8sHDO9k2GgJQV5YSUgnhQtPtA1pVFx/sg5qeqrM=; b=AQZB6M0H/XlKJEQwA9iVUBQyD5r56iKOI0eyBgsnhkFw9zdj8A8am4/1yDAd5bl7BB RGo0QL0pJM/yE3MOAbel126F6tz8UoEelB4TrbwND9d9eT+oh80Avjm3hFqETG6Bki4H AK37r9aKVHCoQfkvkayi+x8X+Tnfm0RwW0+C/86/Wa2DAd8rObcHnyZf4AyGmLysox4U Q+YFOg0pzHer0SrJTxytLDbAGbet27szz+e70fkUfo6jHPfMK12nQF2D3dLcnz0xmvkQ qI5hg+PmSXiOIkzduJcNkrh3YuwBg/WVPY61eDBrH1Fc4PaDekD12EVKuY4PzO0FCur2 ipfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743136; 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=+kW/8sHDO9k2GgJQV5YSUgnhQtPtA1pVFx/sg5qeqrM=; b=3DRTeK19TS0PwAoy5rsOtdXwvy5TcBFlCMsRD9i9H3mTau9FFWgXC918RyvipOj2fI AQaLj1Xa/RiueK6+4OFHAI+6D6HnnVuIYW4owwr0qjgTqb1uYgnIjeWnXVvr0Eb4AGYc MdlDyFZ5ew8CZIIw7G5cv9w3R4Az1ljJ6NuL30FS2Rw5yXgjWJ09Cx5EPHXDoohVTLw5 uDjRKjeX9j2UE4pzrqE7byQiBwbHFuQppOHTTQdXg2K7ZUAcQ7jgny5ahf5C98t5QcOK FgyGprIBqctRSiQyprjyDN0wAvJC1mcHgj6X7M1NG+AwQk1/vlWHrLWL5+YZicjO4btR x/Lg== X-Gm-Message-State: AO0yUKXziL/DK96EB/BJ//JL7iuDuA+19BJfJRrcNm6VDG8/+uKHj1iY 2idxMZB2PBRW+XQ+e7x4PJE= X-Google-Smtp-Source: AK7set87qVLbtbpAz0lORfxN1POzBe8Jao58uLaOVksc6dg9DMK+j2QtKgRXF2V8E80yU55vv2Zj9A== X-Received: by 2002:a05:6a20:8416:b0:b8:499d:7c9b with SMTP id c22-20020a056a20841600b000b8499d7c9bmr43755189pzd.51.1678743136168; Mon, 13 Mar 2023 14:32:16 -0700 (PDT) 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 s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.32.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:32:15 -0700 (PDT) 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 , Rasmus Villemoes , Stefan Roese Subject: [PATCH v3 21/23] x86: cpu: i386: cpu: only set pci_ram_top if CONFIG_IS_ENABLED(PCI) Date: Mon, 13 Mar 2023 14:31:43 -0700 Message-Id: <20230313213146.1775650-22-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-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.8 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 --- (no changes since v2) 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