diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/Kconfig | 3 | ||||
-rw-r--r-- | arch/i386/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/i386/kernel/acpi/boot.c | 3 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/common.c | 32 | ||||
-rw-r--r-- | arch/i386/kernel/cpu/transmeta.c | 1 | ||||
-rw-r--r-- | arch/i386/kernel/efi.c | 12 | ||||
-rw-r--r-- | arch/i386/kernel/head.S | 2 | ||||
-rw-r--r-- | arch/i386/kernel/i386_ksyms.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/io_apic.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/kprobes.c | 16 | ||||
-rw-r--r-- | arch/i386/kernel/mpparse.c | 12 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/topology.c (renamed from arch/i386/mach-default/topology.c) | 6 | ||||
-rw-r--r-- | arch/i386/mach-default/Makefile | 2 | ||||
-rw-r--r-- | arch/i386/mach-voyager/voyager_basic.c | 3 | ||||
-rw-r--r-- | arch/i386/mach-voyager/voyager_smp.c | 1 |
16 files changed, 73 insertions, 36 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 0afec8566e7b..5b1a7d46d1d9 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -733,7 +733,7 @@ config PHYSICAL_START | |||
733 | 733 | ||
734 | config HOTPLUG_CPU | 734 | config HOTPLUG_CPU |
735 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 735 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" |
736 | depends on SMP && HOTPLUG && EXPERIMENTAL | 736 | depends on SMP && HOTPLUG && EXPERIMENTAL && !X86_VOYAGER |
737 | ---help--- | 737 | ---help--- |
738 | Say Y here to experiment with turning CPUs off and on. CPUs | 738 | Say Y here to experiment with turning CPUs off and on. CPUs |
739 | can be controlled through /sys/devices/system/cpu. | 739 | can be controlled through /sys/devices/system/cpu. |
@@ -1060,6 +1060,7 @@ source "arch/i386/oprofile/Kconfig" | |||
1060 | 1060 | ||
1061 | config KPROBES | 1061 | config KPROBES |
1062 | bool "Kprobes (EXPERIMENTAL)" | 1062 | bool "Kprobes (EXPERIMENTAL)" |
1063 | depends on EXPERIMENTAL && MODULES | ||
1063 | help | 1064 | help |
1064 | Kprobes allows you to trap at almost any kernel address and | 1065 | Kprobes allows you to trap at almost any kernel address and |
1065 | execute a callback function. register_kprobe() establishes | 1066 | execute a callback function. register_kprobe() establishes |
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 60c3f76dfca4..53bb9a79e274 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds | |||
7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ | 7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ |
8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ | 8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ |
9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ | 9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ |
10 | quirks.o i8237.o | 10 | quirks.o i8237.o topology.o |
11 | 11 | ||
12 | obj-y += cpu/ | 12 | obj-y += cpu/ |
13 | obj-y += timers/ | 13 | obj-y += timers/ |
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 79577f0ace98..8309a7b2cd63 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -44,9 +44,6 @@ extern void __init clustered_apic_check(void); | |||
44 | extern int gsi_irq_sharing(int gsi); | 44 | extern int gsi_irq_sharing(int gsi); |
45 | #include <asm/proto.h> | 45 | #include <asm/proto.h> |
46 | 46 | ||
47 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) { return 0; } | ||
48 | |||
49 | |||
50 | #else /* X86 */ | 47 | #else /* X86 */ |
51 | 48 | ||
52 | #ifdef CONFIG_X86_LOCAL_APIC | 49 | #ifdef CONFIG_X86_LOCAL_APIC |
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 7eb9213734a3..4ecd4b326ded 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/smp.h> | 4 | #include <linux/smp.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/percpu.h> | 6 | #include <linux/percpu.h> |
7 | #include <linux/bootmem.h> | ||
7 | #include <asm/semaphore.h> | 8 | #include <asm/semaphore.h> |
8 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
9 | #include <asm/i387.h> | 10 | #include <asm/i387.h> |
@@ -18,6 +19,9 @@ | |||
18 | 19 | ||
19 | #include "cpu.h" | 20 | #include "cpu.h" |
20 | 21 | ||
22 | DEFINE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr); | ||
23 | EXPORT_PER_CPU_SYMBOL(cpu_gdt_descr); | ||
24 | |||
21 | DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); | 25 | DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); |
22 | EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack); | 26 | EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack); |
23 | 27 | ||
@@ -571,8 +575,9 @@ void __devinit cpu_init(void) | |||
571 | int cpu = smp_processor_id(); | 575 | int cpu = smp_processor_id(); |
572 | struct tss_struct * t = &per_cpu(init_tss, cpu); | 576 | struct tss_struct * t = &per_cpu(init_tss, cpu); |
573 | struct thread_struct *thread = ¤t->thread; | 577 | struct thread_struct *thread = ¤t->thread; |
574 | struct desc_struct *gdt = get_cpu_gdt_table(cpu); | 578 | struct desc_struct *gdt; |
575 | __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu); | 579 | __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu); |
580 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); | ||
576 | 581 | ||
577 | if (cpu_test_and_set(cpu, cpu_initialized)) { | 582 | if (cpu_test_and_set(cpu, cpu_initialized)) { |
578 | printk(KERN_WARNING "CPU#%d already initialized!\n", cpu); | 583 | printk(KERN_WARNING "CPU#%d already initialized!\n", cpu); |
@@ -590,6 +595,25 @@ void __devinit cpu_init(void) | |||
590 | } | 595 | } |
591 | 596 | ||
592 | /* | 597 | /* |
598 | * This is a horrible hack to allocate the GDT. The problem | ||
599 | * is that cpu_init() is called really early for the boot CPU | ||
600 | * (and hence needs bootmem) but much later for the secondary | ||
601 | * CPUs, when bootmem will have gone away | ||
602 | */ | ||
603 | if (NODE_DATA(0)->bdata->node_bootmem_map) { | ||
604 | gdt = (struct desc_struct *)alloc_bootmem_pages(PAGE_SIZE); | ||
605 | /* alloc_bootmem_pages panics on failure, so no check */ | ||
606 | memset(gdt, 0, PAGE_SIZE); | ||
607 | } else { | ||
608 | gdt = (struct desc_struct *)get_zeroed_page(GFP_KERNEL); | ||
609 | if (unlikely(!gdt)) { | ||
610 | printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu); | ||
611 | for (;;) | ||
612 | local_irq_enable(); | ||
613 | } | ||
614 | } | ||
615 | |||
616 | /* | ||
593 | * Initialize the per-CPU GDT with the boot GDT, | 617 | * Initialize the per-CPU GDT with the boot GDT, |
594 | * and set up the GDT descriptor: | 618 | * and set up the GDT descriptor: |
595 | */ | 619 | */ |
@@ -601,10 +625,10 @@ void __devinit cpu_init(void) | |||
601 | ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) | | 625 | ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) | |
602 | (CPU_16BIT_STACK_SIZE - 1); | 626 | (CPU_16BIT_STACK_SIZE - 1); |
603 | 627 | ||
604 | cpu_gdt_descr[cpu].size = GDT_SIZE - 1; | 628 | cpu_gdt_descr->size = GDT_SIZE - 1; |
605 | cpu_gdt_descr[cpu].address = (unsigned long)gdt; | 629 | cpu_gdt_descr->address = (unsigned long)gdt; |
606 | 630 | ||
607 | load_gdt(&cpu_gdt_descr[cpu]); | 631 | load_gdt(cpu_gdt_descr); |
608 | load_idt(&idt_descr); | 632 | load_idt(&idt_descr); |
609 | 633 | ||
610 | /* | 634 | /* |
diff --git a/arch/i386/kernel/cpu/transmeta.c b/arch/i386/kernel/cpu/transmeta.c index bdbeb77f4e22..7214c9b577ab 100644 --- a/arch/i386/kernel/cpu/transmeta.c +++ b/arch/i386/kernel/cpu/transmeta.c | |||
@@ -1,4 +1,5 @@ | |||
1 | #include <linux/kernel.h> | 1 | #include <linux/kernel.h> |
2 | #include <linux/mm.h> | ||
2 | #include <linux/init.h> | 3 | #include <linux/init.h> |
3 | #include <asm/processor.h> | 4 | #include <asm/processor.h> |
4 | #include <asm/msr.h> | 5 | #include <asm/msr.h> |
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index ecad519fd395..e3e42fd62401 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c | |||
@@ -103,17 +103,19 @@ static void efi_call_phys_prelog(void) | |||
103 | */ | 103 | */ |
104 | local_flush_tlb(); | 104 | local_flush_tlb(); |
105 | 105 | ||
106 | cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address); | 106 | per_cpu(cpu_gdt_descr, 0).address = |
107 | load_gdt((struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0])); | 107 | __pa(per_cpu(cpu_gdt_descr, 0).address); |
108 | load_gdt((struct Xgt_desc_struct *)__pa(&per_cpu(cpu_gdt_descr, 0))); | ||
108 | } | 109 | } |
109 | 110 | ||
110 | static void efi_call_phys_epilog(void) | 111 | static void efi_call_phys_epilog(void) |
111 | { | 112 | { |
112 | unsigned long cr4; | 113 | unsigned long cr4; |
113 | 114 | ||
114 | cpu_gdt_descr[0].address = | 115 | per_cpu(cpu_gdt_descr, 0).address = |
115 | (unsigned long) __va(cpu_gdt_descr[0].address); | 116 | (unsigned long)__va(per_cpu(cpu_gdt_descr, 0).address); |
116 | load_gdt(&cpu_gdt_descr[0]); | 117 | load_gdt((struct Xgt_desc_struct *)__va(&per_cpu(cpu_gdt_descr, 0))); |
118 | |||
117 | cr4 = read_cr4(); | 119 | cr4 = read_cr4(); |
118 | 120 | ||
119 | if (cr4 & X86_CR4_PSE) { | 121 | if (cr4 & X86_CR4_PSE) { |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 2bee6499edd9..e0b7c632efbc 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -534,5 +534,3 @@ ENTRY(cpu_gdt_table) | |||
534 | .quad 0x0000000000000000 /* 0xf0 - unused */ | 534 | .quad 0x0000000000000000 /* 0xf0 - unused */ |
535 | .quad 0x0000000000000000 /* 0xf8 - GDT entry 31: double-fault TSS */ | 535 | .quad 0x0000000000000000 /* 0xf8 - GDT entry 31: double-fault TSS */ |
536 | 536 | ||
537 | /* Be sure this is zeroed to avoid false validations in Xen */ | ||
538 | .fill PAGE_SIZE_asm / 8 - GDT_ENTRIES,8,0 | ||
diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c index 3999bec50c33..055325056a74 100644 --- a/arch/i386/kernel/i386_ksyms.c +++ b/arch/i386/kernel/i386_ksyms.c | |||
@@ -3,8 +3,6 @@ | |||
3 | #include <asm/checksum.h> | 3 | #include <asm/checksum.h> |
4 | #include <asm/desc.h> | 4 | #include <asm/desc.h> |
5 | 5 | ||
6 | EXPORT_SYMBOL_GPL(cpu_gdt_descr); | ||
7 | |||
8 | EXPORT_SYMBOL(__down_failed); | 6 | EXPORT_SYMBOL(__down_failed); |
9 | EXPORT_SYMBOL(__down_failed_interruptible); | 7 | EXPORT_SYMBOL(__down_failed_interruptible); |
10 | EXPORT_SYMBOL(__down_failed_trylock); | 8 | EXPORT_SYMBOL(__down_failed_trylock); |
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index f2dd218d88cb..235822b3f41b 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
@@ -2566,8 +2566,10 @@ int __init io_apic_get_unique_id (int ioapic, int apic_id) | |||
2566 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2566 | spin_unlock_irqrestore(&ioapic_lock, flags); |
2567 | 2567 | ||
2568 | /* Sanity check */ | 2568 | /* Sanity check */ |
2569 | if (reg_00.bits.ID != apic_id) | 2569 | if (reg_00.bits.ID != apic_id) { |
2570 | panic("IOAPIC[%d]: Unable change apic_id!\n", ioapic); | 2570 | printk("IOAPIC[%d]: Unable to change apic_id!\n", ioapic); |
2571 | return -1; | ||
2572 | } | ||
2571 | } | 2573 | } |
2572 | 2574 | ||
2573 | apic_printk(APIC_VERBOSE, KERN_INFO | 2575 | apic_printk(APIC_VERBOSE, KERN_INFO |
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c index 6483eeb1a4e8..694a13997637 100644 --- a/arch/i386/kernel/kprobes.c +++ b/arch/i386/kernel/kprobes.c | |||
@@ -58,6 +58,11 @@ static inline int is_IF_modifier(kprobe_opcode_t opcode) | |||
58 | 58 | ||
59 | int __kprobes arch_prepare_kprobe(struct kprobe *p) | 59 | int __kprobes arch_prepare_kprobe(struct kprobe *p) |
60 | { | 60 | { |
61 | /* insn: must be on special executable page on i386. */ | ||
62 | p->ainsn.insn = get_insn_slot(); | ||
63 | if (!p->ainsn.insn) | ||
64 | return -ENOMEM; | ||
65 | |||
61 | memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); | 66 | memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t)); |
62 | p->opcode = *p->addr; | 67 | p->opcode = *p->addr; |
63 | return 0; | 68 | return 0; |
@@ -77,6 +82,13 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
77 | (unsigned long) p->addr + sizeof(kprobe_opcode_t)); | 82 | (unsigned long) p->addr + sizeof(kprobe_opcode_t)); |
78 | } | 83 | } |
79 | 84 | ||
85 | void __kprobes arch_remove_kprobe(struct kprobe *p) | ||
86 | { | ||
87 | down(&kprobe_mutex); | ||
88 | free_insn_slot(p->ainsn.insn); | ||
89 | up(&kprobe_mutex); | ||
90 | } | ||
91 | |||
80 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 92 | static inline void save_previous_kprobe(struct kprobe_ctlblk *kcb) |
81 | { | 93 | { |
82 | kcb->prev_kprobe.kp = kprobe_running(); | 94 | kcb->prev_kprobe.kp = kprobe_running(); |
@@ -111,7 +123,7 @@ static inline void prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | |||
111 | if (p->opcode == BREAKPOINT_INSTRUCTION) | 123 | if (p->opcode == BREAKPOINT_INSTRUCTION) |
112 | regs->eip = (unsigned long)p->addr; | 124 | regs->eip = (unsigned long)p->addr; |
113 | else | 125 | else |
114 | regs->eip = (unsigned long)&p->ainsn.insn; | 126 | regs->eip = (unsigned long)p->ainsn.insn; |
115 | } | 127 | } |
116 | 128 | ||
117 | /* Called with kretprobe_lock held */ | 129 | /* Called with kretprobe_lock held */ |
@@ -351,7 +363,7 @@ static void __kprobes resume_execution(struct kprobe *p, | |||
351 | { | 363 | { |
352 | unsigned long *tos = (unsigned long *)®s->esp; | 364 | unsigned long *tos = (unsigned long *)®s->esp; |
353 | unsigned long next_eip = 0; | 365 | unsigned long next_eip = 0; |
354 | unsigned long copy_eip = (unsigned long)&p->ainsn.insn; | 366 | unsigned long copy_eip = (unsigned long)p->ainsn.insn; |
355 | unsigned long orig_eip = (unsigned long)p->addr; | 367 | unsigned long orig_eip = (unsigned long)p->addr; |
356 | 368 | ||
357 | switch (p->ainsn.insn[0]) { | 369 | switch (p->ainsn.insn[0]) { |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 0102f3d50e57..e6e2f43db85e 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -710,7 +710,7 @@ void __init get_smp_config (void) | |||
710 | * Read the physical hardware table. Anything here will | 710 | * Read the physical hardware table. Anything here will |
711 | * override the defaults. | 711 | * override the defaults. |
712 | */ | 712 | */ |
713 | if (!smp_read_mpc((void *)mpf->mpf_physptr)) { | 713 | if (!smp_read_mpc(phys_to_virt(mpf->mpf_physptr))) { |
714 | smp_found_config = 0; | 714 | smp_found_config = 0; |
715 | printk(KERN_ERR "BIOS bug, MP table errors detected!...\n"); | 715 | printk(KERN_ERR "BIOS bug, MP table errors detected!...\n"); |
716 | printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n"); | 716 | printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n"); |
@@ -915,6 +915,7 @@ void __init mp_register_ioapic ( | |||
915 | u32 gsi_base) | 915 | u32 gsi_base) |
916 | { | 916 | { |
917 | int idx = 0; | 917 | int idx = 0; |
918 | int tmpid; | ||
918 | 919 | ||
919 | if (nr_ioapics >= MAX_IO_APICS) { | 920 | if (nr_ioapics >= MAX_IO_APICS) { |
920 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " | 921 | printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " |
@@ -935,9 +936,14 @@ void __init mp_register_ioapic ( | |||
935 | 936 | ||
936 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); | 937 | set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address); |
937 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) | 938 | if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 < 15)) |
938 | mp_ioapics[idx].mpc_apicid = io_apic_get_unique_id(idx, id); | 939 | tmpid = io_apic_get_unique_id(idx, id); |
939 | else | 940 | else |
940 | mp_ioapics[idx].mpc_apicid = id; | 941 | tmpid = id; |
942 | if (tmpid == -1) { | ||
943 | nr_ioapics--; | ||
944 | return; | ||
945 | } | ||
946 | mp_ioapics[idx].mpc_apicid = tmpid; | ||
941 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); | 947 | mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx); |
942 | 948 | ||
943 | /* | 949 | /* |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index fb00ab7b7612..eba7f53f8b4a 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -898,12 +898,6 @@ static int __devinit do_boot_cpu(int apicid, int cpu) | |||
898 | unsigned long start_eip; | 898 | unsigned long start_eip; |
899 | unsigned short nmi_high = 0, nmi_low = 0; | 899 | unsigned short nmi_high = 0, nmi_low = 0; |
900 | 900 | ||
901 | if (!cpu_gdt_descr[cpu].address && | ||
902 | !(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) { | ||
903 | printk("Failed to allocate GDT for CPU %d\n", cpu); | ||
904 | return 1; | ||
905 | } | ||
906 | |||
907 | ++cpucount; | 901 | ++cpucount; |
908 | 902 | ||
909 | /* | 903 | /* |
diff --git a/arch/i386/mach-default/topology.c b/arch/i386/kernel/topology.c index b64314069e78..67a0e1baa28b 100644 --- a/arch/i386/mach-default/topology.c +++ b/arch/i386/kernel/topology.c | |||
@@ -1,12 +1,12 @@ | |||
1 | /* | 1 | /* |
2 | * arch/i386/mach-generic/topology.c - Populate driverfs with topology information | 2 | * arch/i386/kernel/topology.c - Populate driverfs with topology information |
3 | * | 3 | * |
4 | * Written by: Matthew Dobson, IBM Corporation | 4 | * Written by: Matthew Dobson, IBM Corporation |
5 | * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL | 5 | * Original Code: Paul Dorwin, IBM Corporation, Patrick Mochel, OSDL |
6 | * | 6 | * |
7 | * Copyright (C) 2002, IBM Corp. | 7 | * Copyright (C) 2002, IBM Corp. |
8 | * | 8 | * |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * This program is free software; you can redistribute it and/or modify | 11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 12 | * it under the terms of the GNU General Public License as published by |
@@ -34,7 +34,7 @@ static struct i386_cpu cpu_devices[NR_CPUS]; | |||
34 | 34 | ||
35 | int arch_register_cpu(int num){ | 35 | int arch_register_cpu(int num){ |
36 | struct node *parent = NULL; | 36 | struct node *parent = NULL; |
37 | 37 | ||
38 | #ifdef CONFIG_NUMA | 38 | #ifdef CONFIG_NUMA |
39 | int node = cpu_to_node(num); | 39 | int node = cpu_to_node(num); |
40 | if (node_online(node)) | 40 | if (node_online(node)) |
diff --git a/arch/i386/mach-default/Makefile b/arch/i386/mach-default/Makefile index e95bb0237921..012fe34459e6 100644 --- a/arch/i386/mach-default/Makefile +++ b/arch/i386/mach-default/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := setup.o topology.o | 5 | obj-y := setup.o |
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index aa49a33a572c..b584060ec004 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/reboot.h> | 24 | #include <linux/reboot.h> |
25 | #include <linux/sysrq.h> | 25 | #include <linux/sysrq.h> |
26 | #include <linux/smp.h> | ||
27 | #include <linux/nodemask.h> | ||
26 | #include <asm/io.h> | 28 | #include <asm/io.h> |
27 | #include <asm/voyager.h> | 29 | #include <asm/voyager.h> |
28 | #include <asm/vic.h> | 30 | #include <asm/vic.h> |
@@ -328,4 +330,3 @@ void machine_power_off(void) | |||
328 | if (pm_power_off) | 330 | if (pm_power_off) |
329 | pm_power_off(); | 331 | pm_power_off(); |
330 | } | 332 | } |
331 | |||
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 6e4c3baef6cc..8165626a5c30 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -402,6 +402,7 @@ find_smp_config(void) | |||
402 | cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8; | 402 | cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8; |
403 | cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 2) << 16; | 403 | cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 2) << 16; |
404 | cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 3) << 24; | 404 | cpus_addr(phys_cpu_present_map)[0] |= voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 3) << 24; |
405 | cpu_possible_map = phys_cpu_present_map; | ||
405 | printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", cpus_addr(phys_cpu_present_map)[0]); | 406 | printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", cpus_addr(phys_cpu_present_map)[0]); |
406 | /* Here we set up the VIC to enable SMP */ | 407 | /* Here we set up the VIC to enable SMP */ |
407 | /* enable the CPIs by writing the base vector to their register */ | 408 | /* enable the CPIs by writing the base vector to their register */ |