From: Wolfgang Denk <wd@denx.de>
To: Ovidiu Panait <ovpanait@gmail.com>
Cc: u-boot@lists.denx.de,
Holger Brunck <holger.brunck@hitachienergy.com>,
Marek Vasut <marex@denx.de>, Michal Simek <michal.simek@amd.com>,
Rick Chen <rick@andestech.com>, Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code
Date: Mon, 12 Sep 2022 11:22:53 +0200 [thread overview]
Message-ID: <1053909.1662974573@gemini.denx.de> (raw)
In-Reply-To: <20220911161052.2986264-1-ovpanait@gmail.com>
Dear Ovidiu,
In message <20220911161052.2986264-1-ovpanait@gmail.com> you wrote:
> The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanently
> 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.
Actually the commented out code contained some information, and I
feel it would be a pity if that got lost:
> -#if 1
> #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
> -#else /* We could use plain global data, but the resulting code is bigger */
> -#define XTRN_DECLARE_GLOBAL_DATA_PTR extern
> -#define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \
> - gd_t *gd
> -#endif
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?
Maybe add such a comment instead ?
Thanks!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr. 5, 82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
All repairs tend to destroy the structure, to increase the entropy
and disorder of the system. Less and less effort is spent on fixing
original design flaws; more and more is spent on fixing flaws intro-
duced by earlier fixes. - Fred Brooks, "The Mythical Man Month"
next prev parent reply other threads:[~2022-09-12 9:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-11 16:10 [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code Ovidiu Panait
2022-09-11 16:10 ` [PATCH 2/4] common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.c Ovidiu Panait
2022-09-12 13:34 ` Simon Glass
2022-09-11 16:10 ` [PATCH 3/4] common/board_f: introduce arch_setup_dest_addr() Ovidiu Panait
2022-09-12 13:34 ` Simon Glass
2022-09-11 16:10 ` [PATCH 4/4] common/board_f: drop ifdefs around header includes Ovidiu Panait
2022-09-12 13:34 ` Simon Glass
2022-09-12 9:22 ` Wolfgang Denk [this message]
2022-09-12 16:30 ` [PATCH 1/4] common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead code Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1053909.1662974573@gemini.denx.de \
--to=wd@denx.de \
--cc=holger.brunck@hitachienergy.com \
--cc=marex@denx.de \
--cc=michal.simek@amd.com \
--cc=ovpanait@gmail.com \
--cc=rick@andestech.com \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.