Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112822
b: refs/heads/master
c: 6627d24
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Sep 5, 2008
1 parent a703a76 commit e8a3e84
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5122c890ba969e6efeaba9ed45f5936e62d3c6d5
refs/heads/master: 6627d2423067f2c6eedb422a59fba9270a3c5e36
4 changes: 4 additions & 0 deletions trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,11 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
*/
static void __init early_identify_cpu(struct cpuinfo_x86 *c)
{
#ifdef CONFIG_X86_64
c->x86_clflush_size = 64;
#else
c->x86_clflush_size = 32;
#endif
c->x86_cache_alignment = c->x86_clflush_size;

if (!have_cpuid_p())
Expand Down
19 changes: 16 additions & 3 deletions trunk/arch/x86/kernel/cpu/common_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,15 +482,28 @@ static void __cpuinit get_cpu_cap(struct cpuinfo_x86 *c)
#endif
}

/* Do some early cpuid on the boot CPU to get some parameter that are
needed before check_bugs. Everything advanced is in identify_cpu
below. */
/*
* Do minimum CPU detection early.
* Fields really needed: vendor, cpuid_level, family, model, mask,
* cache alignment.
* The others are not touched to avoid unwanted side effects.
*
* WARNING: this function is only called on the BP. Don't add code here
* that is supposed to run on all CPUs.
*/
static void __init early_identify_cpu(struct cpuinfo_x86 *c)
{

#ifdef CONFIG_X86_64
c->x86_clflush_size = 64;
#else
c->x86_clflush_size = 32;
#endif
c->x86_cache_alignment = c->x86_clflush_size;

if (!have_cpuid_p())
return;

memset(&c->x86_capability, 0, sizeof c->x86_capability);

c->extended_cpuid_level = 0;
Expand Down

0 comments on commit e8a3e84

Please sign in to comment.