Commit 70f4f935 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Tony Luck

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent 5edb5649
...@@ -236,7 +236,7 @@ STUB_GET_NEXT_HIGH_MONO_COUNT(virt, id) ...@@ -236,7 +236,7 @@ STUB_GET_NEXT_HIGH_MONO_COUNT(virt, id)
STUB_RESET_SYSTEM(virt, id) STUB_RESET_SYSTEM(virt, id)
void void
efi_gettimeofday (struct timespec *ts) efi_gettimeofday (struct timespec64 *ts)
{ {
efi_time_t tm; efi_time_t tm;
...@@ -245,7 +245,7 @@ efi_gettimeofday (struct timespec *ts) ...@@ -245,7 +245,7 @@ efi_gettimeofday (struct timespec *ts)
return; return;
} }
ts->tv_sec = mktime(tm.year, tm.month, tm.day, ts->tv_sec = mktime64(tm.year, tm.month, tm.day,
tm.hour, tm.minute, tm.second); tm.hour, tm.minute, tm.second);
ts->tv_nsec = tm.nanosecond; ts->tv_nsec = tm.nanosecond;
} }
......
...@@ -355,7 +355,7 @@ static struct irqaction timer_irqaction = { ...@@ -355,7 +355,7 @@ static struct irqaction timer_irqaction = {
.name = "timer" .name = "timer"
}; };
void read_persistent_clock(struct timespec *ts) void read_persistent_clock64(struct timespec64 *ts)
{ {
efi_gettimeofday(ts); efi_gettimeofday(ts);
} }
......
...@@ -937,7 +937,7 @@ extern void efi_init (void); ...@@ -937,7 +937,7 @@ extern void efi_init (void);
extern void *efi_get_pal_addr (void); extern void *efi_get_pal_addr (void);
extern void efi_map_pal_code (void); extern void efi_map_pal_code (void);
extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
extern void efi_gettimeofday (struct timespec *ts); extern void efi_gettimeofday (struct timespec64 *ts);
extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */ extern void efi_enter_virtual_mode (void); /* switch EFI to virtual mode, if possible */
#ifdef CONFIG_X86 #ifdef CONFIG_X86
extern void efi_late_init(void); extern void efi_late_init(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment