Skip to content

Commit df5c188

Browse files
committed
Merge tag 'mips-fixes_5.15_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fix from Thomas Bogendoerfer: "Revert workaround for buggy cpu detection because regressions" * tag 'mips-fixes_5.15_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Revert "add support for buggy MT7621S core detection"
2 parents 9e1ff30 + 740da9d commit df5c188

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

arch/mips/include/asm/mips-cps.h

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#include <linux/io.h>
1111
#include <linux/types.h>
1212

13-
#include <asm/mips-boards/launch.h>
14-
1513
extern unsigned long __cps_access_bad_size(void)
1614
__compiletime_error("Bad size for CPS accessor");
1715

@@ -167,30 +165,11 @@ static inline uint64_t mips_cps_cluster_config(unsigned int cluster)
167165
*/
168166
static inline unsigned int mips_cps_numcores(unsigned int cluster)
169167
{
170-
unsigned int ncores;
171-
172168
if (!mips_cm_present())
173169
return 0;
174170

175171
/* Add one before masking to handle 0xff indicating no cores */
176-
ncores = (mips_cps_cluster_config(cluster) + 1) & CM_GCR_CONFIG_PCORES;
177-
178-
if (IS_ENABLED(CONFIG_SOC_MT7621)) {
179-
struct cpulaunch *launch;
180-
181-
/*
182-
* Ralink MT7621S SoC is single core, but the GCR_CONFIG method
183-
* always reports 2 cores. Check the second core's LAUNCH_FREADY
184-
* flag to detect if the second core is missing. This method
185-
* only works before the core has been started.
186-
*/
187-
launch = (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
188-
launch += 2; /* MT7621 has 2 VPEs per core */
189-
if (!(launch->flags & LAUNCH_FREADY))
190-
ncores = 1;
191-
}
192-
193-
return ncores;
172+
return (mips_cps_cluster_config(cluster) + 1) & CM_GCR_CONFIG_PCORES;
194173
}
195174

196175
/**

0 commit comments

Comments
 (0)