--- zzzz-none-000/linux-3.18.24/arch/mips/kernel/smp-cmp.c 2015-10-31 20:39:51.000000000 +0000 +++ rtl96-5690pro-762/linux-3.18.24/arch/mips/kernel/smp-cmp.c 2024-08-14 08:36:36.000000000 +0000 @@ -32,28 +32,30 @@ #include #include #include +#include #include #include #include #include -#include #include +#include static void cmp_init_secondary(void) { struct cpuinfo_mips *c __maybe_unused = ¤t_cpu_data; - - /* Assume GIC is present */ - change_c0_status(ST0_IM, STATUSF_IP3 | STATUSF_IP4 | STATUSF_IP6 | - STATUSF_IP7); + extern char handle_vec __maybe_unused; /* Enable per-cpu interrupts: platform specific */ + if (IS_ENABLED(CONFIG_CPU_RLX)) + write_lxc0_intvec(&handle_vec); #ifdef CONFIG_MIPS_MT_SMP if (cpu_has_mipsmt) c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; #endif + /* Call bsp init_secondary hook */ + plat_smp_init_secondary(); } static void cmp_smp_finish(void) @@ -93,6 +95,8 @@ flush_icache_range((unsigned long)gp, (unsigned long)(gp + sizeof(struct thread_info))); #endif + if (IS_ENABLED(CONFIG_CPU_RLX)) + mmcr_init_core(cpu); amon_cpu_start(cpu, pc, sp, (unsigned long)gp, a0); } @@ -145,7 +149,6 @@ */ mips_mt_set_cpuoptions(); #endif - } struct plat_smp_ops cmp_smp_ops = {