aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/kernel/irq.c25
-rw-r--r--arch/sparc/kernel/irq.h20
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c2
-rw-r--r--arch/sparc/kernel/sun4d_irq.c4
-rw-r--r--arch/sparc/kernel/tick14.c4
-rw-r--r--include/asm-sparc/irq.h32
6 files changed, 49 insertions, 38 deletions
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 5e9af3073acf..75b2240ad0f9 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -270,7 +270,7 @@ void free_irq(unsigned int irq, void *dev_id)
270 kfree(action); 270 kfree(action);
271 271
272 if (!sparc_irq[cpu_irq].action) 272 if (!sparc_irq[cpu_irq].action)
273 disable_irq(irq); 273 __disable_irq(irq);
274 274
275out_unlock: 275out_unlock:
276 spin_unlock_irqrestore(&irq_action_lock, flags); 276 spin_unlock_irqrestore(&irq_action_lock, flags);
@@ -466,7 +466,7 @@ int request_fast_irq(unsigned int irq,
466 466
467 sparc_irq[cpu_irq].action = action; 467 sparc_irq[cpu_irq].action = action;
468 468
469 enable_irq(irq); 469 __enable_irq(irq);
470 470
471 ret = 0; 471 ret = 0;
472out_unlock: 472out_unlock:
@@ -546,7 +546,7 @@ int request_irq(unsigned int irq,
546 546
547 *actionp = action; 547 *actionp = action;
548 548
549 enable_irq(irq); 549 __enable_irq(irq);
550 550
551 ret = 0; 551 ret = 0;
552out_unlock: 552out_unlock:
@@ -557,6 +557,25 @@ out:
557 557
558EXPORT_SYMBOL(request_irq); 558EXPORT_SYMBOL(request_irq);
559 559
560void disable_irq_nosync(unsigned int irq)
561{
562 return __disable_irq(irq);
563}
564EXPORT_SYMBOL(disable_irq_nosync);
565
566void disable_irq(unsigned int irq)
567{
568 return __disable_irq(irq);
569}
570EXPORT_SYMBOL(disable_irq);
571
572void enable_irq(unsigned int irq)
573{
574 return __enable_irq(irq);
575}
576
577EXPORT_SYMBOL(enable_irq);
578
560/* We really don't need these at all on the Sparc. We only have 579/* We really don't need these at all on the Sparc. We only have
561 * stubs here because they are exported to modules. 580 * stubs here because they are exported to modules.
562 */ 581 */
diff --git a/arch/sparc/kernel/irq.h b/arch/sparc/kernel/irq.h
index 8254a86d97d0..32ef3ebd0a88 100644
--- a/arch/sparc/kernel/irq.h
+++ b/arch/sparc/kernel/irq.h
@@ -1,11 +1,31 @@
1#include <asm/btfixup.h> 1#include <asm/btfixup.h>
2 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
11BTFIXUPDEF_CALL(void, disable_irq, unsigned int)
12BTFIXUPDEF_CALL(void, enable_irq, unsigned int)
3BTFIXUPDEF_CALL(void, disable_pil_irq, unsigned int) 13BTFIXUPDEF_CALL(void, disable_pil_irq, unsigned int)
4BTFIXUPDEF_CALL(void, enable_pil_irq, unsigned int) 14BTFIXUPDEF_CALL(void, enable_pil_irq, unsigned int)
5BTFIXUPDEF_CALL(void, clear_clock_irq, void) 15BTFIXUPDEF_CALL(void, clear_clock_irq, void)
6BTFIXUPDEF_CALL(void, clear_profile_irq, int) 16BTFIXUPDEF_CALL(void, clear_profile_irq, int)
7BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int) 17BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
8 18
19static inline void __disable_irq(unsigned int irq)
20{
21 BTFIXUP_CALL(disable_irq)(irq);
22}
23
24static inline void __enable_irq(unsigned int irq)
25{
26 BTFIXUP_CALL(enable_irq)(irq);
27}
28
9static inline void disable_pil_irq(unsigned int irq) 29static inline void disable_pil_irq(unsigned int irq)
10{ 30{
11 BTFIXUP_CALL(disable_pil_irq)(irq); 31 BTFIXUP_CALL(disable_pil_irq)(irq);
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index d8e008a04e2b..55bac516dfe2 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -154,8 +154,6 @@ EXPORT_SYMBOL(BTFIXUP_CALL(___xchg32));
154#else 154#else
155EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id)); 155EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id));
156#endif 156#endif
157EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq));
158EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq));
159EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea)); 157EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea));
160EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea)); 158EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea));
161EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); 159EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl));
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 7a09186a432e..e0efab2a6bef 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -190,7 +190,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id)
190 kfree(action); 190 kfree(action);
191 191
192 if (!(*actionp)) 192 if (!(*actionp))
193 disable_irq(irq); 193 __disable_irq(irq);
194 194
195out_unlock: 195out_unlock:
196 spin_unlock_irqrestore(&irq_action_lock, flags); 196 spin_unlock_irqrestore(&irq_action_lock, flags);
@@ -348,7 +348,7 @@ int sun4d_request_irq(unsigned int irq,
348 else 348 else
349 *actionp = action; 349 *actionp = action;
350 350
351 enable_irq(irq); 351 __enable_irq(irq);
352 352
353 ret = 0; 353 ret = 0;
354out_unlock: 354out_unlock:
diff --git a/arch/sparc/kernel/tick14.c b/arch/sparc/kernel/tick14.c
index a55f0463b929..707bfda86570 100644
--- a/arch/sparc/kernel/tick14.c
+++ b/arch/sparc/kernel/tick14.c
@@ -64,7 +64,7 @@ void claim_ticker14(irq_handler_t handler,
64 64
65 /* first we copy the obp handler instructions 65 /* first we copy the obp handler instructions
66 */ 66 */
67 disable_irq(irq_nr); 67 __disable_irq(irq_nr);
68 if (!handler) 68 if (!handler)
69 return; 69 return;
70 70
@@ -81,6 +81,6 @@ void claim_ticker14(irq_handler_t handler,
81 NULL)) { 81 NULL)) {
82 install_linux_ticker(); 82 install_linux_ticker();
83 load_profile_irq(cpu, timeout); 83 load_profile_irq(cpu, timeout);
84 enable_irq(irq_nr); 84 __enable_irq(irq_nr);
85 } 85 }
86} 86}
diff --git a/include/asm-sparc/irq.h b/include/asm-sparc/irq.h
index 45827934f7bc..afb88a5973f0 100644
--- a/include/asm-sparc/irq.h
+++ b/include/asm-sparc/irq.h
@@ -7,41 +7,15 @@
7#ifndef _SPARC_IRQ_H 7#ifndef _SPARC_IRQ_H
8#define _SPARC_IRQ_H 8#define _SPARC_IRQ_H
9 9
10#include <linux/linkage.h>
11#include <linux/threads.h> /* For NR_CPUS */
12#include <linux/interrupt.h> 10#include <linux/interrupt.h>
13 11
14#include <asm/system.h> /* For SUN4M_NCPUS */
15#include <asm/btfixup.h>
16
17#define NR_IRQS 16 12#define NR_IRQS 16
18 13
19#define irq_canonicalize(irq) (irq) 14#define irq_canonicalize(irq) (irq)
20 15
21/* Dave Redman (djhr@tadpole.co.uk) 16extern void disable_irq_nosync(unsigned int irq);
22 * changed these to function pointers.. it saves cycles and will allow 17extern void disable_irq(unsigned int irq);
23 * the irq dependencies to be split into different files at a later date 18extern void enable_irq(unsigned int irq);
24 * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size.
25 * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
26 * Changed these to btfixup entities... It saves cycles :)
27 */
28BTFIXUPDEF_CALL(void, disable_irq, unsigned int)
29BTFIXUPDEF_CALL(void, enable_irq, unsigned int)
30
31static inline void disable_irq_nosync(unsigned int irq)
32{
33 BTFIXUP_CALL(disable_irq)(irq);
34}
35
36static inline void disable_irq(unsigned int irq)
37{
38 BTFIXUP_CALL(disable_irq)(irq);
39}
40
41static inline void enable_irq(unsigned int irq)
42{
43 BTFIXUP_CALL(enable_irq)(irq);
44}
45 19
46extern int request_fast_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, __const__ char *devname); 20extern int request_fast_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, __const__ char *devname);
47 21