aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-04-01 17:32:43 -0400
committerH. Peter Anvin <hpa@zytor.com>2010-04-01 19:12:48 -0400
commit042be38e6106ed70b42d096ab4a1ed4187e510e6 (patch)
treefb3599873f28cf36dbc76b6cd0a84f3e89e5e8cb /arch/x86/kernel/setup.c
parentb4a5e8a1deca7e61ebaffb37344766b0f0e9f327 (diff)
ibft, x86: Change reserve_ibft_region() to find_ibft_region()
This allows arch code could decide the way to reserve the ibft. And we should reserve ibft as early as possible, instead of BOOTMEM stage, in case the table is in RAM range and is not reserved by BIOS (this will often be the case.) Move to just after find_smp_config(). Also when CONFIG_NO_BOOTMEM=y, We will not have reserve_bootmem() anymore. -v2: fix typo about ibft pointed by Konrad Rzeszutek Wilk <konrad@darnok.org> Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <4BB510FB.80601@kernel.org> Cc: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Peter Jones <pjones@redhat.com> Cc: Konrad Rzeszutek Wilk <konrad@kernel.org> CC: Jan Beulich <jbeulich@novell.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index d76e18570c60..580e6b3dbdb8 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -608,6 +608,16 @@ static int __init setup_elfcorehdr(char *arg)
608early_param("elfcorehdr", setup_elfcorehdr); 608early_param("elfcorehdr", setup_elfcorehdr);
609#endif 609#endif
610 610
611static __init void reserve_ibft_region(void)
612{
613 unsigned long addr, size = 0;
614
615 addr = find_ibft_region(&size);
616
617 if (size)
618 reserve_early_overlap_ok(addr, addr + size, "ibft");
619}
620
611#ifdef CONFIG_X86_RESERVE_LOW_64K 621#ifdef CONFIG_X86_RESERVE_LOW_64K
612static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) 622static int __init dmi_low_memory_corruption(const struct dmi_system_id *d)
613{ 623{
@@ -910,6 +920,8 @@ void __init setup_arch(char **cmdline_p)
910 */ 920 */
911 find_smp_config(); 921 find_smp_config();
912 922
923 reserve_ibft_region();
924
913 reserve_trampoline_memory(); 925 reserve_trampoline_memory();
914 926
915#ifdef CONFIG_ACPI_SLEEP 927#ifdef CONFIG_ACPI_SLEEP
@@ -977,8 +989,6 @@ void __init setup_arch(char **cmdline_p)
977 989
978 dma32_reserve_bootmem(); 990 dma32_reserve_bootmem();
979 991
980 reserve_ibft_region();
981
982#ifdef CONFIG_KVM_CLOCK 992#ifdef CONFIG_KVM_CLOCK
983 kvmclock_init(); 993 kvmclock_init();
984#endif 994#endif