diff options
author | Alexandros C. Couloumbis <alex@ozo.com> | 2010-04-28 14:09:43 +0000 |
---|---|---|
committer | Alexandros C. Couloumbis <alex@ozo.com> | 2010-04-28 14:09:43 +0000 |
commit | a7ec79d712b21a76c67168ebf7f243c7bcde452d (patch) | |
tree | 4755fffee32e4de481b8cfe68fe85c587621edf4 /target/linux/atheros/patches-2.6.34/001-get_c0_compare_int_fix.patch | |
parent | d1ed288d6c86bf276a496dfd5f562e24350a544f (diff) | |
download | upstream-a7ec79d712b21a76c67168ebf7f243c7bcde452d.tar.gz upstream-a7ec79d712b21a76c67168ebf7f243c7bcde452d.tar.bz2 upstream-a7ec79d712b21a76c67168ebf7f243c7bcde452d.zip |
add kernel 2.6.34 support, refresh patches
SVN-Revision: 21235
Diffstat (limited to 'target/linux/atheros/patches-2.6.34/001-get_c0_compare_int_fix.patch')
-rw-r--r-- | target/linux/atheros/patches-2.6.34/001-get_c0_compare_int_fix.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/atheros/patches-2.6.34/001-get_c0_compare_int_fix.patch b/target/linux/atheros/patches-2.6.34/001-get_c0_compare_int_fix.patch new file mode 100644 index 0000000000..43da96c3fe --- /dev/null +++ b/target/linux/atheros/patches-2.6.34/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 +@@ -168,20 +168,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); + |