Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: Fix up clockevents broadcasting.

This fixes up the clockevents broadcasting code as detailed in commit
ee348d5a1d810bc9958cabb7c27302aab235d36e ("[ARM] realview: fix broadcast
tick support"). This saves us from having to do strange ordering things
with the broadcast clockevent device, relying on the rating instead.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

+9 -6
+2
arch/sh/kernel/cpu/sh4a/smp-shx3.c
··· 57 57 { 58 58 int i; 59 59 60 + local_timer_setup(0); 61 + 60 62 BUILD_BUG_ON(SMP_MSG_NR >= 8); 61 63 62 64 for (i = 0; i < SMP_MSG_NR; i++)
+7 -2
arch/sh/kernel/localtimer.c
··· 22 22 #include <linux/jiffies.h> 23 23 #include <linux/percpu.h> 24 24 #include <linux/clockchips.h> 25 + #include <linux/hardirq.h> 25 26 #include <linux/irq.h> 26 27 27 28 static DEFINE_PER_CPU(struct clock_event_device, local_clockevent); ··· 34 33 { 35 34 struct clock_event_device *clk = &__get_cpu_var(local_clockevent); 36 35 36 + irq_enter(); 37 37 clk->event_handler(clk); 38 + irq_exit(); 38 39 } 39 40 40 41 static void dummy_timer_set_mode(enum clock_event_mode mode, ··· 49 46 struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); 50 47 51 48 clk->name = "dummy_timer"; 52 - clk->features = CLOCK_EVT_FEAT_DUMMY; 53 - clk->rating = 200; 49 + clk->features = CLOCK_EVT_FEAT_ONESHOT | 50 + CLOCK_EVT_FEAT_PERIODIC | 51 + CLOCK_EVT_FEAT_DUMMY; 52 + clk->rating = 400; 54 53 clk->mult = 1; 55 54 clk->set_mode = dummy_timer_set_mode; 56 55 clk->broadcast = smp_timer_broadcast;
-4
arch/sh/kernel/time.c
··· 119 119 set_normalized_timespec(&wall_to_monotonic, 120 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 122 late_time_init = sh_late_time_init; 127 123 }