Re: [PATCH] global_data: Only include driver model fields when DM is enabled

Simon Glass <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAFLszTgSs8s_hFtyEFq6D0zhPKmaEQ2+gE=mqAGiR3OVTLqxyw@mail.gmail.com>
On 2026-08-10T20:48:28, Jonas Karlman <[email protected]> wrote:
> global_data: Only include driver model fields when DM is enabled
>
> The struct list_head dmtag_list, struct udevice *dm_root, struct
> list_head uclass_root_s and struct list_head *uclass_root fields in
> struct global_data takes up 24/48 bytes of memory on ARMv7/AArch64.
> However, these fields are only used when $(PHASE_)DM is enabled.
>
> Guard driver model related fields using CONFIG_IS_ENABLED(DM) to save
> memory space when U-Boot proper is built with DM=y and xPL is built
> without xPL_DM.
>
> Signed-off-by: Jonas Karlman <[email protected]>
> Reviewed-by: Tom Rini <[email protected]>
>
> include/asm-generic/global_data.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Simon Glass <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.