git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
arch
/
i386
/
kernel
/
cpu
/
common.c
diff --git
a/arch/i386/kernel/cpu/common.c
b/arch/i386/kernel/cpu/common.c
index
7dda85f
..
ad8cc4b
100644
(file)
--- a/
arch/i386/kernel/cpu/common.c
+++ b/
arch/i386/kernel/cpu/common.c
@@
-11,8
+11,6
@@
#include <asm/msr.h>
#include <asm/io.h>
#include <asm/mmu_context.h>
#include <asm/msr.h>
#include <asm/io.h>
#include <asm/mmu_context.h>
-#include <asm/mtrr.h>
-#include <asm/mce.h>
#ifdef CONFIG_X86_LOCAL_APIC
#include <asm/mpspec.h>
#include <asm/apic.h>
#ifdef CONFIG_X86_LOCAL_APIC
#include <asm/mpspec.h>
#include <asm/apic.h>
@@
-294,7
+292,7
@@
void __cpuinit generic_identify(struct cpuinfo_x86 * c)
if (c->x86 >= 0x6)
c->x86_model += ((tfms >> 16) & 0xF) << 4;
c->x86_mask = tfms & 15;
if (c->x86 >= 0x6)
c->x86_model += ((tfms >> 16) & 0xF) << 4;
c->x86_mask = tfms & 15;
-#ifdef CONFIG_
X86_HT
+#ifdef CONFIG_
SMP
c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0);
#else
c->apicid = (ebx >> 24) & 0xFF;
c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0);
#else
c->apicid = (ebx >> 24) & 0xFF;
@@
-319,7
+317,7
@@
void __cpuinit generic_identify(struct cpuinfo_x86 * c)
early_intel_workaround(c);
#ifdef CONFIG_X86_HT
early_intel_workaround(c);
#ifdef CONFIG_X86_HT
-
c->phys_proc_id
= (cpuid_ebx(1) >> 24) & 0xff;
+
phys_proc_id[smp_processor_id()]
= (cpuid_ebx(1) >> 24) & 0xff;
#endif
}
#endif
}
@@
-484,9
+482,11
@@
void __cpuinit detect_ht(struct cpuinfo_x86 *c)
{
u32 eax, ebx, ecx, edx;
int index_msb, core_bits;
{
u32 eax, ebx, ecx, edx;
int index_msb, core_bits;
+ int cpu = smp_processor_id();
cpuid(1, &eax, &ebx, &ecx, &edx);
cpuid(1, &eax, &ebx, &ecx, &edx);
+
if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY))
return;
if (!cpu_has(c, X86_FEATURE_HT) || cpu_has(c, X86_FEATURE_CMP_LEGACY))
return;
@@
-497,17
+497,16
@@
void __cpuinit detect_ht(struct cpuinfo_x86 *c)
} else if (smp_num_siblings > 1 ) {
if (smp_num_siblings > NR_CPUS) {
} else if (smp_num_siblings > 1 ) {
if (smp_num_siblings > NR_CPUS) {
- printk(KERN_WARNING "CPU: Unsupported number of the "
- "siblings %d", smp_num_siblings);
+ printk(KERN_WARNING "CPU: Unsupported number of the siblings %d", smp_num_siblings);
smp_num_siblings = 1;
return;
}
index_msb = get_count_order(smp_num_siblings);
smp_num_siblings = 1;
return;
}
index_msb = get_count_order(smp_num_siblings);
-
c->phys_proc_id
= phys_pkg_id((ebx >> 24) & 0xFF, index_msb);
+
phys_proc_id[cpu]
= phys_pkg_id((ebx >> 24) & 0xFF, index_msb);
printk(KERN_INFO "CPU: Physical Processor ID: %d\n",
printk(KERN_INFO "CPU: Physical Processor ID: %d\n",
-
c->phys_proc_id
);
+
phys_proc_id[cpu]
);
smp_num_siblings = smp_num_siblings / c->x86_max_cores;
smp_num_siblings = smp_num_siblings / c->x86_max_cores;
@@
-515,12
+514,12
@@
void __cpuinit detect_ht(struct cpuinfo_x86 *c)
core_bits = get_count_order(c->x86_max_cores);
core_bits = get_count_order(c->x86_max_cores);
- c
->cpu_core_id
= phys_pkg_id((ebx >> 24) & 0xFF, index_msb) &
+ c
pu_core_id[cpu]
= phys_pkg_id((ebx >> 24) & 0xFF, index_msb) &
((1 << core_bits) - 1);
if (c->x86_max_cores > 1)
printk(KERN_INFO "CPU: Processor Core ID: %d\n",
((1 << core_bits) - 1);
if (c->x86_max_cores > 1)
printk(KERN_INFO "CPU: Processor Core ID: %d\n",
- c
->cpu_core_id
);
+ c
pu_core_id[cpu]
);
}
}
#endif
}
}
#endif
@@
-619,12
+618,6
@@
void __cpuinit cpu_init(void)
set_in_cr4(X86_CR4_TSD);
}
set_in_cr4(X86_CR4_TSD);
}
- /* The CPU hotplug case */
- if (cpu_gdt_descr->address) {
- gdt = (struct desc_struct *)cpu_gdt_descr->address;
- memset(gdt, 0, PAGE_SIZE);
- goto old_gdt;
- }
/*
* This is a horrible hack to allocate the GDT. The problem
* is that cpu_init() is called really early for the boot CPU
/*
* This is a horrible hack to allocate the GDT. The problem
* is that cpu_init() is called really early for the boot CPU
@@
-643,7
+636,7
@@
void __cpuinit cpu_init(void)
local_irq_enable();
}
}
local_irq_enable();
}
}
-old_gdt:
+
/*
* Initialize the per-CPU GDT with the boot GDT,
* and set up the GDT descriptor:
/*
* Initialize the per-CPU GDT with the boot GDT,
* and set up the GDT descriptor: