* [PATCH] x86: remove unused efi_get_time function
@ 2016-06-17 14:56 Arnd Bergmann
2016-06-17 14:59 ` Ard Biesheuvel
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-06-17 14:56 UTC (permalink / raw)
To: Matt Fleming, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86
Cc: y2038, Arnd Bergmann, Ard Biesheuvel, linux-efi, linux-kernel
Nothing calls the efi_get_time function on x86, but it does suffer
from the 32-bit time_t overflow in 2038.
This removes the function, we can always put it back in case we need
it later.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/x86/platform/efi/efi.c | 15 ---------------
include/linux/efi.h | 1 -
2 files changed, 16 deletions(-)
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 56400d03409f..105e34747116 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -97,21 +97,6 @@ static efi_status_t __init phys_efi_set_virtual_address_map(
return status;
}
-void efi_get_time(struct timespec *now)
-{
- efi_status_t status;
- efi_time_t eft;
- efi_time_cap_t cap;
-
- status = efi.get_time(&eft, &cap);
- if (status != EFI_SUCCESS)
- pr_err("Oops: efitime: can't read time!\n");
-
- now->tv_sec = mktime(eft.year, eft.month, eft.day, eft.hour,
- eft.minute, eft.second);
- now->tv_nsec = 0;
-}
-
void __init efi_find_mirror(void)
{
efi_memory_desc_t *md;
diff --git a/include/linux/efi.h b/include/linux/efi.h
index acb6adace01e..a402a527592f 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -975,7 +975,6 @@ extern u64 efi_mem_desc_end(efi_memory_desc_t *md);
extern int efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md);
extern void efi_initialize_iomem_resources(struct resource *code_resource,
struct resource *data_resource, struct resource *bss_resource);
-extern void efi_get_time(struct timespec *now);
extern void efi_reserve_boot_services(void);
extern int efi_get_fdt_params(struct efi_fdt_params *params);
extern struct kobject *efi_kobj;
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] x86: remove unused efi_get_time function
2016-06-17 14:56 [PATCH] x86: remove unused efi_get_time function Arnd Bergmann
@ 2016-06-17 14:59 ` Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2016-06-17 14:59 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Matt Fleming, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
y2038, linux-efi, linux-kernel
On 17 June 2016 at 16:56, Arnd Bergmann <arnd@arndb.de> wrote:
> Nothing calls the efi_get_time function on x86, but it does suffer
> from the 32-bit time_t overflow in 2038.
>
> This removes the function, we can always put it back in case we need
> it later.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> arch/x86/platform/efi/efi.c | 15 ---------------
> include/linux/efi.h | 1 -
> 2 files changed, 16 deletions(-)
>
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 56400d03409f..105e34747116 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -97,21 +97,6 @@ static efi_status_t __init phys_efi_set_virtual_address_map(
> return status;
> }
>
> -void efi_get_time(struct timespec *now)
> -{
> - efi_status_t status;
> - efi_time_t eft;
> - efi_time_cap_t cap;
> -
> - status = efi.get_time(&eft, &cap);
> - if (status != EFI_SUCCESS)
> - pr_err("Oops: efitime: can't read time!\n");
> -
> - now->tv_sec = mktime(eft.year, eft.month, eft.day, eft.hour,
> - eft.minute, eft.second);
> - now->tv_nsec = 0;
> -}
> -
> void __init efi_find_mirror(void)
> {
> efi_memory_desc_t *md;
> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index acb6adace01e..a402a527592f 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -975,7 +975,6 @@ extern u64 efi_mem_desc_end(efi_memory_desc_t *md);
> extern int efi_mem_desc_lookup(u64 phys_addr, efi_memory_desc_t *out_md);
> extern void efi_initialize_iomem_resources(struct resource *code_resource,
> struct resource *data_resource, struct resource *bss_resource);
> -extern void efi_get_time(struct timespec *now);
> extern void efi_reserve_boot_services(void);
> extern int efi_get_fdt_params(struct efi_fdt_params *params);
> extern struct kobject *efi_kobj;
> --
> 2.9.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-17 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 14:56 [PATCH] x86: remove unused efi_get_time function Arnd Bergmann
2016-06-17 14:59 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®