linux/arch
Dave Young 09c71bfd83 kdump x86: fix total mem size calculation for reservation
crashkernel reservation need know the total memory size.  Current
get_total_mem simply use max_pfn - min_low_pfn.  It is wrong because it
will including memory holes in the middle.

Especially for kvm guest with memory > 0xe0000000, there's below in qemu
code: qemu split memory as below:

    if (ram_size >= 0xe0000000 ) {
        above_4g_mem_size = ram_size - 0xe0000000;
        below_4g_mem_size = 0xe0000000;
    } else {
        below_4g_mem_size = ram_size;
    }

So for 4G mem guest, seabios will insert a 512M usable region beyond of
4G.  Thus in above case max_pfn - min_low_pfn will be more than original
memsize.

Fixing this issue by using memblock_phys_mem_size() to get the total
memsize.

Signed-off-by: Dave Young <dyoung@redhat.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-28 17:14:36 -07:00
..
alpha Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-23 16:59:10 -07:00
arm smp: introduce a generic on_each_cpu_mask() function 2012-03-28 17:14:35 -07:00
avr32 ARM: device tree work 2012-03-27 16:47:35 -07:00
blackfin nmi watchdog: do not use cpp symbol in Kconfig 2012-03-23 16:58:31 -07:00
c6x Remove remaining bits of io_remap_page_range() 2012-03-23 16:58:31 -07:00
cris
frv
h8300
hexagon coredump: remove VM_ALWAYSDUMP flag 2012-03-23 16:58:42 -07:00
ia64 arch/ia64: remove references to cpu_*_map 2012-03-28 17:14:36 -07:00
m32r
m68k The following text was taken from the original review request: 2012-03-24 10:08:39 -07:00
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2012-03-27 18:20:56 -07:00
mips Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into next/boards 2012-03-27 15:18:19 -07:00
mn10300 Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-23 16:59:10 -07:00
openrisc OpenRISC changes for 3.4 2012-03-23 17:24:25 -07:00
parisc The following text was taken from the original review request: 2012-03-24 10:08:39 -07:00
powerpc The following text was taken from the original review request: 2012-03-24 10:08:39 -07:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2012-03-27 18:36:38 -07:00
score
sh ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
sparc The following text was taken from the original review request: 2012-03-24 10:08:39 -07:00
tile smp: introduce a generic on_each_cpu_mask() function 2012-03-28 17:14:35 -07:00
um Merge branch 'for-linus-3.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2012-03-27 18:29:53 -07:00
unicore32 Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-23 16:59:10 -07:00
x86 kdump x86: fix total mem size calculation for reservation 2012-03-28 17:14:36 -07:00
xtensa Merge branch 'akpm' (Andrew's patch-bomb) 2012-03-23 16:59:10 -07:00
.gitignore
Kconfig nmi watchdog: do not use cpp symbol in Kconfig 2012-03-23 16:58:31 -07:00