diff options
| -rw-r--r-- | arch/x86/include/asm/mpspec.h | 11 | ||||
| -rw-r--r-- | arch/x86/include/asm/x86_init.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/apic/numaq_32.c | 5 | ||||
| -rw-r--r-- | arch/x86/kernel/mpparse.c | 44 | ||||
| -rw-r--r-- | arch/x86/kernel/setup.c | 10 | ||||
| -rw-r--r-- | arch/x86/kernel/visws_quirks.c | 2 | ||||
| -rw-r--r-- | arch/x86/mm/k8topology_64.c | 12 |
7 files changed, 22 insertions, 64 deletions
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index 79c94500c0bb..644cf1a50bfd 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h | |||
| @@ -71,12 +71,7 @@ static inline void early_get_smp_config(void) | |||
| 71 | 71 | ||
| 72 | static inline void find_smp_config(void) | 72 | static inline void find_smp_config(void) |
| 73 | { | 73 | { |
| 74 | x86_init.mpparse.find_smp_config(1); | 74 | x86_init.mpparse.find_smp_config(); |
| 75 | } | ||
| 76 | |||
| 77 | static inline void early_find_smp_config(void) | ||
| 78 | { | ||
| 79 | x86_init.mpparse.find_smp_config(0); | ||
| 80 | } | 75 | } |
| 81 | 76 | ||
| 82 | #ifdef CONFIG_X86_MPPARSE | 77 | #ifdef CONFIG_X86_MPPARSE |
| @@ -89,7 +84,7 @@ extern void default_mpc_oem_bus_info(struct mpc_bus *m, char *str); | |||
| 89 | # else | 84 | # else |
| 90 | # define default_mpc_oem_bus_info NULL | 85 | # define default_mpc_oem_bus_info NULL |
| 91 | # endif | 86 | # endif |
| 92 | extern void default_find_smp_config(unsigned int reserve); | 87 | extern void default_find_smp_config(void); |
| 93 | extern void default_get_smp_config(unsigned int early); | 88 | extern void default_get_smp_config(unsigned int early); |
| 94 | #else | 89 | #else |
| 95 | static inline void early_reserve_e820_mpc_new(void) { } | 90 | static inline void early_reserve_e820_mpc_new(void) { } |
| @@ -97,7 +92,7 @@ static inline void early_reserve_e820_mpc_new(void) { } | |||
| 97 | #define default_mpc_apic_id NULL | 92 | #define default_mpc_apic_id NULL |
| 98 | #define default_smp_read_mpc_oem NULL | 93 | #define default_smp_read_mpc_oem NULL |
| 99 | #define default_mpc_oem_bus_info NULL | 94 | #define default_mpc_oem_bus_info NULL |
| 100 | #define default_find_smp_config x86_init_uint_noop | 95 | #define default_find_smp_config x86_init_noop |
| 101 | #define default_get_smp_config x86_init_uint_noop | 96 | #define default_get_smp_config x86_init_uint_noop |
| 102 | #endif | 97 | #endif |
| 103 | 98 | ||
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h index 024cf3c1fd82..97e5fb4f3bd3 100644 --- a/arch/x86/include/asm/x86_init.h +++ b/arch/x86/include/asm/x86_init.h | |||
| @@ -26,7 +26,7 @@ struct x86_init_mpparse { | |||
| 26 | void (*smp_read_mpc_oem)(struct mpc_table *mpc); | 26 | void (*smp_read_mpc_oem)(struct mpc_table *mpc); |
| 27 | void (*mpc_oem_pci_bus)(struct mpc_bus *m); | 27 | void (*mpc_oem_pci_bus)(struct mpc_bus *m); |
| 28 | void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); | 28 | void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); |
| 29 | void (*find_smp_config)(unsigned int reserve); | 29 | void (*find_smp_config)(void); |
| 30 | void (*get_smp_config)(unsigned int early); | 30 | void (*get_smp_config)(unsigned int early); |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c index efa00e2b8505..9c0629ceb528 100644 --- a/arch/x86/kernel/apic/numaq_32.c +++ b/arch/x86/kernel/apic/numaq_32.c | |||
| @@ -264,11 +264,6 @@ static void __init smp_read_mpc_oem(struct mpc_table *mpc) | |||
| 264 | static __init void early_check_numaq(void) | 264 | static __init void early_check_numaq(void) |
| 265 | { | 265 | { |
| 266 | /* | 266 | /* |
| 267 | * Find possible boot-time SMP configuration: | ||
| 268 | */ | ||
| 269 | early_find_smp_config(); | ||
| 270 | |||
| 271 | /* | ||
| 272 | * get boot-time SMP configuration: | 267 | * get boot-time SMP configuration: |
| 273 | */ | 268 | */ |
| 274 | if (smp_found_config) | 269 | if (smp_found_config) |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 5be95ef4ffec..35a57c963df9 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
| @@ -667,36 +667,18 @@ void __init default_get_smp_config(unsigned int early) | |||
| 667 | */ | 667 | */ |
| 668 | } | 668 | } |
| 669 | 669 | ||
| 670 | static void __init smp_reserve_bootmem(struct mpf_intel *mpf) | 670 | static void __init smp_reserve_memory(struct mpf_intel *mpf) |
| 671 | { | 671 | { |
| 672 | unsigned long size = get_mpc_size(mpf->physptr); | 672 | unsigned long size = get_mpc_size(mpf->physptr); |
| 673 | #ifdef CONFIG_X86_32 | ||
| 674 | /* | ||
| 675 | * We cannot access to MPC table to compute table size yet, | ||
| 676 | * as only few megabytes from the bottom is mapped now. | ||
| 677 | * PC-9800's MPC table places on the very last of physical | ||
| 678 | * memory; so that simply reserving PAGE_SIZE from mpf->physptr | ||
| 679 | * yields BUG() in reserve_bootmem. | ||
| 680 | * also need to make sure physptr is below than max_low_pfn | ||
| 681 | * we don't need reserve the area above max_low_pfn | ||
| 682 | */ | ||
| 683 | unsigned long end = max_low_pfn * PAGE_SIZE; | ||
| 684 | 673 | ||
| 685 | if (mpf->physptr < end) { | 674 | reserve_early(mpf->physptr, mpf->physptr+size, "MP-table mpc"); |
| 686 | if (mpf->physptr + size > end) | ||
| 687 | size = end - mpf->physptr; | ||
| 688 | reserve_bootmem_generic(mpf->physptr, size, BOOTMEM_DEFAULT); | ||
| 689 | } | ||
| 690 | #else | ||
| 691 | reserve_bootmem_generic(mpf->physptr, size, BOOTMEM_DEFAULT); | ||
| 692 | #endif | ||
| 693 | } | 675 | } |
| 694 | 676 | ||
| 695 | static int __init smp_scan_config(unsigned long base, unsigned long length, | 677 | static int __init smp_scan_config(unsigned long base, unsigned long length) |
| 696 | unsigned reserve) | ||
| 697 | { | 678 | { |
| 698 | unsigned int *bp = phys_to_virt(base); | 679 | unsigned int *bp = phys_to_virt(base); |
| 699 | struct mpf_intel *mpf; | 680 | struct mpf_intel *mpf; |
| 681 | unsigned long mem; | ||
| 700 | 682 | ||
| 701 | apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n", | 683 | apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n", |
| 702 | bp, length); | 684 | bp, length); |
| @@ -717,12 +699,10 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
| 717 | printk(KERN_INFO "found SMP MP-table at [%p] %llx\n", | 699 | printk(KERN_INFO "found SMP MP-table at [%p] %llx\n", |
| 718 | mpf, (u64)virt_to_phys(mpf)); | 700 | mpf, (u64)virt_to_phys(mpf)); |
| 719 | 701 | ||
| 720 | if (!reserve) | 702 | mem = virt_to_phys(mpf); |
| 721 | return 1; | 703 | reserve_early(mem, mem + sizeof(*mpf), "MP-table mpf"); |
| 722 | reserve_bootmem_generic(virt_to_phys(mpf), sizeof(*mpf), | ||
| 723 | BOOTMEM_DEFAULT); | ||
| 724 | if (mpf->physptr) | 704 | if (mpf->physptr) |
| 725 | smp_reserve_bootmem(mpf); | 705 | smp_reserve_memory(mpf); |
| 726 | 706 | ||
| 727 | return 1; | 707 | return 1; |
| 728 | } | 708 | } |
| @@ -732,7 +712,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
| 732 | return 0; | 712 | return 0; |
| 733 | } | 713 | } |
| 734 | 714 | ||
| 735 | void __init default_find_smp_config(unsigned int reserve) | 715 | void __init default_find_smp_config(void) |
| 736 | { | 716 | { |
| 737 | unsigned int address; | 717 | unsigned int address; |
| 738 | 718 | ||
| @@ -744,9 +724,9 @@ void __init default_find_smp_config(unsigned int reserve) | |||
| 744 | * 2) Scan the top 1K of base RAM | 724 | * 2) Scan the top 1K of base RAM |
| 745 | * 3) Scan the 64K of bios | 725 | * 3) Scan the 64K of bios |
| 746 | */ | 726 | */ |
| 747 | if (smp_scan_config(0x0, 0x400, reserve) || | 727 | if (smp_scan_config(0x0, 0x400) || |
| 748 | smp_scan_config(639 * 0x400, 0x400, reserve) || | 728 | smp_scan_config(639 * 0x400, 0x400) || |
| 749 | smp_scan_config(0xF0000, 0x10000, reserve)) | 729 | smp_scan_config(0xF0000, 0x10000)) |
| 750 | return; | 730 | return; |
| 751 | /* | 731 | /* |
| 752 | * If it is an SMP machine we should know now, unless the | 732 | * If it is an SMP machine we should know now, unless the |
| @@ -767,7 +747,7 @@ void __init default_find_smp_config(unsigned int reserve) | |||
| 767 | 747 | ||
| 768 | address = get_bios_ebda(); | 748 | address = get_bios_ebda(); |
| 769 | if (address) | 749 | if (address) |
| 770 | smp_scan_config(address, 0x400, reserve); | 750 | smp_scan_config(address, 0x400); |
| 771 | } | 751 | } |
| 772 | 752 | ||
| 773 | #ifdef CONFIG_X86_IO_APIC | 753 | #ifdef CONFIG_X86_IO_APIC |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index e3eae5965e4a..cdb6a8a506dd 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -913,6 +913,11 @@ void __init setup_arch(char **cmdline_p) | |||
| 913 | 913 | ||
| 914 | early_acpi_boot_init(); | 914 | early_acpi_boot_init(); |
| 915 | 915 | ||
| 916 | /* | ||
| 917 | * Find and reserve possible boot-time SMP configuration: | ||
| 918 | */ | ||
| 919 | find_smp_config(); | ||
| 920 | |||
| 916 | #ifdef CONFIG_ACPI_NUMA | 921 | #ifdef CONFIG_ACPI_NUMA |
| 917 | /* | 922 | /* |
| 918 | * Parse SRAT to discover nodes. | 923 | * Parse SRAT to discover nodes. |
| @@ -927,11 +932,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 927 | 932 | ||
| 928 | initmem_init(0, max_pfn, acpi, k8); | 933 | initmem_init(0, max_pfn, acpi, k8); |
| 929 | 934 | ||
| 930 | /* | ||
| 931 | * Find and reserve possible boot-time SMP configuration: | ||
| 932 | */ | ||
| 933 | find_smp_config(); | ||
| 934 | |||
| 935 | #ifdef CONFIG_X86_64 | 935 | #ifdef CONFIG_X86_64 |
| 936 | /* | 936 | /* |
| 937 | * dma32_reserve_bootmem() allocates bootmem which may conflict | 937 | * dma32_reserve_bootmem() allocates bootmem which may conflict |
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c index f068553a1b17..1498efa964b6 100644 --- a/arch/x86/kernel/visws_quirks.c +++ b/arch/x86/kernel/visws_quirks.c | |||
| @@ -197,7 +197,7 @@ static void __init MP_processor_info(struct mpc_cpu *m) | |||
| 197 | apic_version[m->apicid] = ver; | 197 | apic_version[m->apicid] = ver; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | static void __init visws_find_smp_config(unsigned int reserve) | 200 | static void __init visws_find_smp_config(void) |
| 201 | { | 201 | { |
| 202 | struct mpc_cpu *mp = phys_to_virt(CO_CPU_TAB_PHYS); | 202 | struct mpc_cpu *mp = phys_to_virt(CO_CPU_TAB_PHYS); |
| 203 | unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS)); | 203 | unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS)); |
diff --git a/arch/x86/mm/k8topology_64.c b/arch/x86/mm/k8topology_64.c index b9e2dbfe55c3..970ed579d4e4 100644 --- a/arch/x86/mm/k8topology_64.c +++ b/arch/x86/mm/k8topology_64.c | |||
| @@ -57,18 +57,6 @@ static __init void early_get_boot_cpu_id(void) | |||
| 57 | * need to get boot_cpu_id so can use that to create apicid_to_node | 57 | * need to get boot_cpu_id so can use that to create apicid_to_node |
| 58 | * in k8_scan_nodes() | 58 | * in k8_scan_nodes() |
| 59 | */ | 59 | */ |
| 60 | /* | ||
| 61 | * Find possible boot-time SMP configuration: | ||
| 62 | */ | ||
| 63 | #ifdef CONFIG_X86_MPPARSE | ||
| 64 | early_find_smp_config(); | ||
| 65 | #endif | ||
| 66 | #ifdef CONFIG_ACPI | ||
| 67 | /* | ||
| 68 | * Read APIC information from ACPI tables. | ||
| 69 | */ | ||
| 70 | early_acpi_boot_init(); | ||
| 71 | #endif | ||
| 72 | #ifdef CONFIG_X86_MPPARSE | 60 | #ifdef CONFIG_X86_MPPARSE |
| 73 | /* | 61 | /* |
| 74 | * get boot-time SMP configuration: | 62 | * get boot-time SMP configuration: |
