From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
Aaron Williams <awilliams@marvell.com>,
Algapally Santosh Sagar <santoshsagar.algapally@amd.com>,
Anatolij Gustschin <agust@denx.de>, Andrew Davis <afd@ti.com>,
Aradhya Bhatia <a-bhatia1@ti.com>, Bin Meng <bmeng@tinylab.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
Devarsh Thakkar <devarsht@ti.com>,
Enrico Leto <enrico.leto@siemens.com>,
Fabio Estevam <festevam@gmail.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Huan Wang <alison.wang@nxp.com>, Ilko Iliev <iliev@ronetix.at>,
Ion Agorria <ion@agorria.com>,
Joao Marcos Costa <jmcosta944@gmail.com>,
Jonas Karlman <jonas@kwiboo.se>,
Kever Yang <kever.yang@rock-chips.com>,
MD Danish Anwar <danishanwar@ti.com>,
Mario Six <mario.six@gdsys.cc>,
Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
Michal Simek <michal.simek@amd.com>,
"NXP i.MX U-Boot Team" <uboot-imx@nxp.com>,
Nishanth Menon <nm@ti.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Peng Fan <peng.fan@nxp.com>,
Peter Robinson <pbrobinson@gmail.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Quentin Schulz <quentin.schulz@cherry.de>,
Sean Anderson <sean.anderson@seco.com>,
Shiji Yang <yangshiji66@outlook.com>,
Stefan Bosch <stefan_b@posteo.net>,
Stefano Babic <sbabic@denx.de>,
Svyatoslav Ryhel <clamor95@gmail.com>,
This contributor prefers not to receive mails
<noreply@example.com>, Troy Kisky <troykiskyboundary@gmail.com>,
Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>,
Wasim Khan <wasim.khan@nxp.com>
Subject: Re: [PATCH 00/35] global_data: Reduce size of struct global_data
Date: Wed, 24 Jul 2024 17:07:53 -0600 [thread overview]
Message-ID: <20240724230753.GS989285@bill-the-cat> (raw)
In-Reply-To: <20240724150922.2343249-1-sjg@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
On Wed, Jul 24, 2024 at 09:08:47AM -0600, Simon Glass wrote:
> The global data structure has grown quite a lot over the years, being
> the best place to put an important pointer or something that must be
> accessed before and after relocation.
>
> This series attempts to reduce the size a little, by moving some things
> out and shrinking and aligning some fields.
>
> Some fields are needed during init but not afterwards. To deal with this
> a new 'boardf' structure is created, which sits on the stack and is only
> present during board_init_f(). It is possible that more fields could
> move to this struct, but for now only 4 are moved.
>
> An assumption is made that an int is 32-bits wide on all architectures,
> which seems to be true, but maintainers should be able to confirm.
>
> Mostly the code-size impact is neutral, but the patch
> 'Use less space for environment fields' does increase U-Boot's size by
> about 30 bytes on aarch64.
>
> For firefly-rk3399 (64-bit) the size of global reduces from 456 to 368
> bytes. For SPL it reduces from 416 to 272 bytes.
>
> There are other things which could be attempted, for example:
> - Using hlist instead of list for some lists
> - Checking that only necessary fields are present in SPL
This is good, thanks for doing this. I'm planning to grab this in to
-next once I open it.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
next prev parent reply other threads:[~2024-07-25 1:43 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 15:08 [PATCH 00/35] global_data: Reduce size of struct global_data Simon Glass
2024-07-24 15:08 ` [PATCH 01/35] global_data: Move pci_clk to m68k and powerpc Simon Glass
2024-07-29 7:57 ` Acked Angelo Dureghello
2024-07-24 15:08 ` [PATCH 02/35] x86: Drop use of global_data fb_base Simon Glass
2024-07-24 15:08 ` [PATCH 03/35] video: Add a function to obtain the framebuffer address Simon Glass
2024-07-24 15:08 ` [PATCH 04/35] video: mxc: Avoid setting global_data fb_base Simon Glass
2024-07-24 15:08 ` [PATCH 05/35] video: mxs: " Simon Glass
2024-07-24 15:08 ` [PATCH 06/35] arm: friendlyarm: Avoid accessing " Simon Glass
2024-07-29 17:57 ` Stefan Bosch
2024-07-24 15:08 ` [PATCH 07/35] arm: ronetix: " Simon Glass
2024-07-24 15:08 ` [PATCH 08/35] zynqmp: Avoid setting the framebuffer address Simon Glass
2024-07-24 15:08 ` [PATCH 09/35] video: Avoid setting global_data fb_base from SPL handoff Simon Glass
2024-07-24 15:08 ` [PATCH 10/35] video: Avoid setting global_data fb_base in video setup Simon Glass
2024-07-24 15:08 ` [PATCH 11/35] global_data: Drop fb_base Simon Glass
2024-07-24 15:08 ` [PATCH 12/35] global_data: Convert have_console into a flag Simon Glass
2024-08-16 13:08 ` Sverdlin, Alexander
2024-08-29 14:05 ` Simon Glass
2024-08-29 14:28 ` Tom Rini
2024-08-29 15:01 ` Simon Glass
2024-07-24 15:09 ` [PATCH 13/35] global_data: Remove pci_ram_top Simon Glass
2024-07-24 15:09 ` [PATCH 14/35] global_data: Drop global_data hose Simon Glass
2024-07-24 15:09 ` [PATCH 15/35] global_data: Drop pci_bootdelay Simon Glass
2024-07-24 15:09 ` [PATCH 16/35] global_data: Use less space for environment fields Simon Glass
2024-07-24 15:09 ` [PATCH 17/35] board_f: Add a new struct to hold pre-relocation info Simon Glass
2024-07-24 15:09 ` [PATCH 18/35] board_f: Move fdt_size to board Simon Glass
2024-07-24 15:09 ` [PATCH 19/35] board_f: Move new_bootstage to boardf Simon Glass
2024-07-24 15:09 ` [PATCH 20/35] board_f: Move new_bloblist " Simon Glass
2024-07-24 15:09 ` [PATCH 21/35] global_data: Drop spl_handoff Simon Glass
2024-07-24 15:09 ` [PATCH 22/35] global_data: Collect common fields at the top Simon Glass
2024-07-24 15:09 ` [PATCH 23/35] global_data: Reduce the size of bus_clk and mem_clk Simon Glass
2024-07-24 15:09 ` [PATCH 24/35] global_data: Reduce the size of mon_len Simon Glass
2024-07-24 15:09 ` [PATCH 25/35] global_data: log: Reorder and shrink fields Simon Glass
2024-07-24 15:09 ` [PATCH 26/35] global_data: Reduce size of early-malloc vars Simon Glass
2024-07-24 15:09 ` [PATCH 27/35] global_data: Move baud_rate field lower Simon Glass
2024-07-24 15:09 ` [PATCH 28/35] global_data: Move env_addr field higher Simon Glass
2024-07-24 15:09 ` [PATCH 29/35] global_data: Put phys_addr fields near the top Simon Glass
2024-07-24 15:09 ` [PATCH 30/35] global_data: Move ulong fields together Simon Glass
2024-07-24 15:09 ` [PATCH 31/35] global_data: Move pointer members together Simon Glass
2024-07-24 15:09 ` [PATCH 32/35] global_data: Remove jump table in SPL Simon Glass
2024-07-24 15:09 ` [PATCH 33/35] global_data: Remove environment members if not used Simon Glass
2024-07-24 15:09 ` [PATCH 34/35] doc: Move generic-board documentation into rst Simon Glass
2024-07-24 15:09 ` [PATCH 35/35] doc: Add some guidelines about global data Simon Glass
2024-07-24 23:07 ` Tom Rini [this message]
2024-08-21 0:48 ` [PATCH 00/35] global_data: Reduce size of struct global_data 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=20240724230753.GS989285@bill-the-cat \
--to=trini@konsulko.com \
--cc=a-bhatia1@ti.com \
--cc=afd@ti.com \
--cc=agust@denx.de \
--cc=alison.wang@nxp.com \
--cc=awilliams@marvell.com \
--cc=bmeng@tinylab.org \
--cc=clamor95@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=danishanwar@ti.com \
--cc=devarsht@ti.com \
--cc=enrico.leto@siemens.com \
--cc=festevam@gmail.com \
--cc=iliev@ronetix.at \
--cc=ion@agorria.com \
--cc=jmcosta944@gmail.com \
--cc=jonas@kwiboo.se \
--cc=kever.yang@rock-chips.com \
--cc=mario.six@gdsys.cc \
--cc=matthias.schiffer@ew.tq-group.com \
--cc=michal.simek@amd.com \
--cc=nm@ti.com \
--cc=noreply@example.com \
--cc=patrice.chotard@foss.st.com \
--cc=pbrobinson@gmail.com \
--cc=peng.fan@nxp.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@cherry.de \
--cc=santoshsagar.algapally@amd.com \
--cc=sbabic@denx.de \
--cc=sean.anderson@seco.com \
--cc=sjg@chromium.org \
--cc=stefan_b@posteo.net \
--cc=troykiskyboundary@gmail.com \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.com \
--cc=venkatesh.abbarapu@amd.com \
--cc=wasim.khan@nxp.com \
--cc=xypron.glpk@gmx.de \
--cc=yangshiji66@outlook.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox