irq.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #include <linux/platform_device.h>
  2. #include <asm/btfixup.h>
  3. /*
  4. * Platform specific irq configuration
  5. * The individual platforms assign their platform
  6. * specifics in their init functions.
  7. */
  8. struct sparc_irq_config {
  9. void (*init_timers)(irq_handler_t);
  10. unsigned int (*build_device_irq)(struct platform_device *op,
  11. unsigned int real_irq);
  12. };
  13. extern struct sparc_irq_config sparc_irq_config;
  14. /* Dave Redman (djhr@tadpole.co.uk)
  15. * changed these to function pointers.. it saves cycles and will allow
  16. * the irq dependencies to be split into different files at a later date
  17. * sun4c_irq.c, sun4m_irq.c etc so we could reduce the kernel size.
  18. * Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  19. * Changed these to btfixup entities... It saves cycles :)
  20. */
  21. BTFIXUPDEF_CALL(void, disable_irq, unsigned int)
  22. BTFIXUPDEF_CALL(void, enable_irq, unsigned int)
  23. BTFIXUPDEF_CALL(void, disable_pil_irq, unsigned int)
  24. BTFIXUPDEF_CALL(void, enable_pil_irq, unsigned int)
  25. BTFIXUPDEF_CALL(void, clear_clock_irq, void)
  26. BTFIXUPDEF_CALL(void, load_profile_irq, int, unsigned int)
  27. static inline void __disable_irq(unsigned int irq)
  28. {
  29. BTFIXUP_CALL(disable_irq)(irq);
  30. }
  31. static inline void __enable_irq(unsigned int irq)
  32. {
  33. BTFIXUP_CALL(enable_irq)(irq);
  34. }
  35. static inline void disable_pil_irq(unsigned int irq)
  36. {
  37. BTFIXUP_CALL(disable_pil_irq)(irq);
  38. }
  39. static inline void enable_pil_irq(unsigned int irq)
  40. {
  41. BTFIXUP_CALL(enable_pil_irq)(irq);
  42. }
  43. static inline void clear_clock_irq(void)
  44. {
  45. BTFIXUP_CALL(clear_clock_irq)();
  46. }
  47. static inline void load_profile_irq(int cpu, int limit)
  48. {
  49. BTFIXUP_CALL(load_profile_irq)(cpu, limit);
  50. }
  51. #ifdef CONFIG_SMP
  52. BTFIXUPDEF_CALL(void, set_cpu_int, int, int)
  53. BTFIXUPDEF_CALL(void, clear_cpu_int, int, int)
  54. BTFIXUPDEF_CALL(void, set_irq_udt, int)
  55. #define set_cpu_int(cpu,level) BTFIXUP_CALL(set_cpu_int)(cpu,level)
  56. #define clear_cpu_int(cpu,level) BTFIXUP_CALL(clear_cpu_int)(cpu,level)
  57. #define set_irq_udt(cpu) BTFIXUP_CALL(set_irq_udt)(cpu)
  58. #endif