ARM: Fix broken highmem support
Currently, highmem is selectable, and you can request an increased vmalloc area. However, none of this has any effect on the memory layout since a patch in the highmem series was accidentally dropped. Moreover, even if you did want highmem, all memory would still be registered as lowmem, possibly resulting in overflow of the available virtual mapping space. The highmem boundary is determined by the highest allowed beginning of the vmalloc area, which depends on its configurable minimum size (see commit60296c71f6
for details on this). We should create mappings and initialize bootmem only for low memory, while the zone allocator must still be told about highmem. Currently, memory nodes which are completely located in high memory are not supported. This is not a huge limitation since systems relying on highmem support are unlikely to have discontiguous memory with large holes. [ A similar patch was meant to be merged before commit5f0fbf9eca
and be available in Linux v2.6.30, however some git rebase screw-up of mine dropped the first commit of the series, and that goofage escaped testing somehow as well. -- Nico ] Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Nicolas Pitre <nico@marvell.com>
Esse commit está contido em:
@@ -687,13 +687,19 @@ __early_param("vmalloc=", early_vmalloc);
|
||||
|
||||
static void __init sanity_check_meminfo(void)
|
||||
{
|
||||
int i, j;
|
||||
int i, j, highmem = 0;
|
||||
|
||||
for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
|
||||
struct membank *bank = &meminfo.bank[j];
|
||||
*bank = meminfo.bank[i];
|
||||
|
||||
#ifdef CONFIG_HIGHMEM
|
||||
if (__va(bank->start) > VMALLOC_MIN ||
|
||||
__va(bank->start) < (void *)PAGE_OFFSET)
|
||||
highmem = 1;
|
||||
|
||||
bank->highmem = highmem;
|
||||
|
||||
/*
|
||||
* Split those memory banks which are partially overlapping
|
||||
* the vmalloc area greatly simplifying things later.
|
||||
@@ -714,6 +720,7 @@ static void __init sanity_check_meminfo(void)
|
||||
i++;
|
||||
bank[1].size -= VMALLOC_MIN - __va(bank->start);
|
||||
bank[1].start = __pa(VMALLOC_MIN - 1) + 1;
|
||||
bank[1].highmem = highmem = 1;
|
||||
j++;
|
||||
}
|
||||
bank->size = VMALLOC_MIN - __va(bank->start);
|
||||
|
Referência em uma nova issue
Block a user