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 06AF5C433EF for ; Tue, 26 Oct 2021 03:29:45 +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 2432060FD7 for ; Tue, 26 Oct 2021 03:29:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2432060FD7 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 4F908834F4; Tue, 26 Oct 2021 05:29: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="FVIEUEcH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5062E834F4; Tue, 26 Oct 2021 05:29:39 +0200 (CEST) Received: from mail-vk1-xa29.google.com (mail-vk1-xa29.google.com [IPv6:2607:f8b0:4864:20::a29]) (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 87AF480F3B for ; Tue, 26 Oct 2021 05:29:35 +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@google.com Received: by mail-vk1-xa29.google.com with SMTP id j12so6263516vka.4 for ; Mon, 25 Oct 2021 20:29:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BI6aCwBgQh7KwA2IF2SDmukdzkdglp5oUUYoqumUXeU=; b=FVIEUEcHyJoxv9Bo24S3IZZTwMyyp1Mkq+cVAfCcLuVWIps/iU9Ur/6UPZ7u7Px41y VaVMhg5YyoDxIgy5V3B4HREwTDJYe8R/NFpa45pudLpkYbTFKJhlzWIeRGcyTGI42V19 60aKBeQuTTEdp0R0CDiD08eWTlKZ7twmFWEP0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BI6aCwBgQh7KwA2IF2SDmukdzkdglp5oUUYoqumUXeU=; b=3hM43z3LUYnt2wB6XD3iG+99JZqkkIsHzLcVbqMFaraIhD+8bE1SRklHF1WTGnqSdj RkEpT9ICEBlE6qSt4XqaI7tHlXW1Ow/sZvzz1vMwM960fQJw9w6/OyMlPTjLUQRP8TqO //cPCHzoPI/Gu77p6wbGUwgokbov5BQ+Zr3BIvxuM63QgTTsAFLp2x9ZiVA1RAHVSddx eGnxNlc5LAMDc76szkAwqWPkmkrAdJfreeqyiXusKSY/CbW58x4QFr4UiPKXA/7QWSjg QoInQELAKQtmXkNGFjdWRvAYTg3GGOfcVAvbiyPR7LiDRWjD68gKl3YYy66t5CtbfP3K gCGw== X-Gm-Message-State: AOAM5331F0qWyKSCenaCj420IFwqwIFLZMTTMvfv/ksrWff/VnucpGeX HR6Q+jB/7CC5hZxLQrGqn21xXXYlQDYzGZuFJArRsleoKx0= X-Google-Smtp-Source: ABdhPJxMjdFEGAT4K0Kg3l14qj1CHPgctU8xjxrj2huf7vdQpLlXmklJ9DPcz0mPUg6yB3oKjBLcvxGxvFW2ODGG2tE= X-Received: by 2002:a05:6122:1212:: with SMTP id v18mr9178041vkc.9.1635218973974; Mon, 25 Oct 2021 20:29:33 -0700 (PDT) MIME-Version: 1.0 References: <20210925003055.759305-1-sjg@chromium.org> <20210924183029.v2.6.Ife4b48acc3243987c36decde1e5c405b3c3542b9@changeid> <8347ccf7-25bf-bda0-4ab7-a9e029f3f058@gmx.de> In-Reply-To: <8347ccf7-25bf-bda0-4ab7-a9e029f3f058@gmx.de> From: Simon Glass Date: Mon, 25 Oct 2021 21:29:22 -0600 Message-ID: Subject: Re: [PATCH v2 06/39] x86: Tidy up global_data pointer for 64-bit To: Heinrich Schuchardt Cc: Bin Meng , Christian Melki , Tom Rini , Ilias Apalodimas , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" 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 Hi Heinrich, On Mon, 18 Oct 2021 at 11:15, Heinrich Schuchardt wrote: > > 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/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; > > You already have: > arch/x86/include/asm/global_data.h:139: > #define DECLARE_GLOBAL_DATA_PTR extern struct global_data *global_data_ptr > > Why don't you use DECLARE_GLOBAL_DATA_PTR where needed? I have no idea what I was thinking or how I got into this state. But anyway, I don't think we need this patch. Thanks for catching it. Regards, Simon