diff options
| -rw-r--r-- | arch/sh/kernel/cpu/sh4a/smp-shx3.c | 2 | ||||
| -rw-r--r-- | arch/sh/kernel/localtimer.c | 9 | ||||
| -rw-r--r-- | arch/sh/kernel/time.c | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/smp-shx3.c b/arch/sh/kernel/cpu/sh4a/smp-shx3.c index 2b6b0d50c57..185ec3976a2 100644 --- a/arch/sh/kernel/cpu/sh4a/smp-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/smp-shx3.c | |||
| @@ -57,6 +57,8 @@ void __init plat_prepare_cpus(unsigned int max_cpus) | |||
| 57 | { | 57 | { |
| 58 | int i; | 58 | int i; |
| 59 | 59 | ||
| 60 | local_timer_setup(0); | ||
| 61 | |||
| 60 | BUILD_BUG_ON(SMP_MSG_NR >= 8); | 62 | BUILD_BUG_ON(SMP_MSG_NR >= 8); |
| 61 | 63 | ||
| 62 | for (i = 0; i < SMP_MSG_NR; i++) | 64 | for (i = 0; i < SMP_MSG_NR; i++) |
diff --git a/arch/sh/kernel/localtimer.c b/arch/sh/kernel/localtimer.c index 96e8eaea1e6..0b04e7d4a9b 100644 --- a/arch/sh/kernel/localtimer.c +++ b/arch/sh/kernel/localtimer.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/jiffies.h> | 22 | #include <linux/jiffies.h> |
| 23 | #include <linux/percpu.h> | 23 | #include <linux/percpu.h> |
| 24 | #include <linux/clockchips.h> | 24 | #include <linux/clockchips.h> |
| 25 | #include <linux/hardirq.h> | ||
| 25 | #include <linux/irq.h> | 26 | #include <linux/irq.h> |
| 26 | 27 | ||
| 27 | static DEFINE_PER_CPU(struct clock_event_device, local_clockevent); | 28 | static DEFINE_PER_CPU(struct clock_event_device, local_clockevent); |
| @@ -33,7 +34,9 @@ void local_timer_interrupt(void) | |||
| 33 | { | 34 | { |
| 34 | struct clock_event_device *clk = &__get_cpu_var(local_clockevent); | 35 | struct clock_event_device *clk = &__get_cpu_var(local_clockevent); |
| 35 | 36 | ||
| 37 | irq_enter(); | ||
| 36 | clk->event_handler(clk); | 38 | clk->event_handler(clk); |
| 39 | irq_exit(); | ||
| 37 | } | 40 | } |
| 38 | 41 | ||
| 39 | static void dummy_timer_set_mode(enum clock_event_mode mode, | 42 | static void dummy_timer_set_mode(enum clock_event_mode mode, |
| @@ -46,8 +49,10 @@ void __cpuinit local_timer_setup(unsigned int cpu) | |||
| 46 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); | 49 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); |
| 47 | 50 | ||
| 48 | clk->name = "dummy_timer"; | 51 | clk->name = "dummy_timer"; |
| 49 | clk->features = CLOCK_EVT_FEAT_DUMMY; | 52 | clk->features = CLOCK_EVT_FEAT_ONESHOT | |
| 50 | clk->rating = 200; | 53 | CLOCK_EVT_FEAT_PERIODIC | |
| 54 | CLOCK_EVT_FEAT_DUMMY; | ||
| 55 | clk->rating = 400; | ||
| 51 | clk->mult = 1; | 56 | clk->mult = 1; |
| 52 | clk->set_mode = dummy_timer_set_mode; | 57 | clk->set_mode = dummy_timer_set_mode; |
| 53 | clk->broadcast = smp_timer_broadcast; | 58 | clk->broadcast = smp_timer_broadcast; |
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index 7f95f479060..632aff53328 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c | |||
| @@ -119,9 +119,5 @@ void __init time_init(void) | |||
| 119 | set_normalized_timespec(&wall_to_monotonic, | 119 | set_normalized_timespec(&wall_to_monotonic, |
| 120 | -xtime.tv_sec, -xtime.tv_nsec); | 120 | -xtime.tv_sec, -xtime.tv_nsec); |
| 121 | 121 | ||
| 122 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST | ||
| 123 | local_timer_setup(smp_processor_id()); | ||
| 124 | #endif | ||
| 125 | |||
| 126 | late_time_init = sh_late_time_init; | 122 | late_time_init = sh_late_time_init; |
| 127 | } | 123 | } |
