aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-5.4/100-mt7621-core-detect-hack.patch
diff options
context:
space:
mode:
authorRui Salvaterra <rsalvaterra@gmail.com>2021-12-14 13:46:19 +0000
committerRui Salvaterra <rsalvaterra@gmail.com>2021-12-15 09:40:03 +0000
commitc7727833945deb70eed7520ab44fa08b0870b8a7 (patch)
tree193f5b25a9b5c0dd29dbbf252f9532b7784f52ed /target/linux/ramips/patches-5.4/100-mt7621-core-detect-hack.patch
parent07452a680b571815edadc50fbe9c83311201bac7 (diff)
downloadupstream-c7727833945deb70eed7520ab44fa08b0870b8a7.tar.gz
upstream-c7727833945deb70eed7520ab44fa08b0870b8a7.tar.bz2
upstream-c7727833945deb70eed7520ab44fa08b0870b8a7.zip
ramips: remove Linux 5.4 support
We're at 5.10 stable, this can finally go. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Diffstat (limited to 'target/linux/ramips/patches-5.4/100-mt7621-core-detect-hack.patch')
-rw-r--r--target/linux/ramips/patches-5.4/100-mt7621-core-detect-hack.patch61
1 files changed, 0 insertions, 61 deletions
diff --git a/target/linux/ramips/patches-5.4/100-mt7621-core-detect-hack.patch b/target/linux/ramips/patches-5.4/100-mt7621-core-detect-hack.patch
deleted file mode 100644
index 1c8b61f8ef..0000000000
--- a/target/linux/ramips/patches-5.4/100-mt7621-core-detect-hack.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-There is a variant of MT7621 which contains only one CPU core instead of 2.
-This is not reflected in the config register, so the kernel detects more
-physical cores, which leads to a hang on SMP bringup.
-Add a hack to detect missing cores.
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
-
---- a/arch/mips/kernel/smp-cps.c
-+++ b/arch/mips/kernel/smp-cps.c
-@@ -43,6 +43,11 @@ static unsigned core_vpe_count(unsigned
- return mips_cps_numvps(cluster, core);
- }
-
-+bool __weak plat_cpu_core_present(int core)
-+{
-+ return true;
-+}
-+
- static void __init cps_smp_setup(void)
- {
- unsigned int nclusters, ncores, nvpes, core_vpes;
-@@ -60,6 +65,8 @@ static void __init cps_smp_setup(void)
-
- ncores = mips_cps_numcores(cl);
- for (c = 0; c < ncores; c++) {
-+ if (!plat_cpu_core_present(c))
-+ continue;
- core_vpes = core_vpe_count(cl, c);
-
- if (c > 0)
---- a/arch/mips/ralink/mt7621.c
-+++ b/arch/mips/ralink/mt7621.c
-@@ -13,6 +13,7 @@
- #include <asm/mips-cps.h>
- #include <asm/mach-ralink/ralink_regs.h>
- #include <asm/mach-ralink/mt7621.h>
-+#include <asm/mips-boards/launch.h>
-
- #include <pinmux.h>
-
-@@ -160,6 +161,20 @@ void __init ralink_of_remap(void)
- panic("Failed to remap core resources");
- }
-
-+bool plat_cpu_core_present(int core)
-+{
-+ struct cpulaunch *launch = (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
-+
-+ if (!core)
-+ return true;
-+ launch += core * 2; /* 2 VPEs per core */
-+ if (!(launch->flags & LAUNCH_FREADY))
-+ return false;
-+ if (launch->flags & (LAUNCH_FGO | LAUNCH_FGONE))
-+ return false;
-+ return true;
-+}
-+
- void prom_soc_init(struct ralink_soc_info *soc_info)
- {
- void __iomem *sysc = (void __iomem *) KSEG1ADDR(MT7621_SYSC_BASE);