localtimer.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * arch/arm/include/asm/localtimer.h
  3. *
  4. * Copyright (C) 2004-2005 ARM Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARM_LOCALTIMER_H
  11. #define __ASM_ARM_LOCALTIMER_H
  12. struct clock_event_device;
  13. /*
  14. * Setup a per-cpu timer, whether it be a local timer or dummy broadcast
  15. */
  16. void percpu_timer_setup(void);
  17. /*
  18. * Called from assembly, this is the local timer IRQ handler
  19. */
  20. asmlinkage void do_local_timer(struct pt_regs *);
  21. #ifdef CONFIG_LOCAL_TIMERS
  22. #ifdef CONFIG_HAVE_ARM_TWD
  23. #include "smp_twd.h"
  24. #define local_timer_ack() twd_timer_ack()
  25. #define local_timer_stop() twd_timer_stop()
  26. #else
  27. /*
  28. * Platform provides this to acknowledge a local timer IRQ.
  29. * Returns true if the local timer IRQ is to be processed.
  30. */
  31. int local_timer_ack(void);
  32. /*
  33. * Stop a local timer interrupt.
  34. */
  35. void local_timer_stop(void);
  36. #endif
  37. /*
  38. * Setup a local timer interrupt for a CPU.
  39. */
  40. void local_timer_setup(struct clock_event_device *);
  41. #else
  42. static inline void local_timer_stop(void)
  43. {
  44. }
  45. #endif
  46. #endif