From 903181db29e2325ccb82245a5088cfc49464e5cc Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 6 Sep 2008 01:52:28 -0700 Subject: [PATCH] --- yaml --- r: 112831 b: refs/heads/master c: e3224234717b4228c235cee401af89212f17a3a4 h: refs/heads/master i: 112829: a4b328fc90166c8fc5523b7266db4b92f62e8f8b 112827: 2a6d0badc15ee5c1089b0aa9994287a891657e51 112823: 70b4b1a7b6cb0718b423eb9488eb310fe2988f45 112815: cbed35eed02d57ca63f40b9e678798e3b0e545a1 112799: d82191d9955e5faeddb882f3fb3faf748207aee9 112767: 78d2889797acfa67dfe287fff6ea12d95606e681 v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/cpu/amd.c | 7 ++----- trunk/arch/x86/kernel/cpu/amd_64.c | 2 ++ trunk/arch/x86/kernel/cpu/centaur_64.c | 2 ++ trunk/arch/x86/kernel/cpu/common.c | 7 ++++--- trunk/arch/x86/kernel/cpu/intel_64.c | 2 ++ 6 files changed, 13 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index f2e14499d402..dd53307c4748 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1b05d60d60e81c6594da8298107a05b506f01797 +refs/heads/master: e3224234717b4228c235cee401af89212f17a3a4 diff --git a/trunk/arch/x86/kernel/cpu/amd.c b/trunk/arch/x86/kernel/cpu/amd.c index e0ba2c7c5a18..c3175da7bc69 100644 --- a/trunk/arch/x86/kernel/cpu/amd.c +++ b/trunk/arch/x86/kernel/cpu/amd.c @@ -26,11 +26,8 @@ __asm__(".align 4\nvide: ret"); static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) { - if (cpuid_eax(0x80000000) >= 0x80000007) { - c->x86_power = cpuid_edx(0x80000007); - if (c->x86_power & (1<<8)) - set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); - } + if (c->x86_power & (1<<8)) + set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); /* Set MTRR capability flag if appropriate */ if (c->x86_model == 13 || c->x86_model == 9 || diff --git a/trunk/arch/x86/kernel/cpu/amd_64.c b/trunk/arch/x86/kernel/cpu/amd_64.c index c5fbf7477ead..8c2d07f06f1d 100644 --- a/trunk/arch/x86/kernel/cpu/amd_64.c +++ b/trunk/arch/x86/kernel/cpu/amd_64.c @@ -140,6 +140,8 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) } #endif + early_init_amd(c); + /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ clear_cpu_cap(c, 0*32+31); diff --git a/trunk/arch/x86/kernel/cpu/centaur_64.c b/trunk/arch/x86/kernel/cpu/centaur_64.c index 49cfc6d2f2fb..0e5cf17a3c89 100644 --- a/trunk/arch/x86/kernel/cpu/centaur_64.c +++ b/trunk/arch/x86/kernel/cpu/centaur_64.c @@ -16,6 +16,8 @@ static void __cpuinit early_init_centaur(struct cpuinfo_x86 *c) static void __cpuinit init_centaur(struct cpuinfo_x86 *c) { + early_init_centaur(c); + if (c->x86 == 0x6 && c->x86_model >= 0xf) { c->x86_cache_alignment = c->x86_clflush_size * 2; set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); diff --git a/trunk/arch/x86/kernel/cpu/common.c b/trunk/arch/x86/kernel/cpu/common.c index a8b9b7242428..e8045c4ef1c1 100644 --- a/trunk/arch/x86/kernel/cpu/common.c +++ b/trunk/arch/x86/kernel/cpu/common.c @@ -473,9 +473,6 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c) c->x86_capability[2] = cpuid_edx(0x80860001); } - if (c->extended_cpuid_level >= 0x80000007) - c->x86_power = cpuid_edx(0x80000007); - if (c->extended_cpuid_level >= 0x80000008) { u32 eax = cpuid_eax(0x80000008); @@ -483,6 +480,10 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c) c->x86_phys_bits = eax & 0xff; } #endif + + if (c->extended_cpuid_level >= 0x80000007) + c->x86_power = cpuid_edx(0x80000007); + } /* * Do minimum CPU detection early. diff --git a/trunk/arch/x86/kernel/cpu/intel_64.c b/trunk/arch/x86/kernel/cpu/intel_64.c index 0c0a58dfe099..14a2cd98d480 100644 --- a/trunk/arch/x86/kernel/cpu/intel_64.c +++ b/trunk/arch/x86/kernel/cpu/intel_64.c @@ -54,6 +54,8 @@ static void __cpuinit srat_detect_node(void) static void __cpuinit init_intel(struct cpuinfo_x86 *c) { + early_init_intel(c); + init_intel_cacheinfo(c); if (c->cpuid_level > 9) { unsigned eax = cpuid_eax(10);