On Tue, 22 Oct 2019 at 02:05, Jean-Jacques Hiblot <jjhib...@ti.com> wrote: > > The FDT specification [0] gives a requirement of aligning properties on > 32-bits. Make sure that the compiler is aware of this constraint when > accessing 64-bits properties. > > [0]: > https://github.com/devicetree-org/devicetree-specification/blob/master/source/flattened-format.rst > > Signed-off-by: Jean-Jacques Hiblot <jjhib...@ti.com> > --- > > Here is a portion of the disassembly of ofnode_read_u64(). It show the effect > of the patch on ARM64. > > with the classic fdt64_t type. GCC emits LDR (load register) > 34: 54000109 b.ls 54 <ofnode_read_u64+0x54> // b.plast > 38: f9400000 ldr x0, [x0] > 3c: dac00c00 rev x0, x0 > > with the unaligned_fdt64_t type. GCC emits LDP (Load Pair of registers) > 34: 54000129 b.ls 58 <ofnode_read_u64+0x58> // b.plast > 38: 29400001 ldp w1, w0, [x0] > 3c: aa008020 orr x0, x1, x0, lsl #32 > 40: dac00c00 rev x0, x0 > > > common/fdt_support.c | 2 +- > drivers/core/ofnode.c | 2 +- > include/linux/libfdt_env.h | 1 + > lib/fdtdec.c | 2 +- > 4 files changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <s...@chromium.org> No change log? _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot