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
linux 2.6.16.38 w/ vs2.0.3-rc1
[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
ad8cc4b
..
e6bd095
100644
(file)
--- a/
arch/i386/kernel/cpu/common.c
+++ b/
arch/i386/kernel/cpu/common.c
@@
-25,10
+25,9
@@
EXPORT_PER_CPU_SYMBOL(cpu_gdt_descr);
DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
DEFINE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);
EXPORT_PER_CPU_SYMBOL(cpu_16bit_stack);
-static int cachesize_override __cpuinitdata = -1;
-static int disable_x86_fxsr __cpuinitdata;
-static int disable_x86_serial_nr __cpuinitdata = 1;
-static int disable_x86_sep __cpuinitdata;
+static int cachesize_override __devinitdata = -1;
+static int disable_x86_fxsr __devinitdata = 0;
+static int disable_x86_serial_nr __devinitdata = 1;
struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
@@
-60,7
+59,7
@@
static int __init cachesize_setup(char *str)
}
__setup("cachesize=", cachesize_setup);
}
__setup("cachesize=", cachesize_setup);
-int __
cpu
init get_model_name(struct cpuinfo_x86 *c)
+int __
dev
init get_model_name(struct cpuinfo_x86 *c)
{
unsigned int *v;
char *p, *q;
{
unsigned int *v;
char *p, *q;
@@
-90,7
+89,7
@@
int __cpuinit get_model_name(struct cpuinfo_x86 *c)
}
}
-void __
cpu
init display_cacheinfo(struct cpuinfo_x86 *c)
+void __
dev
init display_cacheinfo(struct cpuinfo_x86 *c)
{
unsigned int n, dummy, ecx, edx, l2size;
{
unsigned int n, dummy, ecx, edx, l2size;
@@
-131,7
+130,7
@@
void __cpuinit display_cacheinfo(struct cpuinfo_x86 *c)
/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
/* Look up CPU names by table lookup. */
/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
/* Look up CPU names by table lookup. */
-static char __
cpu
init *table_lookup_model(struct cpuinfo_x86 *c)
+static char __
dev
init *table_lookup_model(struct cpuinfo_x86 *c)
{
struct cpu_model_info *info;
{
struct cpu_model_info *info;
@@
-152,7
+151,7
@@
static char __cpuinit *table_lookup_model(struct cpuinfo_x86 *c)
}
}
-static void __
cpu
init get_cpu_vendor(struct cpuinfo_x86 *c, int early)
+static void __
dev
init get_cpu_vendor(struct cpuinfo_x86 *c, int early)
{
char *v = c->x86_vendor_id;
int i;
{
char *v = c->x86_vendor_id;
int i;
@@
-188,14
+187,6
@@
static int __init x86_fxsr_setup(char * s)
__setup("nofxsr", x86_fxsr_setup);
__setup("nofxsr", x86_fxsr_setup);
-static int __init x86_sep_setup(char * s)
-{
- disable_x86_sep = 1;
- return 1;
-}
-__setup("nosep", x86_sep_setup);
-
-
/* Standard macro to see if a specific flag is changeable */
static inline int flag_is_changeable_p(u32 flag)
{
/* Standard macro to see if a specific flag is changeable */
static inline int flag_is_changeable_p(u32 flag)
{
@@
-219,7
+210,7
@@
static inline int flag_is_changeable_p(u32 flag)
/* Probe for the CPUID instruction */
/* Probe for the CPUID instruction */
-static int __
cpu
init have_cpuid_p(void)
+static int __
dev
init have_cpuid_p(void)
{
return flag_is_changeable_p(X86_EFLAGS_ID);
}
{
return flag_is_changeable_p(X86_EFLAGS_ID);
}
@@
-263,10
+254,10
@@
static void __init early_cpu_detect(void)
}
}
}
}
-void __
cpu
init generic_identify(struct cpuinfo_x86 * c)
+void __
dev
init generic_identify(struct cpuinfo_x86 * c)
{
u32 tfms, xlvl;
{
u32 tfms, xlvl;
- int
ebx
;
+ int
junk
;
if (have_cpuid_p()) {
/* Get vendor name */
if (have_cpuid_p()) {
/* Get vendor name */
@@
-282,7
+273,7
@@
void __cpuinit generic_identify(struct cpuinfo_x86 * c)
/* Intel-defined flags: level 0x00000001 */
if ( c->cpuid_level >= 0x00000001 ) {
u32 capability, excap;
/* Intel-defined flags: level 0x00000001 */
if ( c->cpuid_level >= 0x00000001 ) {
u32 capability, excap;
- cpuid(0x00000001, &tfms, &
ebx
, &excap, &capability);
+ cpuid(0x00000001, &tfms, &
junk
, &excap, &capability);
c->x86_capability[0] = capability;
c->x86_capability[4] = excap;
c->x86 = (tfms >> 8) & 15;
c->x86_capability[0] = capability;
c->x86_capability[4] = excap;
c->x86 = (tfms >> 8) & 15;
@@
-292,11
+283,6
@@
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_SMP
- c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0);
-#else
- c->apicid = (ebx >> 24) & 0xFF;
-#endif
} else {
/* Have CPUID level 0 only - unheard of */
c->x86 = 4;
} else {
/* Have CPUID level 0 only - unheard of */
c->x86 = 4;
@@
-321,7
+307,7
@@
void __cpuinit generic_identify(struct cpuinfo_x86 * c)
#endif
}
#endif
}
-static void __
cpu
init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
+static void __
dev
init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
{
if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) {
/* Disable processor serial number */
{
if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) {
/* Disable processor serial number */
@@
-349,7
+335,7
@@
__setup("serialnumber", x86_serial_nr_setup);
/*
* This does the hard work of actually picking apart the CPU stuff...
*/
/*
* This does the hard work of actually picking apart the CPU stuff...
*/
-void __
cpu
init identify_cpu(struct cpuinfo_x86 *c)
+void __
dev
init identify_cpu(struct cpuinfo_x86 *c)
{
int i;
{
int i;
@@
-419,20
+405,9
@@
void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
clear_bit(X86_FEATURE_XMM, c->x86_capability);
}
clear_bit(X86_FEATURE_XMM, c->x86_capability);
}
- /* SEP disabled? */
- if (disable_x86_sep)
- clear_bit(X86_FEATURE_SEP, c->x86_capability);
-
if (disable_pse)
clear_bit(X86_FEATURE_PSE, c->x86_capability);
if (disable_pse)
clear_bit(X86_FEATURE_PSE, c->x86_capability);
- if (exec_shield != 0) {
-#ifdef CONFIG_HIGHMEM64G /* NX implies PAE */
- if (!test_bit(X86_FEATURE_NX, c->x86_capability))
-#endif
- clear_bit(X86_FEATURE_SEP, c->x86_capability);
- }
-
/* If the model name is still unset, do table lookup. */
if ( !c->x86_model_id[0] ) {
char *p;
/* If the model name is still unset, do table lookup. */
if ( !c->x86_model_id[0] ) {
char *p;
@@
-442,7
+417,7
@@
void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
else
/* Last resort... */
sprintf(c->x86_model_id, "%02x/%02x",
else
/* Last resort... */
sprintf(c->x86_model_id, "%02x/%02x",
- c->x86, c->x86_model);
+ c->x86
_vendor
, c->x86_model);
}
/* Now the feature flags better reflect actual CPU features! */
}
/* Now the feature flags better reflect actual CPU features! */
@@
-478,7
+453,7
@@
void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
}
#ifdef CONFIG_X86_HT
}
#ifdef CONFIG_X86_HT
-void __
cpu
init detect_ht(struct cpuinfo_x86 *c)
+void __
dev
init 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;
@@
-486,6
+461,7
@@
void __cpuinit detect_ht(struct cpuinfo_x86 *c)
cpuid(1, &eax, &ebx, &ecx, &edx);
cpuid(1, &eax, &ebx, &ecx, &edx);
+ c->apicid = phys_pkg_id((ebx >> 24) & 0xFF, 0);
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;
@@
-524,7
+500,7
@@
void __cpuinit detect_ht(struct cpuinfo_x86 *c)
}
#endif
}
#endif
-void __
cpu
init print_cpu_info(struct cpuinfo_x86 *c)
+void __
dev
init print_cpu_info(struct cpuinfo_x86 *c)
{
char *vendor = NULL;
{
char *vendor = NULL;
@@
-547,7
+523,7
@@
void __cpuinit print_cpu_info(struct cpuinfo_x86 *c)
printk("\n");
}
printk("\n");
}
-cpumask_t cpu_initialized __
cpu
initdata = CPU_MASK_NONE;
+cpumask_t cpu_initialized __
dev
initdata = CPU_MASK_NONE;
/* This is hacky. :)
* We're emulating future behavior.
/* This is hacky. :)
* We're emulating future behavior.
@@
-594,7
+570,7
@@
void __init early_cpu_init(void)
* and IDT. We reload them nevertheless, this function acts as a
* 'CPU state barrier', nothing should get across.
*/
* and IDT. We reload them nevertheless, this function acts as a
* 'CPU state barrier', nothing should get across.
*/
-void __
cpu
init cpu_init(void)
+void __
dev
init cpu_init(void)
{
int cpu = smp_processor_id();
struct tss_struct * t = &per_cpu(init_tss, cpu);
{
int cpu = smp_processor_id();
struct tss_struct * t = &per_cpu(init_tss, cpu);
@@
-694,7
+670,7
@@
void __cpuinit cpu_init(void)
}
#ifdef CONFIG_HOTPLUG_CPU
}
#ifdef CONFIG_HOTPLUG_CPU
-void __
cpu
init cpu_uninit(void)
+void __
dev
init cpu_uninit(void)
{
int cpu = raw_smp_processor_id();
cpu_clear(cpu, cpu_initialized);
{
int cpu = raw_smp_processor_id();
cpu_clear(cpu, cpu_initialized);