diff --git a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c index c2c4b09d1d..68b4e5c144 100644 --- a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c +++ b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -41,13 +42,13 @@ static void rtlsmp_finish(void) { /* These devices are low on resources. There might be the chance that CEVT_R4K is * not enabled in kernel build. Nevertheless the timer and interrupt 7 might be - * active by default after startup of secondary VPE. With no registered handler - * that leads to continuous unhandeled interrupts. In this case disable counting - * (DC) in the core and confirm a pending interrupt. + * active by default after startup of secondary VPEs. With no registered handler + * that leads to continuous unhandeled interrupts. Disable it but keep the counter + * running so it can still be used as an entropy source. */ if (!IS_ENABLED(CONFIG_CEVT_R4K)) { - write_c0_cause(read_c0_cause() | CAUSEF_DC); - write_c0_compare(0); + write_c0_status(read_c0_status() & ~CAUSEF_IP7); + write_c0_compare(read_c0_count() - 1); } local_irq_enable();