23 Nov, 2018

1 commit

  • Update the time(r) core files files with the correct SPDX license
    identifier based on the license text in the file itself. The SPDX
    identifier is a legally binding shorthand, which can be used instead of the
    full boiler plate text.

    This work is based on a script and data from Philippe Ombredanne, Kate
    Stewart and myself. The data has been created with two independent license
    scanners and manual inspection.

    The following files do not contain any direct license information and have
    been omitted from the big initial SPDX changes:

    timeconst.bc: The .bc files were not touched
    time.c, timer.c, timekeeping.c: Licence was deduced from EXPORT_SYMBOL_GPL

    As those files do not contain direct license references they fall under the
    project license, i.e. GPL V2 only.

    Signed-off-by: Thomas Gleixner
    Acked-by: Kees Cook
    Acked-by: Ingo Molnar
    Acked-by: John Stultz
    Acked-by: Corey Minyard
    Cc: Peter Zijlstra
    Cc: Kate Stewart
    Cc: Philippe Ombredanne
    Cc: Russell King
    Cc: Richard Cochran
    Cc: Nicolas Pitre
    Cc: David Riley
    Cc: Colin Cross
    Cc: Mark Brown
    Cc: H. Peter Anvin
    Cc: Paul E. McKenney
    Link: https://lkml.kernel.org/r/20181031182252.879109557@linutronix.de

    Thomas Gleixner
     

21 Jun, 2016

1 commit

  • time_to_tm() takes time_t as an argument.
    time_t is not y2038 safe.
    Add time64_to_tm() that takes time64_t as an argument
    which is y2038 safe.
    The plan is to eventually replace all calls to time_to_tm()
    by time64_to_tm().

    Cc: Prarit Bhargava
    Cc: Richard Cochran
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Deepa Dinamani
    Signed-off-by: John Stultz

    Deepa Dinamani
     

24 Sep, 2009

1 commit

  • There are many similar code in kernel for one object: convert time between
    calendar time and broken-down time.

    Here is some source I found:
    fs/ncpfs/dir.c
    fs/smbfs/proc.c
    fs/fat/misc.c
    fs/udf/udftime.c
    fs/cifs/netmisc.c
    net/netfilter/xt_time.c
    drivers/scsi/ips.c
    drivers/input/misc/hp_sdc_rtc.c
    drivers/rtc/rtc-lib.c
    arch/ia64/hp/sim/boot/fw-emu.c
    arch/m68k/mac/misc.c
    arch/powerpc/kernel/time.c
    arch/parisc/include/asm/rtc.h
    ...

    We can make a common function for this type of conversion, At least we
    can get following benefit:

    1: Make kernel simple and unify
    2: Easy to fix bug in converting code
    3: Reduce clone of code in future
    For example, I'm trying to make ftrace display walltime,
    this patch will make me easy.

    This code is based on code from glibc-2.6

    Signed-off-by: Zhao Lei
    Cc: OGAWA Hirofumi
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Pavel Machek
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhaolei