Skip to content

Commit 20cc5b6

Browse files
committed
MIPS: cpu-probe: remove MIPS_CPU_BP_GHIST option bit
MIPS_CPU_BP_GHIST is only set two times and more or less immediately used in cpu-probe.c itself. Remove this option to make room in options word. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 90c68c6 commit 20cc5b6

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

arch/mips/include/asm/cpu-features.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@
171171
#ifndef cpu_has_llsc
172172
#define cpu_has_llsc __isa_ge_or_opt(1, MIPS_CPU_LLSC)
173173
#endif
174-
#ifndef cpu_has_bp_ghist
175-
#define cpu_has_bp_ghist __opt(MIPS_CPU_BP_GHIST)
176-
#endif
177174
#ifndef kernel_uses_llsc
178175
#define kernel_uses_llsc cpu_has_llsc
179176
#endif

arch/mips/include/asm/cpu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,6 @@ enum cpu_type_enum {
398398
#define MIPS_CPU_RW_LLB BIT_ULL(32) /* LLADDR/LLB writes are allowed */
399399
#define MIPS_CPU_LPA BIT_ULL(33) /* CPU supports Large Physical Addressing */
400400
#define MIPS_CPU_CDMM BIT_ULL(34) /* CPU has Common Device Memory Map */
401-
#define MIPS_CPU_BP_GHIST BIT_ULL(35) /* R12K+ Branch Prediction Global History */
402401
#define MIPS_CPU_SP BIT_ULL(36) /* Small (1KB) page support */
403402
#define MIPS_CPU_FTLB BIT_ULL(37) /* CPU has Fixed-page-size TLB */
404403
#define MIPS_CPU_NAN_LEGACY BIT_ULL(38) /* Legacy NaN implemented */

arch/mips/include/asm/mach-au1x00/cpu-feature-overrides.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#define cpu_has_guestctl2 0
4040
#define cpu_has_guestid 0
4141
#define cpu_has_drg 0
42-
#define cpu_has_bp_ghist 0
4342
#define cpu_has_mips16 0
4443
#define cpu_has_mips16e2 0
4544
#define cpu_has_mdmx 0

arch/mips/kernel/cpu-probe.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,8 +1278,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
12781278
c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
12791279
MIPS_CPU_FPU | MIPS_CPU_32FPR |
12801280
MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
1281-
MIPS_CPU_LLSC | MIPS_CPU_BP_GHIST;
1281+
MIPS_CPU_LLSC;
12821282
c->tlbsize = 64;
1283+
write_c0_r10k_diag(read_c0_r10k_diag() | R10K_DIAG_E_GHIST);
12831284
break;
12841285
case PRID_IMP_R14000:
12851286
if (((c->processor_id >> 4) & 0x0f) > 2) {
@@ -1293,8 +1294,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
12931294
c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
12941295
MIPS_CPU_FPU | MIPS_CPU_32FPR |
12951296
MIPS_CPU_COUNTER | MIPS_CPU_WATCH |
1296-
MIPS_CPU_LLSC | MIPS_CPU_BP_GHIST;
1297+
MIPS_CPU_LLSC;
12971298
c->tlbsize = 64;
1299+
write_c0_r10k_diag(read_c0_r10k_diag() | R10K_DIAG_E_GHIST);
12981300
break;
12991301
case PRID_IMP_LOONGSON_64C: /* Loongson-2/3 */
13001302
switch (c->processor_id & PRID_REV_MASK) {
@@ -2054,10 +2056,6 @@ void cpu_probe(void)
20542056
else
20552057
cpu_set_nofpu_opts(c);
20562058

2057-
if (cpu_has_bp_ghist)
2058-
write_c0_r10k_diag(read_c0_r10k_diag() |
2059-
R10K_DIAG_E_GHIST);
2060-
20612059
if (cpu_has_mips_r2_r6) {
20622060
c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
20632061
/* R2 has Performance Counter Interrupt indicator */

0 commit comments

Comments
 (0)