diff options
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/mc146818rtc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/asm-i386/mc146818rtc.h b/include/asm-i386/mc146818rtc.h index 99a890047023..1613b42eaf58 100644 --- a/include/asm-i386/mc146818rtc.h +++ b/include/asm-i386/mc146818rtc.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <asm/system.h> | 8 | #include <asm/system.h> |
9 | #include <asm/processor.h> | ||
9 | #include <linux/mc146818rtc.h> | 10 | #include <linux/mc146818rtc.h> |
10 | 11 | ||
11 | #ifndef RTC_PORT | 12 | #ifndef RTC_PORT |
@@ -43,8 +44,10 @@ static inline void lock_cmos(unsigned char reg) | |||
43 | unsigned long new; | 44 | unsigned long new; |
44 | new = ((smp_processor_id()+1) << 8) | reg; | 45 | new = ((smp_processor_id()+1) << 8) | reg; |
45 | for (;;) { | 46 | for (;;) { |
46 | if (cmos_lock) | 47 | if (cmos_lock) { |
48 | cpu_relax(); | ||
47 | continue; | 49 | continue; |
50 | } | ||
48 | if (__cmpxchg(&cmos_lock, 0, new, sizeof(cmos_lock)) == 0) | 51 | if (__cmpxchg(&cmos_lock, 0, new, sizeof(cmos_lock)) == 0) |
49 | return; | 52 | return; |
50 | } | 53 | } |