aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-06-17 10:48:17 -0400
committerTony Luck <tony.luck@intel.com>2016-06-17 16:45:05 -0400
commit70f4f9352317ed8bc70cd7fe2bf34a3f9f7f21e3 (patch)
tree5d1c230b03ddd6cf9a3a395b41382443e9cc3eca
parent5edb56491d4812c42175980759da53388e5d86f5 (diff)
ia64: efi: use timespec64 for persistent clock
We have a generic read_persistent_clock64 interface now, and can change the ia64 implementation to provide that instead of read_persistent_clock. The main point of this is to avoid the use of struct timespec in the global efi.h, which would cause build errors as soon as we want to build a kernel without 'struct timespec' defined on 32-bit architectures. Aside from this, we get a little closer to removing the __weak read_persistent_clock() definition, which relies on converting all architectures to provide read_persistent_clock64 instead. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--arch/ia64/kernel/efi.c4
-rw-r--r--arch/ia64/kernel/time.c2
-rw-r--r--include/linux/efi.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 3b7a60e40e8a..121295637d0d 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -236,7 +236,7 @@ STUB_GET_NEXT_HIGH_MONO_COUNT(virt, id)
236STUB_RESET_SYSTEM(virt, id) 236STUB_RESET_SYSTEM(virt, id)
237 237
238void 238void
239efi_gettimeofday (struct timespec *ts) 239efi_gettimeofday (struct timespec64 *ts)
240{ 240{
241 efi_time_t tm; 241 efi_time_t tm;
242 242
@@ -245,7 +245,7 @@ efi_gettimeofday (struct timespec *ts)
245 return; 245 return;
246 } 246 }
247 247
248 ts->tv_sec = mktime(tm.year, tm.month, tm.day, 248 ts->tv_sec = mktime64(tm.year, tm.month, tm.day,
249 tm.hour, tm.minute, tm.second); 249 tm.hour, tm.minute, tm.second);
250 ts->tv_nsec = tm.nanosecond; 250 ts->tv_nsec = tm.nanosecond;
251} 251}
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index c8dbe2acd735..6f892b94e906 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -355,7 +355,7 @@ static struct irqaction timer_irqaction = {
355 .name = "timer" 355 .name = "timer"
356}; 356};
357 357
358void read_persistent_clock(struct timespec *ts) 358void read_persistent_clock64(struct timespec64 *ts)
359{ 359{
360 efi_gettimeofday(ts); 360 efi_gettimeofday(ts);
361} 361}
diff --git a/include/linux/efi.h b/include/linux/efi.h
index f196dd0b0f2f..acb6adace01e 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -937,7 +937,7 @@ extern void efi_init (void);
937extern void *efi_get_pal_addr (void); 937extern void *efi_get_pal_addr (void);
938extern void efi_map_pal_code (void); 938extern void efi_map_pal_code (void);
939extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); 939extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
940extern void efi_gettimeofday (struct timespec *ts); 940extern void efi_gettimeofday (struct timespec64 *ts);
941extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ 941extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */
942#ifdef CONFIG_X86 942#ifdef CONFIG_X86
943extern void efi_late_init(void); 943extern void efi_late_init(void);