On 2014-04-28 00:58, Sergey Ryazanov wrote: > 2014-04-27 22:43 GMT+04:00 Felix Fietkau <[email protected]>: >> On 2014-04-18 22:22, Sergey Ryazanov wrote: >>> Remove get_c0_compare_int fix which is useless for latest kernels. >> What upstream change makes it useless? > When I faced this patch, I could not find a lot info about this bug, > and I done a simple code analysis. And I got the following results > (all paths are relative to arch/mips): > > MIPS_CPU_IRQ_BASE is 0 (defined in include/asm/mach-generic/irq.h) > CP0_LEGACY_COMPARE_IRQ is 7 (defined in include/asm/irq.h) > > cp0_compare_irq is initialized in kernel/traps.c to CP0_LEGACY_COMPARE_IRQ > > get_c0_compare_int() defined in ar231x/board.c and return > CP0_LEGACY_COMPARE_IRQ value. > > So the following code does not change the value of cp0_compare_irq: > if (get_c0_compare_int) { > irq = get_c0_compare_int(); > if ((irq >= MIPS_CPU_IRQ_BASE) && (irq < MIPS_CPU_IRQ_BASE + 8)) > cp0_compare_irq = irq - MIPS_CPU_IRQ_BASE; > } > > and further more: c0_compare_int_usable() does not rely more on > cp0_compare_irq, and uses cp0_compare_irq_shift variable which is > initialized to CP0_LEGACY_PERFCNT_IRQ (defined as 7 in > include/asm/irq.h) in kernel/traps.c > > For all these reasons, I have concluded that this patch is no longer needed. > > Since cp0_compare_irq already initialized to CP0_LEGACY_COMPARE_IRQ, > seems that get_c0_compare_int realization could be also safely removed > (from ar231x/board.c). > >>> Tested on Ubnt Bullet2, which could successfully boot without this >>> workaround. >> I think both AR2135 and AR5312 should be tested. I don't remember the >> details about the issue that well (this was many years ago), but I think >> the failure was appearing only on one of those two. >> > From preceding analysis, code seems chip-independed. Makes sense, committed in r40593
Thanks, - Felix _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
