-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86: Move the 64-bit Centaur specific parts out of setup_64.c
Create a separate centaur_64.c file in the cpu/ dir for the useful parts to live in. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
- Loading branch information
Dave Jones
authored and
H. Peter Anvin
committed
May 30, 2008
1 parent
7e21911
commit 30a7131
Showing
3 changed files
with
34 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include <linux/init.h> | ||
#include <linux/smp.h> | ||
|
||
#include <asm/cpufeature.h> | ||
#include <asm/processor.h> | ||
|
||
void __cpuinit early_init_centaur(struct cpuinfo_x86 *c) | ||
{ | ||
if (c->x86 == 0x6 && c->x86_model >= 0xf) | ||
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); | ||
} | ||
|
||
void __cpuinit init_centaur(struct cpuinfo_x86 *c) | ||
{ | ||
/* Cache sizes */ | ||
unsigned n; | ||
|
||
n = c->extended_cpuid_level; | ||
if (n >= 0x80000008) { | ||
unsigned eax = cpuid_eax(0x80000008); | ||
c->x86_virt_bits = (eax >> 8) & 0xff; | ||
c->x86_phys_bits = eax & 0xff; | ||
} | ||
|
||
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); | ||
set_cpu_cap(c, X86_FEATURE_REP_GOOD); | ||
} | ||
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters