Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79861
b: refs/heads/master
c: 5f627f8
h: refs/heads/master
i:
  79859: 2e4ca27
v: v3
  • Loading branch information
Ralf Baechle authored and Ingo Molnar committed Jan 30, 2008
1 parent 8690da4 commit 4e0c7a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b263295dbffd33b0fbff670720fa178c30e3392a
refs/heads/master: 5f627f8e122a163ce53908d55e088247db31f1d7
12 changes: 4 additions & 8 deletions trunk/arch/mips/kernel/i8253.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ DEFINE_SPINLOCK(i8253_lock);
static void init_pit_timer(enum clock_event_mode mode,
struct clock_event_device *evt)
{
unsigned long flags;

spin_lock_irqsave(&i8253_lock, flags);
spin_lock(&i8253_lock);

switch(mode) {
case CLOCK_EVT_MODE_PERIODIC:
Expand Down Expand Up @@ -55,7 +53,7 @@ static void init_pit_timer(enum clock_event_mode mode,
/* Nothing to do here */
break;
}
spin_unlock_irqrestore(&i8253_lock, flags);
spin_unlock(&i8253_lock);
}

/*
Expand All @@ -65,12 +63,10 @@ static void init_pit_timer(enum clock_event_mode mode,
*/
static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
{
unsigned long flags;

spin_lock_irqsave(&i8253_lock, flags);
spin_lock(&i8253_lock);
outb_p(delta & 0xff , PIT_CH0); /* LSB */
outb(delta >> 8 , PIT_CH0); /* MSB */
spin_unlock_irqrestore(&i8253_lock, flags);
spin_unlock(&i8253_lock);

return 0;
}
Expand Down
12 changes: 4 additions & 8 deletions trunk/arch/x86/kernel/i8253.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ struct clock_event_device *global_clock_event;
static void init_pit_timer(enum clock_event_mode mode,
struct clock_event_device *evt)
{
unsigned long flags;

spin_lock_irqsave(&i8253_lock, flags);
spin_lock(&i8253_lock);

switch(mode) {
case CLOCK_EVT_MODE_PERIODIC:
Expand Down Expand Up @@ -71,7 +69,7 @@ static void init_pit_timer(enum clock_event_mode mode,
/* Nothing to do here */
break;
}
spin_unlock_irqrestore(&i8253_lock, flags);
spin_unlock(&i8253_lock);
}

/*
Expand All @@ -81,12 +79,10 @@ static void init_pit_timer(enum clock_event_mode mode,
*/
static int pit_next_event(unsigned long delta, struct clock_event_device *evt)
{
unsigned long flags;

spin_lock_irqsave(&i8253_lock, flags);
spin_lock(&i8253_lock);
outb_p(delta & 0xff , PIT_CH0); /* LSB */
outb(delta >> 8 , PIT_CH0); /* MSB */
spin_unlock_irqrestore(&i8253_lock, flags);
spin_unlock(&i8253_lock);

return 0;
}
Expand Down

0 comments on commit 4e0c7a2

Please sign in to comment.