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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CE99C433F5 for ; Mon, 18 Oct 2021 17:16:07 +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 8E41C61263 for ; Mon, 18 Oct 2021 17:16:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8E41C61263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de 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 513F880944; Mon, 18 Oct 2021 19:16:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de 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; secure) header.d=gmx.net header.i=@gmx.net header.b="KYOm0bNC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A929A81F0B; Mon, 18 Oct 2021 19:16:01 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A53A880215 for ; Mon, 18 Oct 2021 19:15:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1634577350; bh=gb1xswaok6x5TKIct6N7wYY+tu0pV/SPqBX54CYGClk=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=KYOm0bNCQk2C9QevSNmmlbTyoa/liPyYqqFZ7g2iLKsAuRpDNcnzdgesn69TjxaPW BAWs5n6wVweVQz3Ue9LyPqW7jdWa30hCLi5AhoYnCzVQHZFPdL2p3ZUyHA97NFO33H g+Bzrb5PjE0chvjLVOGVTXW+QFnsmVhDhT3BnnK0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.35] ([88.152.144.157]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MoO2E-1n4xBN3eHI-00orxf; Mon, 18 Oct 2021 19:15:49 +0200 Subject: Re: [PATCH v2 06/39] x86: Tidy up global_data pointer for 64-bit To: Simon Glass Cc: Bin Meng , Christian Melki , Tom Rini , Ilias Apalodimas , U-Boot Mailing List References: <20210925003055.759305-1-sjg@chromium.org> <20210924183029.v2.6.Ife4b48acc3243987c36decde1e5c405b3c3542b9@changeid> From: Heinrich Schuchardt Message-ID: <8347ccf7-25bf-bda0-4ab7-a9e029f3f058@gmx.de> Date: Mon, 18 Oct 2021 19:15:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20210924183029.v2.6.Ife4b48acc3243987c36decde1e5c405b3c3542b9@changeid> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:0eJ2+Zy/Ua6bAVa7N2/3LhCwQmRCcEJLyd3lXfqf2tD5lNiJvm6 Bx7LiW14wQoQaVwKSAbY/+xwkfZO/cCJcf3/9yXfQvBEhjb3EiR31r3M3pJG7mcx6/FNUdE MHo8I4W+6iXL/tUp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m9j8c4JYMD7VFR y9oJm4kQ3oozrVY+5laRInVxgcBnc7bLQXEcRUZ6g7y+Hfc1Bn6vzLZ2/Qv6NWu8GwUMwZRC6 gVB3krnbF4Yj/614dBS34/OVhp7FtU7mtAcXz4heSQRQxsTLkLjofY9Kc46vR+fExaJRIERDi oUfxB8M4hi0epo= 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 On 9/25/21 2:30 AM, Simon Glass wrote: > 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 > Reviewed-by: Heinrich Schuchardt > --- > > (no changes since v1) > > 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/g= lobal_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; You already have: arch/x86/include/asm/global_data.h:139: #define DECLARE_GLOBAL_DATA_PTR extern struct global_data *global_data_p= tr Why don't you use DECLARE_GLOBAL_DATA_PTR where needed? Best regards Heinrich > + > /* TODO(sjg@chromium.org): Consider using a fixed register for gd on x= 86_64 */ > #define gd global_data_ptr > >