aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2013-04-29 11:32:34 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-05-02 09:50:25 -0400
commit118131a2d588f4a0fb74d0f2aa7d339a03b2f64c (patch)
treee51b0e23e1e2bf6c20208567f881f78afa4f033c /arch/s390
parentedefc7107afedd6bd59e80bc0586ddb276edfcbe (diff)
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>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/setup.h1
-rw-r--r--arch/s390/kernel/setup.c19
2 files changed, 11 insertions, 9 deletions
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h
index ff67d730c00c..270fcd0fbf1a 100644
--- a/arch/s390/include/asm/setup.h
+++ b/arch/s390/include/asm/setup.h
@@ -43,7 +43,6 @@ struct mem_chunk {
43}; 43};
44 44
45extern struct mem_chunk memory_chunk[]; 45extern struct mem_chunk memory_chunk[];
46extern unsigned long real_memory_size;
47extern int memory_end_set; 46extern int memory_end_set;
48extern unsigned long memory_end; 47extern unsigned long memory_end;
49 48
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a2574f192bb0..f1e0ba5a5c3a 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -502,12 +502,10 @@ static void __init setup_resources(void)
502 } 502 }
503} 503}
504 504
505unsigned long real_memory_size;
506EXPORT_SYMBOL_GPL(real_memory_size);
507
508static void __init setup_memory_end(void) 505static void __init setup_memory_end(void)
509{ 506{
510 unsigned long vmax, vmalloc_size, tmp; 507 unsigned long vmax, vmalloc_size, tmp;
508 unsigned long real_memory_size = 0;
511 int i; 509 int i;
512 510
513 511
@@ -517,7 +515,6 @@ static void __init setup_memory_end(void)
517 memory_end_set = 1; 515 memory_end_set = 1;
518 } 516 }
519#endif 517#endif
520 real_memory_size = 0;
521 memory_end &= PAGE_MASK; 518 memory_end &= PAGE_MASK;
522 519
523 /* 520 /*
@@ -719,16 +716,22 @@ static struct notifier_block kdump_mem_nb = {
719static void reserve_oldmem(void) 716static void reserve_oldmem(void)
720{ 717{
721#ifdef CONFIG_CRASH_DUMP 718#ifdef CONFIG_CRASH_DUMP
719 unsigned long real_size = 0;
720 int i;
721
722 if (!OLDMEM_BASE) 722 if (!OLDMEM_BASE)
723 return; 723 return;
724 for (i = 0; i < MEMORY_CHUNKS; i++) {
725 struct mem_chunk *chunk = &memory_chunk[i];
724 726
727 real_size = max(real_size, chunk->addr + chunk->size);
728 }
725 reserve_kdump_bootmem(OLDMEM_BASE, OLDMEM_SIZE, CHUNK_OLDMEM); 729 reserve_kdump_bootmem(OLDMEM_BASE, OLDMEM_SIZE, CHUNK_OLDMEM);
726 reserve_kdump_bootmem(OLDMEM_SIZE, memory_end - OLDMEM_SIZE, 730 reserve_kdump_bootmem(OLDMEM_SIZE, real_size - OLDMEM_SIZE, CHUNK_OLDMEM);
727 CHUNK_OLDMEM); 731 if (OLDMEM_BASE + OLDMEM_SIZE == real_size)
728 if (OLDMEM_BASE + OLDMEM_SIZE == real_memory_size)
729 saved_max_pfn = PFN_DOWN(OLDMEM_BASE) - 1; 732 saved_max_pfn = PFN_DOWN(OLDMEM_BASE) - 1;
730 else 733 else
731 saved_max_pfn = PFN_DOWN(real_memory_size) - 1; 734 saved_max_pfn = PFN_DOWN(real_size) - 1;
732#endif 735#endif
733} 736}
734 737