diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2018-11-19 16:36:15 +1100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2018-11-22 23:37:07 +1100 |
commit | 11738cf01f150afae913b88fb68675a272803d63 (patch) | |
tree | f18346b27dc6206d3c81af2f4c3110492389cd5b /tests | |
parent | 86a288a7367086bb8dad60ea293811d62f59671b (diff) | |
download | dtc-11738cf01f150afae913b88fb68675a272803d63.zip dtc-11738cf01f150afae913b88fb68675a272803d63.tar.gz dtc-11738cf01f150afae913b88fb68675a272803d63.tar.bz2 |
libfdt: Don't use memcpy to handle unaligned reads on ARM
6dcb8ba4 "libfdt: Add helpers for accessing unaligned words" introduced
the fdt32_ld() and fdt64_ld() helpers for loading values from the FDT blob
which might not be naturally aligned. This matters for ARM, where
attempting a plain unaligned load will often cause an exception.
However, it seems the memcpy() we used here was surprisingly expensive,
making libfdt nearly 6x slower on at least some ARM platforms.
This patch takes an alternative approach, using a bunch of 1-byte loads
and shifts to implement the helpers.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions