[ramips] move files to files-3.7
[openwrt/svn-archive/archive.git] / target / linux / ramips / patches-3.8 / 001-mips-add-cp0-compare-irq-function.patch
1 --- a/arch/mips/kernel/traps.c
2 +++ b/arch/mips/kernel/traps.c
3 @@ -55,6 +55,7 @@
4 #include <asm/types.h>
5 #include <asm/stacktrace.h>
6 #include <asm/uasm.h>
7 +#include <asm/time.h>
8
9 extern void check_wait(void);
10 extern asmlinkage void r4k_wait(void);
11 @@ -1617,6 +1618,8 @@ void __cpuinit per_cpu_trap_init(bool is
12 if (cpu_has_mips_r2) {
13 cp0_compare_irq_shift = CAUSEB_TI - CAUSEB_IP;
14 cp0_compare_irq = (read_c0_intctl() >> INTCTLB_IPTI) & 7;
15 + if (get_c0_compare_irq)
16 + cp0_compare_irq = get_c0_compare_irq();
17 cp0_perfcount_irq = (read_c0_intctl() >> INTCTLB_IPPCI) & 7;
18 if (cp0_perfcount_irq == cp0_compare_irq)
19 cp0_perfcount_irq = -1;
20 --- a/arch/mips/include/asm/time.h
21 +++ b/arch/mips/include/asm/time.h
22 @@ -51,6 +51,7 @@ extern int (*perf_irq)(void);
23 * Initialize the calling CPU's compare interrupt as clockevent device
24 */
25 extern unsigned int __weak get_c0_compare_int(void);
26 +extern unsigned int __weak get_c0_compare_irq(void);
27 extern int r4k_clockevent_init(void);
28
29 static inline int mips_clockevent_init(void)