Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6] / arch / sparc / kernel / irq.h
1 #include <asm/btfixup.h>
2
3 /* Dave Redman (djhr@tadpole.co.uk)
4  * changed these to function pointers.. it saves cycles and will allow
5  * the irq dependencies to be split into different files at a later date
6  * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size.
7  * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8  * Changed these to btfixup entities... It saves cycles :)
9  */
10
11 BTFIXUPDEF_CALL(void, disable_irq, unsigned int)
12 BTFIXUPDEF_CALL(void, enable_irq, unsigned int)
13 BTFIXUPDEF_CALL(void, disable_pil_irq, unsigned int)
14 BTFIXUPDEF_CALL(void, enable_pil_irq, unsigned int)
15 BTFIXUPDEF_CALL(void, clear_clock_irq, void)
16 BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
17
18 static inline void __disable_irq(unsigned int irq)
19 {
20         BTFIXUP_CALL(disable_irq)(irq);
21 }
22
23 static inline void __enable_irq(unsigned int irq)
24 {
25         BTFIXUP_CALL(enable_irq)(irq);
26 }
27
28 static inline void disable_pil_irq(unsigned int irq)
29 {
30         BTFIXUP_CALL(disable_pil_irq)(irq);
31 }
32
33 static inline void enable_pil_irq(unsigned int irq)
34 {
35         BTFIXUP_CALL(enable_pil_irq)(irq);
36 }
37
38 static inline void clear_clock_irq(void)
39 {
40         BTFIXUP_CALL(clear_clock_irq)();
41 }
42
43 static inline void load_profile_irq(int cpu, int limit)
44 {
45         BTFIXUP_CALL(load_profile_irq)(cpu, limit);
46 }
47
48 extern void (*sparc_init_timers)(irq_handler_t lvl10_irq);
49
50 extern void claim_ticker14(irq_handler_t irq_handler,
51                            int irq,
52                            unsigned int timeout);
53
54 #ifdef CONFIG_SMP
55 BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
56 BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
57 BTFIXUPDEF_CALL(void, set_irq_udt, int)
58
59 #define set_cpu_int(cpu,level) BTFIXUP_CALL(set_cpu_int)(cpu,level)
60 #define clear_cpu_int(cpu,level) BTFIXUP_CALL(clear_cpu_int)(cpu,level)
61 #define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu)
62 #endif