diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-06-01 22:14:16 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-06-01 22:14:16 +0000 |
commit | f8ba6eb0269f502e8d66ceb836eea1c1bd4ab4ff (patch) | |
tree | c2c739ae51decef0d0a6aea18a4e2af7fe6531bf /target/linux/atheros/patches-2.6.30/001-get_c0_compare_int_fix.patch | |
parent | 616c3841c6767a8cfa5fd79a6842d6208943d426 (diff) | |
download | mtk-20170518-f8ba6eb0269f502e8d66ceb836eea1c1bd4ab4ff.zip mtk-20170518-f8ba6eb0269f502e8d66ceb836eea1c1bd4ab4ff.tar.gz mtk-20170518-f8ba6eb0269f502e8d66ceb836eea1c1bd4ab4ff.tar.bz2 |
atheros: add working patches/config for 2.6.30
SVN-Revision: 16288
Diffstat (limited to 'target/linux/atheros/patches-2.6.30/001-get_c0_compare_int_fix.patch')
-rw-r--r-- | target/linux/atheros/patches-2.6.30/001-get_c0_compare_int_fix.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/atheros/patches-2.6.30/001-get_c0_compare_int_fix.patch b/target/linux/atheros/patches-2.6.30/001-get_c0_compare_int_fix.patch new file mode 100644 index 0000000..0f6873d --- /dev/null +++ b/target/linux/atheros/patches-2.6.30/001-get_c0_compare_int_fix.patch @@ -0,0 +1,39 @@ +Fix the usage of get_c0_compare_int: override cp0_compare_irq if the returned +value is in the MIPS CPU IRQ range to ensure that c0_compare_int_usable() +still works. + +Signed-off-by: Felix Fietkau <nbd@openwrt.org> + +--- a/arch/mips/kernel/cevt-r4k.c ++++ b/arch/mips/kernel/cevt-r4k.c +@@ -167,20 +167,23 @@ int __cpuinit r4k_clockevent_init(void) + struct clock_event_device *cd; + unsigned int irq; + +- if (!cpu_has_counter || !mips_hpt_frequency) +- return -ENXIO; +- +- if (!c0_compare_int_usable()) +- return -ENXIO; +- + /* + * With vectored interrupts things are getting platform specific. + * get_c0_compare_int is a hook to allow a platform to return the + * interrupt number of it's liking. + */ + irq = MIPS_CPU_IRQ_BASE + cp0_compare_irq; +- if (get_c0_compare_int) ++ 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; ++ } ++ ++ if (!cpu_has_counter || !mips_hpt_frequency) ++ return -ENXIO; ++ ++ if (!c0_compare_int_usable()) ++ return -ENXIO; + + cd = &per_cpu(mips_clockevent_device, cpu); + |