Skip to content

Commit 0bc0375

Browse files
andyhhpingomolnar
authored andcommitted
x86/cpu: Drop vestigial PBE logic in AMD/Hygon/Centaur/Cyrix
Besides formatting changes, this logic dates back to Linux 2.4.0-test11 in November 2000. Prior to "Massive cleanup of CPU detection and bug handling", c->x86_capability was a single u32 containing cpuid(1).edx, cpuid(0x80000001).edx, or a synthesis thereof. X86_FEATURE_AMD3D was defined as the top bit this single u32. After "Massive cleanup of CPU detection and bug handling", c->x86_capability became an array with AMD's extended feature leaf split away from Intel's basic feature leaf. AMD doc #20734-G states that 3DNow is only enumerated in the extended feature leaf, and that other vendors where using this bit too. i.e. AMD never produced a CPU which set bit 31 in the basic leaf, meaning that there's nothing to clear out in the first place. This logic looks like it was relevant in the pre-"Massive cleanup" world but ought to have been dropped when c->x86_capability was properly split. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Pu Wen <puwen@hygon.cn> Link: https://patch.msgid.link/20251126125147.880275-1-andrew.cooper3@citrix.com
1 parent a2aabcf commit 0bc0375

4 files changed

Lines changed: 0 additions & 24 deletions

File tree

arch/x86/kernel/cpu/amd.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,12 +1051,6 @@ static void init_amd(struct cpuinfo_x86 *c)
10511051

10521052
early_init_amd(c);
10531053

1054-
/*
1055-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
1056-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
1057-
*/
1058-
clear_cpu_cap(c, 0*32+31);
1059-
10601054
if (c->x86 >= 0x10)
10611055
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
10621056

arch/x86/kernel/cpu/centaur.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ static void init_centaur(struct cpuinfo_x86 *c)
119119
u32 fcr_clr = 0;
120120
u32 lo, hi, newlo;
121121
u32 aa, bb, cc, dd;
122-
123-
/*
124-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
125-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
126-
*/
127-
clear_cpu_cap(c, 0*32+31);
128122
#endif
129123
early_init_centaur(c);
130124
init_intel_cacheinfo(c);

arch/x86/kernel/cpu/cyrix.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,6 @@ static void init_cyrix(struct cpuinfo_x86 *c)
195195
char *buf = c->x86_model_id;
196196
const char *p = NULL;
197197

198-
/*
199-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
200-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
201-
*/
202-
clear_cpu_cap(c, 0*32+31);
203-
204198
/* Cyrix used bit 24 in extended (AMD) CPUID for Cyrix MMX extensions */
205199
if (test_cpu_cap(c, 1*32+24)) {
206200
clear_cpu_cap(c, 1*32+24);

arch/x86/kernel/cpu/hygon.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,6 @@ static void init_hygon(struct cpuinfo_x86 *c)
174174

175175
early_init_hygon(c);
176176

177-
/*
178-
* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
179-
* 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
180-
*/
181-
clear_cpu_cap(c, 0*32+31);
182-
183177
set_cpu_cap(c, X86_FEATURE_REP_GOOD);
184178

185179
/*

0 commit comments

Comments
 (0)