mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
ARM: mm: cleanup checks for membank overlap with vmalloc area
On Keystone platforms, physical memory is entirely outside the 32-bit addressible range. Therefore, the (bank->start > ULONG_MAX) check below marks the entire system memory as highmem, and this causes unpleasentness all over. This patch eliminates the extra bank start check (against ULONG_MAX) by checking bank->start against the physical address corresponding to vmalloc_min instead. In the process, this patch also cleans up parts of the highmem sanity check code by removing what has now become a redundant check for banks that entirely overlap with the vmalloc range. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Acked-by: Nicolas Pitre <nico@linaro.org> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Subash Patel <subash.rp@samsung.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
parent
5b20c5b2f0
commit
adf2e9fda3
@ -994,15 +994,12 @@ void __init sanity_check_meminfo(void)
|
|||||||
struct membank *bank = &meminfo.bank[j];
|
struct membank *bank = &meminfo.bank[j];
|
||||||
*bank = meminfo.bank[i];
|
*bank = meminfo.bank[i];
|
||||||
|
|
||||||
if (bank->start > ULONG_MAX)
|
|
||||||
highmem = 1;
|
|
||||||
|
|
||||||
#ifdef CONFIG_HIGHMEM
|
|
||||||
if (bank->start >= vmalloc_limit)
|
if (bank->start >= vmalloc_limit)
|
||||||
highmem = 1;
|
highmem = 1;
|
||||||
|
|
||||||
bank->highmem = highmem;
|
bank->highmem = highmem;
|
||||||
|
|
||||||
|
#ifdef CONFIG_HIGHMEM
|
||||||
/*
|
/*
|
||||||
* Split those memory banks which are partially overlapping
|
* Split those memory banks which are partially overlapping
|
||||||
* the vmalloc area greatly simplifying things later.
|
* the vmalloc area greatly simplifying things later.
|
||||||
@ -1025,8 +1022,6 @@ void __init sanity_check_meminfo(void)
|
|||||||
bank->size = vmalloc_limit - bank->start;
|
bank->size = vmalloc_limit - bank->start;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
bank->highmem = highmem;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Highmem banks not allowed with !CONFIG_HIGHMEM.
|
* Highmem banks not allowed with !CONFIG_HIGHMEM.
|
||||||
*/
|
*/
|
||||||
@ -1038,18 +1033,6 @@ void __init sanity_check_meminfo(void)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Check whether this memory bank would entirely overlap
|
|
||||||
* the vmalloc area.
|
|
||||||
*/
|
|
||||||
if (bank->start >= vmalloc_limit) {
|
|
||||||
printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx "
|
|
||||||
"(vmalloc region overlap).\n",
|
|
||||||
(unsigned long long)bank->start,
|
|
||||||
(unsigned long long)bank->start + bank->size - 1);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether this memory bank would partially overlap
|
* Check whether this memory bank would partially overlap
|
||||||
* the vmalloc area.
|
* the vmalloc area.
|
||||||
|
Loading…
Reference in New Issue
Block a user