aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/i8253.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index c2d497ceffdd..fc4aa07b6d35 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -24,9 +24,7 @@ DEFINE_SPINLOCK(i8253_lock);
24static void init_pit_timer(enum clock_event_mode mode, 24static void init_pit_timer(enum clock_event_mode mode,
25 struct clock_event_device *evt) 25 struct clock_event_device *evt)
26{ 26{
27 unsigned long flags; 27 spin_lock(&i8253_lock);
28
29 spin_lock_irqsave(&i8253_lock, flags);
30 28
31 switch(mode) { 29 switch(mode) {
32 case CLOCK_EVT_MODE_PERIODIC: 30 case CLOCK_EVT_MODE_PERIODIC:
@@ -55,7 +53,7 @@ static void init_pit_timer(enum clock_event_mode mode,
55 /* Nothing to do here */ 53 /* Nothing to do here */
56 break; 54 break;
57 } 55 }
58 spin_unlock_irqrestore(&i8253_lock, flags); 56 spin_unlock(&i8253_lock);
59} 57}
60 58
61/* 59/*
@@ -65,12 +63,10 @@ static void init_pit_timer(enum clock_event_mode mode,
65 */ 63 */
66static int pit_next_event(unsigned long delta, struct clock_event_device *evt) 64static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
67{ 65{
68 unsigned long flags; 66 spin_lock(&i8253_lock);
69
70 spin_lock_irqsave(&i8253_lock, flags);
71 outb_p(delta & 0xff , PIT_CH0); /* LSB */ 67 outb_p(delta & 0xff , PIT_CH0); /* LSB */
72 outb(delta >> 8 , PIT_CH0); /* MSB */ 68 outb(delta >> 8 , PIT_CH0); /* MSB */
73 spin_unlock_irqrestore(&i8253_lock, flags); 69 spin_unlock(&i8253_lock);
74 70
75 return 0; 71 return 0;
76} 72}