mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 00:21:32 +00:00
s390: get rid of odd global real_memory_size
The variable real_memory_size has odd semantics and has been used in a broken way by e.g. the old kvm code. Therefore get rid of it before anybody else makes use of it. Reviewed-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
edefc7107a
commit
118131a2d5
@ -43,7 +43,6 @@ struct mem_chunk {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern struct mem_chunk memory_chunk[];
|
extern struct mem_chunk memory_chunk[];
|
||||||
extern unsigned long real_memory_size;
|
|
||||||
extern int memory_end_set;
|
extern int memory_end_set;
|
||||||
extern unsigned long memory_end;
|
extern unsigned long memory_end;
|
||||||
|
|
||||||
|
@ -502,12 +502,10 @@ static void __init setup_resources(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long real_memory_size;
|
|
||||||
EXPORT_SYMBOL_GPL(real_memory_size);
|
|
||||||
|
|
||||||
static void __init setup_memory_end(void)
|
static void __init setup_memory_end(void)
|
||||||
{
|
{
|
||||||
unsigned long vmax, vmalloc_size, tmp;
|
unsigned long vmax, vmalloc_size, tmp;
|
||||||
|
unsigned long real_memory_size = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
@ -517,7 +515,6 @@ static void __init setup_memory_end(void)
|
|||||||
memory_end_set = 1;
|
memory_end_set = 1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
real_memory_size = 0;
|
|
||||||
memory_end &= PAGE_MASK;
|
memory_end &= PAGE_MASK;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -719,16 +716,22 @@ static struct notifier_block kdump_mem_nb = {
|
|||||||
static void reserve_oldmem(void)
|
static void reserve_oldmem(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CRASH_DUMP
|
#ifdef CONFIG_CRASH_DUMP
|
||||||
|
unsigned long real_size = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
if (!OLDMEM_BASE)
|
if (!OLDMEM_BASE)
|
||||||
return;
|
return;
|
||||||
|
for (i = 0; i < MEMORY_CHUNKS; i++) {
|
||||||
|
struct mem_chunk *chunk = &memory_chunk[i];
|
||||||
|
|
||||||
|
real_size = max(real_size, chunk->addr + chunk->size);
|
||||||
|
}
|
||||||
reserve_kdump_bootmem(OLDMEM_BASE, OLDMEM_SIZE, CHUNK_OLDMEM);
|
reserve_kdump_bootmem(OLDMEM_BASE, OLDMEM_SIZE, CHUNK_OLDMEM);
|
||||||
reserve_kdump_bootmem(OLDMEM_SIZE, memory_end - OLDMEM_SIZE,
|
reserve_kdump_bootmem(OLDMEM_SIZE, real_size - OLDMEM_SIZE, CHUNK_OLDMEM);
|
||||||
CHUNK_OLDMEM);
|
if (OLDMEM_BASE + OLDMEM_SIZE == real_size)
|
||||||
if (OLDMEM_BASE + OLDMEM_SIZE == real_memory_size)
|
|
||||||
saved_max_pfn = PFN_DOWN(OLDMEM_BASE) - 1;
|
saved_max_pfn = PFN_DOWN(OLDMEM_BASE) - 1;
|
||||||
else
|
else
|
||||||
saved_max_pfn = PFN_DOWN(real_memory_size) - 1;
|
saved_max_pfn = PFN_DOWN(real_size) - 1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user