x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping
x86_mask is a confusing name which is hard to associate with the processor's stepping. Additionally, correct an indent issue in lib/cpu.c. Signed-off-by: Jia Zhang <qianyue.zj@alibaba-inc.com> [ Updated it to more recent kernels. ] Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: bp@alien8.de Cc: tony.luck@intel.com Link: http://lkml.kernel.org/r/1514771530-70829-1-git-send-email-qianyue.zj@alibaba-inc.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -629,7 +629,7 @@ static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)
|
||||
if (c->x86_vendor == X86_VENDOR_INTEL) {
|
||||
if ((c->x86 == 15) &&
|
||||
(c->x86_model == 6) &&
|
||||
(c->x86_mask == 8)) {
|
||||
(c->x86_stepping == 8)) {
|
||||
pr_info("Intel(R) Xeon(R) 7100 Errata AL30, processors may lock up on frequency changes: disabling acpi-cpufreq\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
@@ -775,7 +775,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
|
||||
break;
|
||||
|
||||
case 7:
|
||||
switch (c->x86_mask) {
|
||||
switch (c->x86_stepping) {
|
||||
case 0:
|
||||
longhaul_version = TYPE_LONGHAUL_V1;
|
||||
cpu_model = CPU_SAMUEL2;
|
||||
@@ -787,7 +787,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
|
||||
break;
|
||||
case 1 ... 15:
|
||||
longhaul_version = TYPE_LONGHAUL_V2;
|
||||
if (c->x86_mask < 8) {
|
||||
if (c->x86_stepping < 8) {
|
||||
cpu_model = CPU_SAMUEL2;
|
||||
cpuname = "C3 'Samuel 2' [C5B]";
|
||||
} else {
|
||||
@@ -814,7 +814,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy)
|
||||
numscales = 32;
|
||||
memcpy(mults, nehemiah_mults, sizeof(nehemiah_mults));
|
||||
memcpy(eblcr, nehemiah_eblcr, sizeof(nehemiah_eblcr));
|
||||
switch (c->x86_mask) {
|
||||
switch (c->x86_stepping) {
|
||||
case 0 ... 1:
|
||||
cpu_model = CPU_NEHEMIAH;
|
||||
cpuname = "C3 'Nehemiah A' [C5XLOE]";
|
||||
|
@@ -168,7 +168,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
|
||||
#endif
|
||||
|
||||
/* Errata workaround */
|
||||
cpuid = (c->x86 << 8) | (c->x86_model << 4) | c->x86_mask;
|
||||
cpuid = (c->x86 << 8) | (c->x86_model << 4) | c->x86_stepping;
|
||||
switch (cpuid) {
|
||||
case 0x0f07:
|
||||
case 0x0f0a:
|
||||
|
@@ -131,7 +131,7 @@ static int check_powernow(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((c->x86_model == 6) && (c->x86_mask == 0)) {
|
||||
if ((c->x86_model == 6) && (c->x86_stepping == 0)) {
|
||||
pr_info("K7 660[A0] core detected, enabling errata workarounds\n");
|
||||
have_a0 = 1;
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ struct cpu_id
|
||||
{
|
||||
__u8 x86; /* CPU family */
|
||||
__u8 x86_model; /* model */
|
||||
__u8 x86_mask; /* stepping */
|
||||
__u8 x86_stepping; /* stepping */
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -277,7 +277,7 @@ static int centrino_verify_cpu_id(const struct cpuinfo_x86 *c,
|
||||
{
|
||||
if ((c->x86 == x->x86) &&
|
||||
(c->x86_model == x->x86_model) &&
|
||||
(c->x86_mask == x->x86_mask))
|
||||
(c->x86_stepping == x->x86_stepping))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -272,9 +272,9 @@ unsigned int speedstep_detect_processor(void)
|
||||
ebx = cpuid_ebx(0x00000001);
|
||||
ebx &= 0x000000FF;
|
||||
|
||||
pr_debug("ebx value is %x, x86_mask is %x\n", ebx, c->x86_mask);
|
||||
pr_debug("ebx value is %x, x86_stepping is %x\n", ebx, c->x86_stepping);
|
||||
|
||||
switch (c->x86_mask) {
|
||||
switch (c->x86_stepping) {
|
||||
case 4:
|
||||
/*
|
||||
* B-stepping [M-P4-M]
|
||||
@@ -361,7 +361,7 @@ unsigned int speedstep_detect_processor(void)
|
||||
msr_lo, msr_hi);
|
||||
if ((msr_hi & (1<<18)) &&
|
||||
(relaxed_check ? 1 : (msr_hi & (3<<24)))) {
|
||||
if (c->x86_mask == 0x01) {
|
||||
if (c->x86_stepping == 0x01) {
|
||||
pr_debug("early PIII version\n");
|
||||
return SPEEDSTEP_CPU_PIII_C_EARLY;
|
||||
} else
|
||||
|
Reference in New Issue
Block a user