diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-06-25 14:39:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-25 14:39:45 -0400 |
commit | 8749af68216e1ebf6460992fce548f400ecf63a4 (patch) | |
tree | 6968809c357c1cf8167208f480f0e974bf9af955 /include | |
parent | 321ab6a5fab812658626aee6bce2617f8cfb3a55 (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')
-rw-r--r-- | include/asm-arm/mach/time.h | 21 | ||||
-rw-r--r-- | include/asm-arm/signal.h | 1 |
2 files changed, 22 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 | |||
54 | struct 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 | ||
62 | void timer_dyn_reprogram(void); | ||
63 | #endif | ||
64 | |||
44 | extern struct sys_timer *system_timer; | 65 | extern struct sys_timer *system_timer; |
45 | extern void timer_tick(struct pt_regs *); | 66 | extern void timer_tick(struct pt_regs *); |
46 | 67 | ||
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h index 46e69ae395af..760f6e65af05 100644 --- a/include/asm-arm/signal.h +++ b/include/asm-arm/signal.h | |||
@@ -114,6 +114,7 @@ typedef unsigned long sigset_t; | |||
114 | #define SIGSTKSZ 8192 | 114 | #define SIGSTKSZ 8192 |
115 | 115 | ||
116 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
117 | #define SA_TIMER 0x40000000 | ||
117 | #define SA_IRQNOMASK 0x08000000 | 118 | #define SA_IRQNOMASK 0x08000000 |
118 | #endif | 119 | #endif |
119 | 120 | ||