diff options
author | Tony Lindgren <tony@atomide.com> | 2012-11-13 16:25:38 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-11-13 16:25:38 -0500 |
commit | 89ab216b33ba9405880fd3d89531305a931bc70f (patch) | |
tree | 8f6428ce51ecaed6f6e1379c036dbe341eb71e34 /arch/x86/kernel/setup.c | |
parent | c9d501e5cb0238910337213e12a09127221c35d8 (diff) | |
parent | 46bf4a562207c5ebd24e1dde5e5ee326cd3d6b91 (diff) |
Merge branch 'omap-for-v3.8/pm' into omap-for-v3.8/clock
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 468e98dfd44e..ca45696f30fb 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -921,18 +921,19 @@ void __init setup_arch(char **cmdline_p) | |||
921 | #ifdef CONFIG_X86_64 | 921 | #ifdef CONFIG_X86_64 |
922 | if (max_pfn > max_low_pfn) { | 922 | if (max_pfn > max_low_pfn) { |
923 | int i; | 923 | int i; |
924 | for (i = 0; i < e820.nr_map; i++) { | 924 | unsigned long start, end; |
925 | struct e820entry *ei = &e820.map[i]; | 925 | unsigned long start_pfn, end_pfn; |
926 | 926 | ||
927 | if (ei->addr + ei->size <= 1UL << 32) | 927 | for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, |
928 | continue; | 928 | NULL) { |
929 | 929 | ||
930 | if (ei->type == E820_RESERVED) | 930 | end = PFN_PHYS(end_pfn); |
931 | if (end <= (1UL<<32)) | ||
931 | continue; | 932 | continue; |
932 | 933 | ||
934 | start = PFN_PHYS(start_pfn); | ||
933 | max_pfn_mapped = init_memory_mapping( | 935 | max_pfn_mapped = init_memory_mapping( |
934 | ei->addr < 1UL << 32 ? 1UL << 32 : ei->addr, | 936 | max((1UL<<32), start), end); |
935 | ei->addr + ei->size); | ||
936 | } | 937 | } |
937 | 938 | ||
938 | /* can we preseve max_low_pfn ?*/ | 939 | /* can we preseve max_low_pfn ?*/ |
@@ -1048,6 +1049,18 @@ void __init setup_arch(char **cmdline_p) | |||
1048 | arch_init_ideal_nops(); | 1049 | arch_init_ideal_nops(); |
1049 | 1050 | ||
1050 | register_refined_jiffies(CLOCK_TICK_RATE); | 1051 | register_refined_jiffies(CLOCK_TICK_RATE); |
1052 | |||
1053 | #ifdef CONFIG_EFI | ||
1054 | /* Once setup is done above, disable efi_enabled on mismatched | ||
1055 | * firmware/kernel archtectures since there is no support for | ||
1056 | * runtime services. | ||
1057 | */ | ||
1058 | if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) { | ||
1059 | pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n"); | ||
1060 | efi_unmap_memmap(); | ||
1061 | efi_enabled = 0; | ||
1062 | } | ||
1063 | #endif | ||
1051 | } | 1064 | } |
1052 | 1065 | ||
1053 | #ifdef CONFIG_X86_32 | 1066 | #ifdef CONFIG_X86_32 |