[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1599562666-31351-3-git-send-email-TonyWWang-oc@zhaoxin.com>
Date: Tue, 8 Sep 2020 18:57:46 +0800
From: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
To: <tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
<x86@...nel.org>, <hpa@...or.com>,
<sean.j.christopherson@...el.com>, <liam.merwick@...cle.com>,
<mlevitsk@...hat.com>, <linux-kernel@...r.kernel.org>
CC: <TimGuo-oc@...oxin.com>, <CooperYan@...oxin.com>,
<QiyuanWang@...oxin.com>, <HerryYang@...oxin.com>,
<CobeChen@...oxin.com>
Subject: [PATCH v1 2/2] x86/cpu: add Centaur Family >=7 CPUs initialization support
add Centaur Family >=7 CPUs specific initialization support in centaur.c
Signed-off-by: Tony W Wang-oc <TonyWWang-oc@...oxin.com>
---
arch/x86/kernel/cpu/centaur.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/centaur.c b/arch/x86/kernel/cpu/centaur.c
index 5f811586..345f7d9 100644
--- a/arch/x86/kernel/cpu/centaur.c
+++ b/arch/x86/kernel/cpu/centaur.c
@@ -65,6 +65,9 @@ static void init_c3(struct cpuinfo_x86 *c)
c->x86_cache_alignment = c->x86_clflush_size * 2;
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
}
+
+ if (c->x86 >= 7)
+ set_cpu_cap(c, X86_FEATURE_REP_GOOD);
}
enum {
@@ -95,7 +98,8 @@ static void early_init_centaur(struct cpuinfo_x86 *c)
if (c->x86 == 5)
set_cpu_cap(c, X86_FEATURE_CENTAUR_MCR);
#endif
- if (c->x86 == 6 && c->x86_model >= 0xf)
+ if ((c->x86 == 6 && c->x86_model >= 0xf) ||
+ (c->x86 >= 7))
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
#ifdef CONFIG_X86_64
@@ -204,7 +208,7 @@ static void init_centaur(struct cpuinfo_x86 *c)
sprintf(c->x86_model_id, "WinChip %s", name);
}
#endif
- if (c->x86 == 6)
+ if (c->x86 == 6 || c->x86 >= 7)
init_c3(c);
#ifdef CONFIG_X86_64
set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
--
2.7.4
Powered by blists - more mailing lists