aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/mach/time.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-25 14:39:45 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-06-25 14:39:45 -0400
commit8749af68216e1ebf6460992fce548f400ecf63a4 (patch)
tree6968809c357c1cf8167208f480f0e974bf9af955 /include/asm-arm/mach/time.h
parent321ab6a5fab812658626aee6bce2617f8cfb3a55 (diff)
[PATCH] ARM: Generic Dynamic Tick Timer support for ARM, take 4
This patch adds support for Dynamic Tick Timer for ARM. Dynamic Tick is also known as VST (Variable Scheduling Timeouts). Dynamic Tick has been in use in the OMAP tree since last October. The patch is not intrusive, and does not do anything unless CONFIG_NO_IDLE_HZ is defined. This patch has the following fixed based on comments from RMK: - Time is updated before calling interrupt handlers. - Added new interrupt flag SA_TIMER to avoid duplicate timer interrupts - Moved struct dyn_tick_timer to time.h until we at some point probably have an arch independent dyn-tick.h - Cleaned up testing for DYN_TICK_ENABLED in irq.c I've cleaned up this patch to fix some remaining issues: - Call the timer tick handler with irqs disabled, as it would be from a normal interrupt - if we have a dyn_tick, we better implement all methods. - generic timer_dyn_reprogram() call, to be called before sleeping - added command line option - "dyntick=" to allow boot-time control of this feature -- rmk Signed-off-by: Tony Lindgren Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/mach/time.h')
-rw-r--r--include/asm-arm/mach/time.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h
index 5cf4fd659fd5..047980ad18d1 100644
--- a/include/asm-arm/mach/time.h
+++ b/include/asm-arm/mach/time.h
@@ -39,8 +39,29 @@ struct sys_timer {
39 void (*suspend)(void); 39 void (*suspend)(void);
40 void (*resume)(void); 40 void (*resume)(void);
41 unsigned long (*offset)(void); 41 unsigned long (*offset)(void);
42
43#ifdef CONFIG_NO_IDLE_HZ
44 struct dyn_tick_timer *dyn_tick;
45#endif
46};
47
48#ifdef CONFIG_NO_IDLE_HZ
49
50#define DYN_TICK_SKIPPING (1 << 2)
51#define DYN_TICK_ENABLED (1 << 1)
52#define DYN_TICK_SUITABLE (1 << 0)
53
54struct dyn_tick_timer {
55 unsigned int state; /* Current state */
56 int (*enable)(void); /* Enables dynamic tick */
57 int (*disable)(void); /* Disables dynamic tick */
58 void (*reprogram)(unsigned long); /* Reprograms the timer */
59 int (*handler)(int, void *, struct pt_regs *);
42}; 60};
43 61
62void timer_dyn_reprogram(void);
63#endif
64
44extern struct sys_timer *system_timer; 65extern struct sys_timer *system_timer;
45extern void timer_tick(struct pt_regs *); 66extern void timer_tick(struct pt_regs *);
46 67