diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 22:49:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-15 22:49:10 -0400 |
commit | 181f977d134a9f8e3f8839f42af655b045fc059e (patch) | |
tree | 5d9bb67c62ef1476c18ed350106a84c02f0dd8e4 /arch/x86/kernel/setup.c | |
parent | d5d42399bd7b66bd6b55363b311810504110c967 (diff) | |
parent | 25542c646afbf14c43fa7d2b443055cadb73b07a (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: (93 commits)
x86, tlb, UV: Do small micro-optimization for native_flush_tlb_others()
x86-64, NUMA: Don't call numa_set_distanc() for all possible node combinations during emulation
x86-64, NUMA: Don't assume phys node 0 is always online in numa_emulation()
x86-64, NUMA: Clean up initmem_init()
x86-64, NUMA: Fix numa_emulation code with node0 without RAM
x86-64, NUMA: Revert NUMA affine page table allocation
x86: Work around old gas bug
x86-64, NUMA: Better explain numa_distance handling
x86-64, NUMA: Fix distance table handling
mm: Move early_node_map[] reverse scan helpers under HAVE_MEMBLOCK
x86-64, NUMA: Fix size of numa_distance array
x86: Rename e820_table_* to pgt_buf_*
bootmem: Move __alloc_memory_core_early() to nobootmem.c
bootmem: Move contig_page_data definition to bootmem.c/nobootmem.c
bootmem: Separate out CONFIG_NO_BOOTMEM code into nobootmem.c
x86-64, NUMA: Seperate out numa_alloc_distance() from numa_set_distance()
x86-64, NUMA: Add proper function comments to global functions
x86-64, NUMA: Move NUMA emulation into numa_emulation.c
x86-64, NUMA: Prepare numa_emulation() for moving NUMA emulation into a separate file
x86-64, NUMA: Do not scan two times for setup_node_bootmem()
...
Fix up conflicts in arch/x86/kernel/smpboot.c
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d3cfe26c0252..c3a606c41ce0 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -293,10 +293,32 @@ static void __init init_gbpages(void) | |||
293 | else | 293 | else |
294 | direct_gbpages = 0; | 294 | direct_gbpages = 0; |
295 | } | 295 | } |
296 | |||
297 | static void __init cleanup_highmap_brk_end(void) | ||
298 | { | ||
299 | pud_t *pud; | ||
300 | pmd_t *pmd; | ||
301 | |||
302 | mmu_cr4_features = read_cr4(); | ||
303 | |||
304 | /* | ||
305 | * _brk_end cannot change anymore, but it and _end may be | ||
306 | * located on different 2M pages. cleanup_highmap(), however, | ||
307 | * can only consider _end when it runs, so destroy any | ||
308 | * mappings beyond _brk_end here. | ||
309 | */ | ||
310 | pud = pud_offset(pgd_offset_k(_brk_end), _brk_end); | ||
311 | pmd = pmd_offset(pud, _brk_end - 1); | ||
312 | while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1)) | ||
313 | pmd_clear(pmd); | ||
314 | } | ||
296 | #else | 315 | #else |
297 | static inline void init_gbpages(void) | 316 | static inline void init_gbpages(void) |
298 | { | 317 | { |
299 | } | 318 | } |
319 | static inline void cleanup_highmap_brk_end(void) | ||
320 | { | ||
321 | } | ||
300 | #endif | 322 | #endif |
301 | 323 | ||
302 | static void __init reserve_brk(void) | 324 | static void __init reserve_brk(void) |
@@ -307,6 +329,8 @@ static void __init reserve_brk(void) | |||
307 | /* Mark brk area as locked down and no longer taking any | 329 | /* Mark brk area as locked down and no longer taking any |
308 | new allocations */ | 330 | new allocations */ |
309 | _brk_start = 0; | 331 | _brk_start = 0; |
332 | |||
333 | cleanup_highmap_brk_end(); | ||
310 | } | 334 | } |
311 | 335 | ||
312 | #ifdef CONFIG_BLK_DEV_INITRD | 336 | #ifdef CONFIG_BLK_DEV_INITRD |
@@ -680,15 +704,6 @@ static int __init parse_reservelow(char *p) | |||
680 | 704 | ||
681 | early_param("reservelow", parse_reservelow); | 705 | early_param("reservelow", parse_reservelow); |
682 | 706 | ||
683 | static u64 __init get_max_mapped(void) | ||
684 | { | ||
685 | u64 end = max_pfn_mapped; | ||
686 | |||
687 | end <<= PAGE_SHIFT; | ||
688 | |||
689 | return end; | ||
690 | } | ||
691 | |||
692 | /* | 707 | /* |
693 | * Determine if we were loaded by an EFI loader. If so, then we have also been | 708 | * Determine if we were loaded by an EFI loader. If so, then we have also been |
694 | * passed the efi memmap, systab, etc., so we should use these data structures | 709 | * passed the efi memmap, systab, etc., so we should use these data structures |
@@ -704,8 +719,6 @@ static u64 __init get_max_mapped(void) | |||
704 | 719 | ||
705 | void __init setup_arch(char **cmdline_p) | 720 | void __init setup_arch(char **cmdline_p) |
706 | { | 721 | { |
707 | int acpi = 0; | ||
708 | int amd = 0; | ||
709 | unsigned long flags; | 722 | unsigned long flags; |
710 | 723 | ||
711 | #ifdef CONFIG_X86_32 | 724 | #ifdef CONFIG_X86_32 |
@@ -984,19 +997,7 @@ void __init setup_arch(char **cmdline_p) | |||
984 | 997 | ||
985 | early_acpi_boot_init(); | 998 | early_acpi_boot_init(); |
986 | 999 | ||
987 | #ifdef CONFIG_ACPI_NUMA | 1000 | initmem_init(); |
988 | /* | ||
989 | * Parse SRAT to discover nodes. | ||
990 | */ | ||
991 | acpi = acpi_numa_init(); | ||
992 | #endif | ||
993 | |||
994 | #ifdef CONFIG_AMD_NUMA | ||
995 | if (!acpi) | ||
996 | amd = !amd_numa_init(0, max_pfn); | ||
997 | #endif | ||
998 | |||
999 | initmem_init(0, max_pfn, acpi, amd); | ||
1000 | memblock_find_dma_reserve(); | 1001 | memblock_find_dma_reserve(); |
1001 | dma32_reserve_bootmem(); | 1002 | dma32_reserve_bootmem(); |
1002 | 1003 | ||
@@ -1040,9 +1041,7 @@ void __init setup_arch(char **cmdline_p) | |||
1040 | 1041 | ||
1041 | prefill_possible_map(); | 1042 | prefill_possible_map(); |
1042 | 1043 | ||
1043 | #ifdef CONFIG_X86_64 | ||
1044 | init_cpu_to_node(); | 1044 | init_cpu_to_node(); |
1045 | #endif | ||
1046 | 1045 | ||
1047 | init_apic_mappings(); | 1046 | init_apic_mappings(); |
1048 | ioapic_and_gsi_init(); | 1047 | ioapic_and_gsi_init(); |