Skip to content

Commit 33b4711

Browse files
Tony W Wang-ocsuryasaimadhu
authored andcommitted
x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support
Add Centaur family >=7 CPUs specific initialization support. Signed-off-by: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/1599562666-31351-3-git-send-email-TonyWWang-oc@zhaoxin.com
1 parent 8687bdc commit 33b4711

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

arch/x86/kernel/cpu/centaur.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ static void init_c3(struct cpuinfo_x86 *c)
6565
c->x86_cache_alignment = c->x86_clflush_size * 2;
6666
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
6767
}
68+
69+
if (c->x86 >= 7)
70+
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
6871
}
6972

7073
enum {
@@ -95,7 +98,8 @@ static void early_init_centaur(struct cpuinfo_x86 *c)
9598
if (c->x86 == 5)
9699
set_cpu_cap(c, X86_FEATURE_CENTAUR_MCR);
97100
#endif
98-
if (c->x86 == 6 && c->x86_model >= 0xf)
101+
if ((c->x86 == 6 && c->x86_model >= 0xf) ||
102+
(c->x86 >= 7))
99103
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
100104

101105
#ifdef CONFIG_X86_64
@@ -204,7 +208,7 @@ static void init_centaur(struct cpuinfo_x86 *c)
204208
sprintf(c->x86_model_id, "WinChip %s", name);
205209
}
206210
#endif
207-
if (c->x86 == 6)
211+
if (c->x86 == 6 || c->x86 >= 7)
208212
init_c3(c);
209213
#ifdef CONFIG_X86_64
210214
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);

0 commit comments

Comments
 (0)