Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73899
b: refs/heads/master
c: c399da0
h: refs/heads/master
i:
  73897: 9661d17
  73895: d79068d
v: v3
  • Loading branch information
David P. Reed authored and Thomas Gleixner committed Nov 17, 2007
1 parent 1b7d987 commit a5740a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: fa6a1a554b50cbb7763f6907e6fef927ead480d9
refs/heads/master: c399da0d97e06803e51085ec076b63a3168aad1b
11 changes: 4 additions & 7 deletions trunk/arch/x86/kernel/time_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,15 @@ static int set_rtc_mmss(unsigned long nowtime)
int retval = 0;
int real_seconds, real_minutes, cmos_minutes;
unsigned char control, freq_select;
unsigned long flags;

/*
* IRQs are disabled when we're called from the timer interrupt,
* no need for spin_lock_irqsave()
* set_rtc_mmss is called when irqs are enabled, so disable irqs here
*/

spin_lock(&rtc_lock);

spin_lock_irqsave(&rtc_lock, flags);
/*
* Tell the clock it's being set and stop it.
*/

control = CMOS_READ(RTC_CONTROL);
CMOS_WRITE(control | RTC_SET, RTC_CONTROL);

Expand Down Expand Up @@ -138,7 +135,7 @@ static int set_rtc_mmss(unsigned long nowtime)
CMOS_WRITE(control, RTC_CONTROL);
CMOS_WRITE(freq_select, RTC_FREQ_SELECT);

spin_unlock(&rtc_lock);
spin_unlock_irqrestore(&rtc_lock, flags);

return retval;
}
Expand Down

0 comments on commit a5740a0

Please sign in to comment.