From: "tip-bot2 for Tony W Wang-oc" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Tony W Wang-oc" <TonyWWang-oc@zhaoxin.com>,
Borislav Petkov <bp@suse.de>, x86 <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [tip: x86/cpu] x86/cpu/centaur: Add Centaur family >=7 CPUs initialization support
Date: Fri, 11 Sep 2020 09:47:34 -0000 [thread overview]
Message-ID: <159981765454.4289.4295139362994948061.tip-bot2@tip-bot2> (raw)
In-Reply-To: <1599562666-31351-3-git-send-email-TonyWWang-oc@zhaoxin.com>
The following commit has been merged into the x86/cpu branch of tip:
Commit-ID: 33b4711df4c1b3aec7c267c60fc24abccfadd40c
Gitweb: https://git.kernel.org/tip/33b4711df4c1b3aec7c267c60fc24abccfadd40c
Author: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
AuthorDate: Tue, 08 Sep 2020 18:57:46 +08:00
Committer: Borislav Petkov <bp@suse.de>
CommitterDate: Fri, 11 Sep 2020 10:53:19 +02:00
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
---
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 5f81158..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);
prev parent reply other threads:[~2020-09-11 9:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 10:57 [PATCH v1 0/2] add Centaur Family >= 7 CPUs support Tony W Wang-oc
2020-09-08 10:57 ` [PATCH v1 1/2] x86/cpu: replace two-condition switch-case with if statement Tony W Wang-oc
2020-09-11 9:47 ` [tip: x86/cpu] x86/cpu/centaur: Replace two-condition switch-case with an " tip-bot2 for Tony W Wang-oc
2020-09-08 10:57 ` [PATCH v1 2/2] x86/cpu: add Centaur Family >=7 CPUs initialization support Tony W Wang-oc
2020-09-11 9:47 ` tip-bot2 for Tony W Wang-oc [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=159981765454.4289.4295139362994948061.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=bp@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®