localtimer.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. /*
  22. * Called from C code
  23. */
  24. void handle_local_timer(struct pt_regs *);
  25. #ifdef CONFIG_LOCAL_TIMERS
  26. #ifdef CONFIG_HAVE_ARM_TWD
  27. #include "smp_twd.h"
  28. #define local_timer_ack() twd_timer_ack()
  29. #else
  30. /*
  31. * Platform provides this to acknowledge a local timer IRQ.
  32. * Returns true if the local timer IRQ is to be processed.
  33. */
  34. int local_timer_ack(void);
  35. #endif
  36. /*
  37. * Setup a local timer interrupt for a CPU.
  38. */
  39. int local_timer_setup(struct clock_event_device *);
  40. #else
  41. static inline int local_timer_setup(struct clock_event_device *evt)
  42. {
  43. return -ENXIO;
  44. }
  45. #endif
  46. #endif