From: 黄涛 Date: Thu, 1 Aug 2013 12:44:13 +0000 (+0800) Subject: rk: mem_reserve: fix reserved_base_end when meminfo split by kernel X-Git-Tag: firefly_0821_release~6787 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0653d1650cb681ba27f89cfe279a12564b843c91;p=firefly-linux-kernel-4.4.55.git rk: mem_reserve: fix reserved_base_end when meminfo split by kernel commit again, should with commit: block: initialize the bounce pool if high memory may be added later --- diff --git a/arch/arm/plat-rk/mem_reserve.c b/arch/arm/plat-rk/mem_reserve.c index 4806d7954e65..3e8b50e89d00 100644 --- a/arch/arm/plat-rk/mem_reserve.c +++ b/arch/arm/plat-rk/mem_reserve.c @@ -14,7 +14,7 @@ phys_addr_t __init board_mem_reserve_add(char *name, size_t size) size_t align_size = ALIGN_SZ(size, SZ_1M); if(reserved_base_end == 0) - reserved_base_end = meminfo.bank[0].start + meminfo.bank[0].size; + reserved_base_end = meminfo.bank[meminfo.nr_banks - 1].start + meminfo.bank[meminfo.nr_banks - 1].size; reserved_size += align_size; base = reserved_base_end - reserved_size;