diff options
author | John Crispin <john@phrozen.org> | 2017-07-05 07:52:36 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-07-06 06:37:03 +0200 |
commit | fddc78bc116bc043fb5cd92dbc45cfd054c21af8 (patch) | |
tree | bb82a2b964986ddaec87414ab6b7b19b43ebc8b8 /target/linux/ramips/patches-4.4/100-mt7621-core-detect-hack.patch | |
parent | 05d6e92594c507dcd1f4be6c1bcb2282fe1abe1f (diff) | |
download | upstream-fddc78bc116bc043fb5cd92dbc45cfd054c21af8.tar.gz upstream-fddc78bc116bc043fb5cd92dbc45cfd054c21af8.tar.bz2 upstream-fddc78bc116bc043fb5cd92dbc45cfd054c21af8.zip |
ramips: bump to v4.9
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ramips/patches-4.4/100-mt7621-core-detect-hack.patch')
-rw-r--r-- | target/linux/ramips/patches-4.4/100-mt7621-core-detect-hack.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/target/linux/ramips/patches-4.4/100-mt7621-core-detect-hack.patch b/target/linux/ramips/patches-4.4/100-mt7621-core-detect-hack.patch deleted file mode 100644 index 4049d131bb..0000000000 --- a/target/linux/ramips/patches-4.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 -@@ -44,6 +44,11 @@ static unsigned core_vpe_count(unsigned - return (cfg >> CM_GCR_Cx_CONFIG_PVPE_SHF) + 1; - } - -+bool __weak plat_cpu_core_present(int core) -+{ -+ return true; -+} -+ - static void __init cps_smp_setup(void) - { - unsigned int ncores, nvpes, core_vpes; -@@ -53,6 +58,8 @@ static void __init cps_smp_setup(void) - ncores = mips_cm_numcores(); - pr_info("VPE topology "); - for (c = nvpes = 0; c < ncores; c++) { -+ if (!plat_cpu_core_present(c)) -+ continue; - core_vpes = core_vpe_count(c); - pr_cont("%c%u", c ? ',' : '{', core_vpes); - ---- a/arch/mips/ralink/mt7621.c -+++ b/arch/mips/ralink/mt7621.c -@@ -20,6 +20,7 @@ - #include <asm/mips-cpc.h> - #include <asm/mach-ralink/ralink_regs.h> - #include <asm/mach-ralink/mt7621.h> -+#include <asm/mips-boards/launch.h> - - #include <pinmux.h> - -@@ -163,6 +164,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); |