Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arnd Bergmann and committed by
Tony Luck
70f4f935 5edb5649

+4 -4
+2 -2
arch/ia64/kernel/efi.c
··· 236 236 STUB_RESET_SYSTEM(virt, id) 237 237 238 238 void 239 - efi_gettimeofday (struct timespec *ts) 239 + efi_gettimeofday (struct timespec64 *ts) 240 240 { 241 241 efi_time_t tm; 242 242 ··· 245 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 249 tm.hour, tm.minute, tm.second); 250 250 ts->tv_nsec = tm.nanosecond; 251 251 }
+1 -1
arch/ia64/kernel/time.c
··· 355 355 .name = "timer" 356 356 }; 357 357 358 - void read_persistent_clock(struct timespec *ts) 358 + void read_persistent_clock64(struct timespec64 *ts) 359 359 { 360 360 efi_gettimeofday(ts); 361 361 }
+1 -1
include/linux/efi.h
··· 937 937 extern void *efi_get_pal_addr (void); 938 938 extern void efi_map_pal_code (void); 939 939 extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); 940 - extern void efi_gettimeofday (struct timespec *ts); 940 + extern void efi_gettimeofday (struct timespec64 *ts); 941 941 extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ 942 942 #ifdef CONFIG_X86 943 943 extern void efi_late_init(void);