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 90FB6C6FA82 for ; Mon, 12 Sep 2022 16:30:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 04BAA84B75; Mon, 12 Sep 2022 18:30:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="Ub7ihWnt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7EB6784A8B; Mon, 12 Sep 2022 18:30:26 +0200 (CEST) Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) (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 A2254845FE for ; Mon, 12 Sep 2022 18:30:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x832.google.com with SMTP id g23so2056996qtu.2 for ; Mon, 12 Sep 2022 09:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=GRsH6PQKFyD3OIRrNCgauK/n1wvqhq1cr6rXjDgv1EU=; b=Ub7ihWntZkNkShIUMB7QpYSrVg8F2/YYlm+4PFGhJDGVFZ0ocA4U3+J8T1dP5PEZ25 cx82L2I9rvW6qqBUYNf0DLbFrHN+p4xcAvNDKtlU4R9HndjPp42O/v3MgOZGfPDD4Y6f 1kTFNjMBU9FWiInomWDOc2JYQqJzij8GOd42s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=GRsH6PQKFyD3OIRrNCgauK/n1wvqhq1cr6rXjDgv1EU=; b=HkCyXnVrumW2WWwb6Do8kPXFplldHb+EXfuJ4XlHNlIxwa4m/ojvvgy8PZP5MxVJBD MDeafgo+aM5kKvDiN/hwx91XmxeUU/JkdnF0sFEjRiqyc+u8H2tXJxcBEqlaOnSqthVY r9MvPo9rxLDdLfCI1tafYHjXGqKdCkOX6GEo5CmP5/50DSDHBtGI0SFw8O9FuxKH2SJP XQ+QyiXV7YVH2+RcHU+nTJlNzeNV7qPAYqmxpUBs/YHJebWO6fgr5/9WIQWb/JZ/uW7B /Ehv2N9hmNnKOSUM+JchjrCGiWstNQZ56wLkIllyOM0e89r962KgBNdA/GzshKYdGbjL +IuA== X-Gm-Message-State: ACgBeo3ynSNnVWQOwHGH5stosDuLBvMRGBeN+U4k9+XFaqdLOPiMZkKr 6RVjzHan/L49PfwSRFuql35XEQ== X-Google-Smtp-Source: AA6agR5yjeSBHwA0j4eu8KJODvSoWROIgwKO9Zg4mI/EWKiFeFDMFwFLfOIFd+w414JGhd5tuoRZuA== X-Received: by 2002:a05:622a:199c:b0:344:7645:9ba1 with SMTP id u28-20020a05622a199c00b0034476459ba1mr24384200qtc.629.1663000222390; Mon, 12 Sep 2022 09:30:22 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-3dda-d089-edd0-5569.res6.spectrum.com. [2603:6081:7b00:6400:3dda:d089:edd0:5569]) by smtp.gmail.com with ESMTPSA id b12-20020ac8754c000000b0031f287f58b4sm6675693qtr.51.2022.09.12.09.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Sep 2022 09:30:21 -0700 (PDT) Date: Mon, 12 Sep 2022 12:30:20 -0400 From: Tom Rini To: Wolfgang Denk Cc: Ovidiu Panait , u-boot@lists.denx.de, Holger Brunck , Marek Vasut , Michal Simek , Rick Chen , Simon Glass Subject: Re: [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code Message-ID: <20220912163020.GC6993@bill-the-cat> References: <20220911161052.2986264-1-ovpanait@gmail.com> <1053909.1662974573@gemini.denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <1053909.1662974573@gemini.denx.de> X-Clacks-Overhead: GNU Terry Pratchett 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 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 12, 2022 at 11:22:53AM +0200, Wolfgang Denk wrote: > Dear Ovidiu, >=20 > In message <20220911161052.2986264-1-ovpanait@gmail.com> you wrote: > > The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanent= ly > > commented out, so there are no users for this macro: > > #if 1 > > #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("= r2") > > #else > > #define XTRN_DECLARE_GLOBAL_DATA_PTR extern > > #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \ > > gd_t *gd > > #endif > > > > Remove all references. >=20 > Actually the commented out code contained some information, and I > feel it would be a pity if that got lost: >=20 > > -#if 1 > > #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r= 2") > > -#else /* We could use plain global data, but the resulting code is big= ger */ > > -#define XTRN_DECLARE_GLOBAL_DATA_PTR extern > > -#define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \ > > - gd_t *gd > > -#endif >=20 > Maybe we can keep the information that using global data for the GD > pointer would be possible too (and simpler, as it does not require > the reservation of a specific register for it), but that the > implementation uses a register nevertheless because this results in > smaller code? >=20 > Maybe add such a comment instead ? >=20 This is slightly mentioned in doc/develop/global_data.rst currently, but a follow-up to expand on this would be good. --=20 Tom --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmMfXpgACgkQFHw5/5Y0 tyykuQv/S8DwQLui3Oa1hP/ZF+D9St0aW4uz6tZZsNKyIWYuH5kRv8HeTlEXcp3B r+ydax8f0cNY9lAt1/8G2KFmq1F256DxtmkiQgnDtqVaC/H/OzxXO0wIfwVfyzUi 5dWSf0kTz+g/wsh0pZef76yrerQdb/Oeo9Rro40cLiy8VFj1tTLtyDcpAnxi9FSX G7Juywhpmk/DqhYq4wanhFgEBtwyLDsQxeyu7TJJkbAMTfUsX+pTuIfmcjxXgG6U YcGg1HtZ5+fYskpQcKZEmV/BW8j+5D8TEZlWypVKdsASL24bWvy9OOdxDhEeaQRe p1MGazF14Bj3U9EoqGd3AdwWNho9r+K2CJQBKoeIcLnPTfYL52TJuL4tLSaOqumu 4ySeyLnlbySc65Vh/wXW2tGmyMfF2LcmunYc437duCfVOxnTD3gDHPrex5kP/Dbb 2UOdyYRlcWRdKwKxIodml2OquA4HXPtg9nbgM81+d5fJwnO/FfzyqE34vJ5x8XPp R3T6wxPl =t1XC -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7--