diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2016-06-16 21:02:54 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2016-10-05 17:02:56 -0300 |
commit | b21d979625d701fff6fc753d28943146b4140edd (patch) | |
tree | 1533d7f316c86ff76651b3536860d5fd6b025577 /drivers/of | |
parent | 67bebf9706ba92394e1619dbcc63917a3dc3bae5 (diff) |
of: Allow NXP 4.1 kernel to allocate memory on 2GiB RAM boards
On imx6 boards with 2GiB of RAM we have several allocation errors due to
low available vmalloc size such as:
DMA: failed to allocate 100 KiB pool for atomic coherent allocation
imx-sdma: probe of 20ec000.sdma failed with error -12
fec: probe of 2188000.ethernet failed with error -12
This problem does not happen with the original 4.1.15_GA release, but
starting in 4.1.22 with commit 444cf5487d5f51a ("of: alloc anywhere
from memblock if range not specified") such boards fail to allocate memory.
There is no issue with 444cf5487d5f51a ("of: alloc anywhere from memblock
if range not specified") itself, but it is incompatible with the way
NXP kernel uses to allocate memory.
To be on the conservative side, let's simply revert such commmit while an
official fix comes from NXP when they upgrade their 4.1 kernel to something
newer than 4.1.22.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/of_reserved_mem.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index be4f65c1edde..56c23eed9daa 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -31,13 +31,11 @@ int __init __weak early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap, phys_addr_t *res_base) { - phys_addr_t base; /* * We use __memblock_alloc_base() because memblock_alloc_base() * panic()s on allocation failure. */ - end = !end ? MEMBLOCK_ALLOC_ANYWHERE : end; - base = __memblock_alloc_base(size, align, end); + phys_addr_t base = __memblock_alloc_base(size, align, end); if (!base) return -ENOMEM; |