diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:38:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 13:38:45 -0500 |
commit | 46bbffad54bd48bb809f2691c1970a79a588976b (patch) | |
tree | 21779a574f118b1cba5d6832bc0a0fa3bee97075 /arch/x86/kernel | |
parent | 85fe20bfd415af0a2e93bd1166533d4a6eb591ea (diff) | |
parent | c1fd1b43831fa20c91cdd461342af8edf2e87c2f (diff) |
Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, mm: Unify kernel_physical_mapping_init() API
x86, mm: Allow highmem user page tables to be disabled at boot time
x86: Do not reserve brk for DMI if it's not going to be used
x86: Convert tlbstate_lock to raw_spinlock
x86: Use the generic page_is_ram()
x86: Remove BIOS data range from e820
Move page_is_ram() declaration to mm.h
Generic page_is_ram: use __weak
resources: introduce generic page_is_ram()
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/e820.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/setup.c | 21 |
2 files changed, 28 insertions, 1 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index a1a7876cadcb..a966b753e496 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -517,11 +517,19 @@ u64 __init e820_remove_range(u64 start, u64 size, unsigned old_type, | |||
517 | int checktype) | 517 | int checktype) |
518 | { | 518 | { |
519 | int i; | 519 | int i; |
520 | u64 end; | ||
520 | u64 real_removed_size = 0; | 521 | u64 real_removed_size = 0; |
521 | 522 | ||
522 | if (size > (ULLONG_MAX - start)) | 523 | if (size > (ULLONG_MAX - start)) |
523 | size = ULLONG_MAX - start; | 524 | size = ULLONG_MAX - start; |
524 | 525 | ||
526 | end = start + size; | ||
527 | printk(KERN_DEBUG "e820 remove range: %016Lx - %016Lx ", | ||
528 | (unsigned long long) start, | ||
529 | (unsigned long long) end); | ||
530 | e820_print_type(old_type); | ||
531 | printk(KERN_CONT "\n"); | ||
532 | |||
525 | for (i = 0; i < e820.nr_map; i++) { | 533 | for (i = 0; i < e820.nr_map; i++) { |
526 | struct e820entry *ei = &e820.map[i]; | 534 | struct e820entry *ei = &e820.map[i]; |
527 | u64 final_start, final_end; | 535 | u64 final_start, final_end; |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 5d9e40c58628..cb42109a55b4 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -121,7 +121,9 @@ | |||
121 | unsigned long max_low_pfn_mapped; | 121 | unsigned long max_low_pfn_mapped; |
122 | unsigned long max_pfn_mapped; | 122 | unsigned long max_pfn_mapped; |
123 | 123 | ||
124 | #ifdef CONFIG_DMI | ||
124 | RESERVE_BRK(dmi_alloc, 65536); | 125 | RESERVE_BRK(dmi_alloc, 65536); |
126 | #endif | ||
125 | 127 | ||
126 | unsigned int boot_cpu_id __read_mostly; | 128 | unsigned int boot_cpu_id __read_mostly; |
127 | 129 | ||
@@ -667,6 +669,23 @@ static struct dmi_system_id __initdata bad_bios_dmi_table[] = { | |||
667 | {} | 669 | {} |
668 | }; | 670 | }; |
669 | 671 | ||
672 | static void __init trim_bios_range(void) | ||
673 | { | ||
674 | /* | ||
675 | * A special case is the first 4Kb of memory; | ||
676 | * This is a BIOS owned area, not kernel ram, but generally | ||
677 | * not listed as such in the E820 table. | ||
678 | */ | ||
679 | e820_update_range(0, PAGE_SIZE, E820_RAM, E820_RESERVED); | ||
680 | /* | ||
681 | * special case: Some BIOSen report the PC BIOS | ||
682 | * area (640->1Mb) as ram even though it is not. | ||
683 | * take them out. | ||
684 | */ | ||
685 | e820_remove_range(BIOS_BEGIN, BIOS_END - BIOS_BEGIN, E820_RAM, 1); | ||
686 | sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), &e820.nr_map); | ||
687 | } | ||
688 | |||
670 | /* | 689 | /* |
671 | * Determine if we were loaded by an EFI loader. If so, then we have also been | 690 | * Determine if we were loaded by an EFI loader. If so, then we have also been |
672 | * passed the efi memmap, systab, etc., so we should use these data structures | 691 | * passed the efi memmap, systab, etc., so we should use these data structures |
@@ -830,7 +849,7 @@ void __init setup_arch(char **cmdline_p) | |||
830 | insert_resource(&iomem_resource, &data_resource); | 849 | insert_resource(&iomem_resource, &data_resource); |
831 | insert_resource(&iomem_resource, &bss_resource); | 850 | insert_resource(&iomem_resource, &bss_resource); |
832 | 851 | ||
833 | 852 | trim_bios_range(); | |
834 | #ifdef CONFIG_X86_32 | 853 | #ifdef CONFIG_X86_32 |
835 | if (ppro_with_ram_bug()) { | 854 | if (ppro_with_ram_bug()) { |
836 | e820_update_range(0x70000000ULL, 0x40000ULL, E820_RAM, | 855 | e820_update_range(0x70000000ULL, 0x40000ULL, E820_RAM, |