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 X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ECDFEC433EF for ; Wed, 8 Sep 2021 13:34:57 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 61A376120F for ; Wed, 8 Sep 2021 13:34:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 61A376120F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F3BB58337C; Wed, 8 Sep 2021 15:34:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="NkNDuEna"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4882B8339D; Wed, 8 Sep 2021 15:34:35 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (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 61CCB83377 for ; Wed, 8 Sep 2021 15:34:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-wm1-x32d.google.com with SMTP id 196-20020a1c04cd000000b002fa489ffe1fso1189681wme.4 for ; Wed, 08 Sep 2021 06:34:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PbQRI7RJNepk4Y404Txj77IiHgVZT6hDitJS3N+I1kU=; b=NkNDuEnaFIXK9tRmTgf9yeYtr/lB7CJGYT+e4E36nXMyZg5wj0x0GwW+QG4xry/O+k 557V08vTeWZSPBfkDN4pP5iywbKyfMKczSXinnLCNebYJSeN/3+pTtj2abX0Wixeuf6u NoE16KPJ93s12H4MTB2eDLmpkNEPKJVzEuxRM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PbQRI7RJNepk4Y404Txj77IiHgVZT6hDitJS3N+I1kU=; b=tYPs1PVVyF1lTr/rC9p7Re7YnWaAZYaZfvdTfnYBdhTPV1laxumiuEipYpU6vSLZLc Yundf9aJetzFuMpLyapeUyvPZKsC0cAuLSqu6n3086IwstsTy0udBME9nmI6HT8rkxK3 zsoQEsYC+csQl5NEJSY3InoLLgsZEw399Qzuz/YPbyxEdaCHbr8Uqv27ON3ef5EQiXfb PvcMZXgkOt+C6t1N2eYNa2nCPj4BaiUu2RYxRzBdcEKJvL925OnZ5/zbEwVKY8uqjsQi TjmG7o6xzD2zHJ5Q+xtPbRkqKyOVknc+NYQ6e2vUF11JRoXJj4kbmbJfme7mAj8+Ff7d Xipg== X-Gm-Message-State: AOAM530CcQgC72PnSVgc07451blLNxUn01hlcHWsQ+kAEVUjcoW8omyH gVEeMjXC+EVXPG7GURdxQI/iS6+XG7LKcmeH X-Google-Smtp-Source: ABdhPJziyep6N9bmGHlhLlp0HDLaj8UfhlpNTz/RhFGCLUKaUv5w+f7DpGodIxMAVBi2QvexdBqsnA== X-Received: by 2002:a7b:c4cb:: with SMTP id g11mr3664152wmk.80.1631108066641; Wed, 08 Sep 2021 06:34:26 -0700 (PDT) Received: from sjg1.roam.corp.google.com (82-69-54-180.dsl.in-addr.zen.co.uk. [82.69.54.180]) by smtp.gmail.com with ESMTPSA id l2sm2209065wmi.1.2021.09.08.06.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:34:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Heinrich Schuchardt , Bin Meng , Tom Rini , Christian Melki , Simon Glass Subject: [PATCH 04/35] x86: Tidy up global_data pointer for 64-bit Date: Wed, 8 Sep 2021 07:33:34 -0600 Message-Id: <20210908073355.4.Ife4b48acc3243987c36decde1e5c405b3c3542b9@changeid> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog In-Reply-To: <20210908133405.696481-1-sjg@chromium.org> References: <20210908133405.696481-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Add an extern declaration so that it is possible to use this macro in files other than the one that defines it. Signed-off-by: Simon Glass --- arch/x86/cpu/x86_64/cpu.c | 3 +++ arch/x86/include/asm/global_data.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c index 90a766c3c57..e090b1b478a 100644 --- a/arch/x86/cpu/x86_64/cpu.c +++ b/arch/x86/cpu/x86_64/cpu.c @@ -8,6 +8,9 @@ #include #include #include +#include + +DECLARE_GLOBAL_DATA_PTR; /* * Global declaration of gd. diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h index 3e4044593c8..f95fb5a1931 100644 --- a/arch/x86/include/asm/global_data.h +++ b/arch/x86/include/asm/global_data.h @@ -133,6 +133,8 @@ struct arch_global_data { #ifndef __ASSEMBLY__ # if defined(CONFIG_EFI_APP) || CONFIG_IS_ENABLED(X86_64) +extern struct global_data *global_data_ptr; + /* TODO(sjg@chromium.org): Consider using a fixed register for gd on x86_64 */ #define gd global_data_ptr -- 2.33.0.153.gba50c8fa24-goog