Merge "msm: Remove DONT_MAP_HOLE_AFTER_MEMBANK0"

This commit is contained in:
Linux Build Service Account 2014-01-08 16:43:11 -08:00 committed by Gerrit - the friendly Code Review server
commit 3621dde73a
5 changed files with 0 additions and 116 deletions

View File

@ -1797,14 +1797,6 @@ choice
help
Select the method of reclaiming virtual memory
config DONT_MAP_HOLE_AFTER_MEMBANK0
bool "Map around the largest hole"
help
Do not map the memory belonging to the largest hole
into the virtual space. This results in more lowmem.
If multiple holes are present, only the largest hole
in the first 256MB of memory is not mapped.
config ENABLE_VMALLOC_SAVING
bool "Reclaim memory for each subsystem"
help

View File

@ -92,7 +92,6 @@ config ARCH_MPQ8092
select MSM_QDSP6_APRV2 if SND_SOC
select MSM_NOPM
select MEMORY_HOLE_CARVEOUT
select DONT_MAP_HOLE_AFTER_MEMBANK0
select QMI_ENCDEC
select MIGHT_HAVE_PCI
select ARCH_SUPPORTS_MSI

View File

@ -32,32 +32,6 @@ extern void l2x0_cache_sync(void);
#endif
#define MAX_HOLE_ADDRESS (PHYS_OFFSET + 0x10000000)
extern phys_addr_t memory_hole_offset;
extern phys_addr_t memory_hole_start;
extern phys_addr_t memory_hole_end;
extern unsigned long memory_hole_align;
extern unsigned long virtual_hole_start;
extern unsigned long virtual_hole_end;
#ifdef CONFIG_DONT_MAP_HOLE_AFTER_MEMBANK0
void find_memory_hole(void);
#define MEM_HOLE_END_PHYS_OFFSET (memory_hole_end)
#define MEM_HOLE_PAGE_OFFSET (PAGE_OFFSET + memory_hole_offset + \
memory_hole_align)
#define __phys_to_virt(phys) \
(unsigned long)\
((MEM_HOLE_END_PHYS_OFFSET && ((phys) >= MEM_HOLE_END_PHYS_OFFSET)) ? \
(phys) - MEM_HOLE_END_PHYS_OFFSET + MEM_HOLE_PAGE_OFFSET : \
(phys) - PHYS_OFFSET + PAGE_OFFSET)
#define __virt_to_phys(virt) \
(unsigned long)\
((MEM_HOLE_END_PHYS_OFFSET && ((virt) >= MEM_HOLE_PAGE_OFFSET)) ? \
(virt) - MEM_HOLE_PAGE_OFFSET + MEM_HOLE_END_PHYS_OFFSET : \
(virt) - PAGE_OFFSET + PHYS_OFFSET)
#endif
/*
* Need a temporary unique variable that no one will ever see to
* hold the compat string. Line number gives this easily.

View File

@ -378,84 +378,6 @@ static int __init meminfo_cmp(const void *_a, const void *_b)
return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
}
phys_addr_t memory_hole_offset;
EXPORT_SYMBOL(memory_hole_offset);
phys_addr_t memory_hole_start;
EXPORT_SYMBOL(memory_hole_start);
phys_addr_t memory_hole_end;
EXPORT_SYMBOL(memory_hole_end);
unsigned long memory_hole_align;
EXPORT_SYMBOL(memory_hole_align);
unsigned long virtual_hole_start;
unsigned long virtual_hole_end;
#ifdef CONFIG_DONT_MAP_HOLE_AFTER_MEMBANK0
void find_memory_hole(void)
{
int i;
phys_addr_t hole_start;
phys_addr_t hole_size;
unsigned long hole_end_virt;
/*
* Find the start and end of the hole, using meminfo.
*/
for (i = 0; i < (meminfo.nr_banks - 1); i++) {
if ((meminfo.bank[i].start + meminfo.bank[i].size) !=
meminfo.bank[i+1].start) {
if (meminfo.bank[i].start + meminfo.bank[i].size
<= MAX_HOLE_ADDRESS) {
hole_start = meminfo.bank[i].start +
meminfo.bank[i].size;
hole_size = meminfo.bank[i+1].start -
hole_start;
if (memory_hole_start == 0 &&
memory_hole_end == 0) {
memory_hole_start = hole_start;
memory_hole_end = hole_start +
hole_size;
} else if ((memory_hole_end -
memory_hole_start) <= hole_size) {
memory_hole_start = hole_start;
memory_hole_end = hole_start +
hole_size;
}
}
}
}
memory_hole_offset = memory_hole_start - PHYS_OFFSET;
if (!IS_ALIGNED(memory_hole_start, SECTION_SIZE)) {
pr_err("memory_hole_start %pa is not aligned to %lx\n",
&memory_hole_start, SECTION_SIZE);
BUG();
}
if (!IS_ALIGNED(memory_hole_end, SECTION_SIZE)) {
pr_err("memory_hole_end %pa is not aligned to %lx\n",
&memory_hole_end, SECTION_SIZE);
BUG();
}
hole_end_virt = __phys_to_virt(memory_hole_end);
if ((!IS_ALIGNED(hole_end_virt, PMD_SIZE) &&
IS_ALIGNED(memory_hole_end, PMD_SIZE)) ||
(IS_ALIGNED(hole_end_virt, PMD_SIZE) &&
!IS_ALIGNED(memory_hole_end, PMD_SIZE))) {
memory_hole_align = !IS_ALIGNED(hole_end_virt, PMD_SIZE) ?
hole_end_virt & ~PMD_MASK :
memory_hole_end & ~PMD_MASK;
virtual_hole_start = hole_end_virt;
virtual_hole_end = hole_end_virt + memory_hole_align;
pr_info("Physical memory hole is not aligned. There will be a virtual memory hole from %lx to %lx\n",
virtual_hole_start, virtual_hole_end);
}
}
#endif
void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
{
int i;

View File

@ -1094,9 +1094,6 @@ void __init sanity_check_meminfo(void)
}
}
#endif
#ifdef CONFIG_DONT_MAP_HOLE_AFTER_MEMBANK0
find_memory_hole();
#endif
for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
struct membank *bank = &meminfo.bank[j];