msm: Change SPARSEMEM section_size to 256MB
Reduce SPARSEMEM section_size to 256MB. This is needed
to support memory offlining.
Reserving 512MB as movable zone drastically reduces the
virtual memory available for vmalloc allocations.
Change-Id: I5e96357ef3907ad94ba32660f281cc78b0072003
Signed-off-by: Jack Cheung <jackc@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index a093f5a..9e68257 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -40,6 +40,7 @@
#include <linux/msm_tsens.h>
#include <linux/ks8851.h>
#include <linux/i2c/isa1200.h>
+#include <linux/memory.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -808,12 +809,9 @@
if (high - low <= bank_size)
return;
- msm8960_reserve_info.low_unstable_address = low + bank_size;
- /* To avoid overflow of u32 compute max_unstable_size
- * by first subtracting low from mb->start)
- * */
- msm8960_reserve_info.max_unstable_size = (mb->start - low) +
- mb->size - bank_size;
+ msm8960_reserve_info.low_unstable_address = high -
+ MIN_MEMORY_BLOCK_SIZE;
+ msm8960_reserve_info.max_unstable_size = MIN_MEMORY_BLOCK_SIZE;
msm8960_reserve_info.bank_size = bank_size;
pr_info("low unstable address %lx max size %lx bank size %lx\n",
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
index 976db60..9cd73db 100644
--- a/arch/arm/mach-msm/include/mach/memory.h
+++ b/arch/arm/mach-msm/include/mach/memory.h
@@ -21,7 +21,7 @@
#define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
#define MAX_PHYSMEM_BITS 32
-#define SECTION_SIZE_BITS 29
+#define SECTION_SIZE_BITS 28
/* Maximum number of Memory Regions */
#define MAX_NR_REGIONS 4