openwrt/target/linux/realtek/patches-5.10/309-cevt-rtl9300-support.patch
Markus Stockhausen 3f41360eb7 realtek: use upstream recommendation for secondary CPU start
Currently we fix interrupts/timers for the secondary CPU by patching
vsmp_init_secondary(). Get a little bit more generic and use the
upstream recommended way instead. Additionally avoid a check around
register_cps_smp_ops() because it does that itself.

See https://lkml.org/lkml/2022/9/12/522

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2022-09-18 20:38:56 +02:00

34 lines
913 B
Diff

--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -27,6 +27,7 @@ obj-$(CONFIG_CEVT_BCM1480) += cevt-bcm14
obj-$(CONFIG_CEVT_R4K) += cevt-r4k.o
obj-$(CONFIG_CEVT_DS1287) += cevt-ds1287.o
obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o
+obj-$(CONFIG_CEVT_RTL9300) += cevt-rtl9300.o
obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o
obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o
obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o
--- a/arch/mips/include/asm/time.h
+++ b/arch/mips/include/asm/time.h
@@ -15,6 +15,8 @@
#include <linux/clockchips.h>
#include <linux/clocksource.h>
+extern void rtl9300_clockevent_init(void);
+
extern spinlock_t rtc_lock;
/*
@@ -43,6 +45,11 @@ extern int r4k_clockevent_init(void);
static inline int mips_clockevent_init(void)
{
+#ifdef CONFIG_CEVT_RTL9300
+ rtl9300_clockevent_init();
+ return 0;
+#endif
+
#ifdef CONFIG_CEVT_R4K
return r4k_clockevent_init();
#else