Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SPARC32]: Take enable_irq/disable_irq out of line.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Al Viro and committed by
David S. Miller
0f516813 32231a66

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