diff options
Diffstat (limited to 'arch/x86/kernel/rtc.c')
-rw-r--r-- | arch/x86/kernel/rtc.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c index bf67dcb4a44c..1cfbbfc3ae26 100644 --- a/arch/x86/kernel/rtc.c +++ b/arch/x86/kernel/rtc.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/pnp.h> | 8 | #include <linux/pnp.h> |
9 | 9 | ||
10 | #include <asm/vsyscall.h> | 10 | #include <asm/vsyscall.h> |
11 | #include <asm/x86_init.h> | ||
11 | #include <asm/time.h> | 12 | #include <asm/time.h> |
12 | 13 | ||
13 | #ifdef CONFIG_X86_32 | 14 | #ifdef CONFIG_X86_32 |
@@ -165,13 +166,13 @@ void rtc_cmos_write(unsigned char val, unsigned char addr) | |||
165 | } | 166 | } |
166 | EXPORT_SYMBOL(rtc_cmos_write); | 167 | EXPORT_SYMBOL(rtc_cmos_write); |
167 | 168 | ||
168 | static int set_rtc_mmss(unsigned long nowtime) | 169 | int update_persistent_clock(struct timespec now) |
169 | { | 170 | { |
170 | unsigned long flags; | 171 | unsigned long flags; |
171 | int retval; | 172 | int retval; |
172 | 173 | ||
173 | spin_lock_irqsave(&rtc_lock, flags); | 174 | spin_lock_irqsave(&rtc_lock, flags); |
174 | retval = set_wallclock(nowtime); | 175 | retval = x86_platform.set_wallclock(now.tv_sec); |
175 | spin_unlock_irqrestore(&rtc_lock, flags); | 176 | spin_unlock_irqrestore(&rtc_lock, flags); |
176 | 177 | ||
177 | return retval; | 178 | return retval; |
@@ -183,18 +184,13 @@ void read_persistent_clock(struct timespec *ts) | |||
183 | unsigned long retval, flags; | 184 | unsigned long retval, flags; |
184 | 185 | ||
185 | spin_lock_irqsave(&rtc_lock, flags); | 186 | spin_lock_irqsave(&rtc_lock, flags); |
186 | retval = get_wallclock(); | 187 | retval = x86_platform.get_wallclock(); |
187 | spin_unlock_irqrestore(&rtc_lock, flags); | 188 | spin_unlock_irqrestore(&rtc_lock, flags); |
188 | 189 | ||
189 | ts->tv_sec = retval; | 190 | ts->tv_sec = retval; |
190 | ts->tv_nsec = 0; | 191 | ts->tv_nsec = 0; |
191 | } | 192 | } |
192 | 193 | ||
193 | int update_persistent_clock(struct timespec now) | ||
194 | { | ||
195 | return set_rtc_mmss(now.tv_sec); | ||
196 | } | ||
197 | |||
198 | unsigned long long native_read_tsc(void) | 194 | unsigned long long native_read_tsc(void) |
199 | { | 195 | { |
200 | return __native_read_tsc(); | 196 | return __native_read_tsc(); |