]> git.baikalelectronics.ru Git - uboot.git/commit
arm: socfpga: gen5: fix ERR_PTR_OFFSET
authorSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Tue, 22 Oct 2019 19:29:48 +0000 (21:29 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 7 Nov 2019 23:01:13 +0000 (18:01 -0500)
commit422399c98f7672a764eaccc88f92898b414668bb
tree8dda319d5d5d8f01353a3d5c43ce8aa364dd03f4
parent1437a922457f673f376381f7f9cc2c75a52f0250
arm: socfpga: gen5: fix ERR_PTR_OFFSET

The default implementation of ERR_PTR/PTR_ERR maps errno values at the
and of the address range (e.g. -EINVAL/-22 gets 0xFFFFFFEA).

For socfpga gen5 SPL, this doesn't really work, as the heap is nearly
at the end of the 32 bit address range.

This patch adjusts the ERR_PTR_OFFSET to map errno values into the range
of the Boot ROM, which should not be used for valid pointers.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
arch/arm/mach-socfpga/Kconfig