]> git.baikalelectronics.ru Git - kernel.git/commit
x86: fix trim mtrr not to setup_memory two times
authorYinghai Lu <yhlu.kernel.send@gmail.com>
Sun, 23 Mar 2008 07:16:49 +0000 (00:16 -0700)
committerIngo Molnar <mingo@elte.hu>
Wed, 26 Mar 2008 21:23:41 +0000 (22:23 +0100)
commite5a86f575e1f0a55d94ae572b1b6a15cff97a42d
tree7dcdd3aded048ab8613f532140d1d5bad14e4621
parentd01f2c75b6a5daa0af2f68644faeb8dc152f8b17
x86: fix trim mtrr not to setup_memory two times

we could call find_max_pfn() directly instead of setup_memory() to get
max_pfn needed for mtrr trimming.

otherwise setup_memory() is called two times... that is duplicated...

[ mingo@elte.hu: both Thomas and me simulated a double call to
  setup_bootmem_allocator() and can confirm that it is a real bug
  which can hang in certain configs. It's not been reported yet but
  that is probably due to the relatively scarce nature of
  MTRR-trimming systems. ]

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/setup_32.c
arch/x86/mm/discontig_32.c