[PATCH v2 14/14] realtek: initialise mulithreading on supported SoCs
Sander Vanheule
sander at svanheule.net
Sun Dec 12 12:01:36 PST 2021
In addition to CPS SMP setups, also try to initialise MT SMP setups with
multiple VPEs per CPU core on MIPS_GENERIC. CMP SMP support is not
provided as it is considered deprecated. This is required to enabled SMP
on RTL839x and RTL930x devices.
Additionally, rework the code by dropping the err variable and make it
similar to how other platforms perform this initialisation.
Co-developed-by: INAGAKI Hiroshi <musashino.open at gmail.com>
Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
Signed-off-by: Sander Vanheule <sander at svanheule.net>
---
...S-generic-enable-SMP-on-SMVP-systems.patch | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
create mode 100644 target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch
diff --git a/target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch b/target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch
new file mode 100644
index 000000000000..f6363b2048e5
--- /dev/null
+++ b/target/linux/realtek/patches-5.10/310-MIPS-generic-enable-SMP-on-SMVP-systems.patch
@@ -0,0 +1,23 @@
+--- a/arch/mips/generic/init.c
++++ b/arch/mips/generic/init.c
+@@ -111,14 +111,15 @@ void __init plat_mem_setup(void)
+
+ void __init device_tree_init(void)
+ {
+- int err;
+-
+ unflatten_and_copy_device_tree();
+ mips_cpc_probe();
+
+- err = register_cps_smp_ops();
+- if (err)
+- err = register_up_smp_ops();
++ if (!register_cps_smp_ops())
++ return;
++ if (!register_vsmp_smp_ops())
++ return;
++
++ register_up_smp_ops();
+ }
+
+ int __init apply_mips_fdt_fixups(void *fdt_out, size_t fdt_out_size,
--
2.33.1
More information about the openwrt-devel
mailing list