u-boot/include/dm
Simon Glass cdd73e7215 dm: core: Deal with a wrinkle with linker lists
When every member of a linker list is aligned by the compiler, we can no
longer rely on the sizeof of the struct to determine the number of
entries.

For example, if the struct size is 0x90 but every entry is aligned to 0xa0
by the compiler, the linker list entries takes more space in memory and
the calculation of the number of entries is incorrect. For example, we may
see 0x12 entries when there are only 0x11.

This is a real problem. There may be a general solution, although I cannot
currently think of one. So far it only bites with OF_PLATDATA_RT which
creates a pointer to each entry of the 'struct udevice' linker_list. This
does not happen without that option, so it only affects SPL.

Work around it by manually calculating the aligned size of struct udevice,
then using that for the n_ent calculation.

Note: the alignment fix to linker list was here:

   0b2fa98aa5 linker_lists: Fix alignment issue

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-18 17:53:56 -04:00
..
platform_data WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
acpi.h acpi: Collect tables in the acpi_item list 2022-01-25 11:44:36 -07:00
device-internal.h dm: core: Allow devres to be disabled in SPL 2022-04-18 17:53:56 -04:00
device.h dm: core: Deal with a wrinkle with linker lists 2022-04-18 17:53:56 -04:00
device_compat.h dm: Don't undefine dev_xxx macros 2020-10-16 09:44:27 -04:00
devres.h dm: core: Allow devres to be disabled in SPL 2022-04-18 17:53:56 -04:00
fdtaddr.h doc: add include/dm/fdtaddr.h to the HTML documentation 2022-01-15 10:57:21 +01:00
lists.h doc: add include/dm/lists.h to the HTML documentation 2022-01-15 10:57:21 +01:00
of.h doc: add include/dm/of*.h to the HTML documentation 2022-01-15 10:57:21 +01:00
of_access.h doc: add include/dm/of*.h to the HTML documentation 2022-01-15 10:57:21 +01:00
of_addr.h doc: add include/dm/of*.h to the HTML documentation 2022-01-15 10:57:21 +01:00
of_extra.h doc: add include/dm/of*.h to the HTML documentation 2022-01-15 10:57:21 +01:00
ofnode.h Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net 2022-04-15 08:10:32 -04:00
pci.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
pinctrl.h pinctrl: Increase length of pinmux status buffer 2022-03-14 15:23:26 +01:00
platdata.h doc: add include/dm/platdata.h to the HTML documentation 2022-01-15 10:57:21 +01:00
read.h treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTERFACE_MODE_NA 2022-04-10 08:44:13 +03:00
root.h doc: add include/dm/root.h to the HTML documentation 2022-01-15 10:57:21 +01:00
simple_bus.h dm: core: Correctly read <ranges> of simple-bus 2021-04-15 14:22:17 +05:30
tag.h dm: add tag support 2022-04-09 21:06:31 +02:00
test.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
uclass-id.h efi: Add uclass for devices provided by UEFI firmware 2021-12-09 11:43:25 -08:00
uclass-internal.h dm: core: Tidy up comments in uclass headers 2022-04-06 14:03:17 -04:00
uclass.h dm: core: Tidy up comments in uclass headers 2022-04-06 14:03:17 -04:00
util.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00