Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Sep 24, 2012
  1. @johnstultz-work

    time: Move update_vsyscall definitions to timekeeper_internal.h

    johnstultz-work authored
    Since users will need to include timekeeper_internal.h, move
    update_vsyscall definitions to timekeeper_internal.h.
    Cc: Tony Luck <>
    Cc: Paul Mackerras <>
    Cc: Benjamin Herrenschmidt <>
    Cc: Andy Lutomirski <>
    Cc: Martin Schwidefsky <>
    Cc: Paul Turner <>
    Cc: Steven Rostedt <>
    Cc: Richard Cochran <>
    Cc: Prarit Bhargava <>
    Cc: Thomas Gleixner <>
    Signed-off-by: John Stultz <>
Commits on Mar 16, 2012
  1. @johnstultz-work

    time: Remove bogus comments

    Thomas Gleixner authored johnstultz-work committed
    There is no global irq lock which makes a syscall magically SMP
    safe. Remove the outdated comment concerning do_settimeofday() as
    Signed-off-by: Thomas Gleixner <>
    Signed-off-by: John Stultz <>
Commits on Oct 31, 2011
  1. @paulgortmaker

    kernel: Map most files to use export.h instead of module.h

    paulgortmaker authored
    The changed files were only including linux/module.h for the
    EXPORT_SYMBOL infrastructure, and nothing else.  Revector them
    onto the isolated export header for faster compile times.
    Nothing to see here but a whole lot of instances of:
      -#include <linux/module.h>
      +#include <linux/export.h>
    This commit is only changing the kernel dir; next targets
    will probably be mm, fs, the arch dirs, etc.
    Signed-off-by: Paul Gortmaker <>
Commits on Sep 21, 2011
  1. time: Change jiffies_to_clock_t() argument type to unsigned long

    hank authored Ingo Molnar committed
    The parameter's origin type is long. On an i386 architecture, it can
    easily be larger than 0x80000000, causing this function to convert it
    to a sign-extended u64 type.
    Change the type to unsigned long so we get the correct result.
    Signed-off-by: hank <>
    Cc: John Stultz <>
    Cc: <>
    [ build fix ]
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Thomas Gleixner <>
    Signed-off-by: Ingo Molnar <>
Commits on Mar 16, 2011
  1. Merge branch 'timers-core-for-linus' of git://…

    * 'timers-core-for-linus' of git:// (62 commits)
      posix-clocks: Check write permissions in posix syscalls
      hrtimer: Remove empty hrtimer_init_hres_timer()
      hrtimer: Update hrtimer->state documentation
      hrtimer: Update base[CLOCK_BOOTTIME].offset correctly
      timers: Export CLOCK_BOOTTIME via the posix timers interface
      timers: Add CLOCK_BOOTTIME hrtimer base
      time: Extend get_xtime_and_monotonic_offset() to also return sleep
      time: Introduce get_monotonic_boottime and ktime_get_boottime
      hrtimers: extend hrtimer base code to handle more then 2 clockids
      ntp: Remove redundant and incorrect parameter check
      mn10300: Switch do_timer() to xtimer_update()
      posix clocks: Introduce dynamic clocks
      posix-timers: Cleanup namespace
      posix-timers: Add support for fd based clocks
      x86: Add clock_adjtime for x86
      posix-timers: Introduce a syscall for clock tuning.
      time: Splitout compat timex accessors
      ntp: Add ADJ_SETOFFSET mode bit
      time: Introduce timekeeping_inject_offset
      posix-timer: Update comment
    Fix up new system-call-related conflicts in
    (name_to_handle_at()/open_by_handle_at() vs clock_adjtime()), and some
    due to movement of get_jiffies_64() in:
Commits on Feb 2, 2011
  1. time: Correct the *settime* parameters

    Richard Cochran authored Thomas Gleixner committed
    Both settimeofday() and clock_settime() promise with a 'const'
    attribute not to alter the arguments passed in. This patch adds the
    missing 'const' attribute into the various kernel functions
    implementing these calls.
    Signed-off-by: Richard Cochran <>
    Acked-by: John Stultz <>
    LKML-Reference: <>
    Signed-off-by: Thomas Gleixner <>
Commits on Jan 31, 2011
  1. @torbenh3

    time: Move get_jiffies_64 to kernel/time/jiffies.c

    torbenh3 authored Thomas Gleixner committed
    Move the jiffies access functions to the jiffies clocksource code.
    [ tglx: Add missing include ]
    Signed-off-by: Torben Hohn <>
    Cc: Peter Zijlstra <>
    LKML-Reference: <20110127145900.23248.73352.stgit@localhost>
    Signed-off-by: Thomas Gleixner <>
Commits on Jan 26, 2011
  1. time: Add nsecs_to_cputime64 interface for asm-generic

    Venkatesh Pallipadi authored Ingo Molnar committed
    Add nsecs_to_cputime64 interface. This is used in following patches that
    updates cpu irq stat based on ns granularity info in IRQ_TIME_ACCOUNTING.
    Tested-by: Shaun Ruffell <>
    Signed-off-by: Venkatesh Pallipadi <>
    Signed-off-by: Peter Zijlstra <>
    LKML-Reference: <>
    Signed-off-by: Ingo Molnar <>
Commits on Nov 28, 2010
  1. @jjuhl

    Kill off a bunch of warning: ‘inline’ is not at beginning of declaration

    jjuhl authored Jiri Kosina committed
    These warnings are spewed during a build of a 'allnoconfig' kernel
    (especially the ones from u64_stats_sync.h show up a lot) when building
    with -Wextra (which I often do)..
    They are
      a) annoying
      b) easy to get rid of.
    This patch kills them off.
    include/linux/u64_stats_sync.h:70:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:77:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:84:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:96:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:115:1: warning: ‘inline’ is not at beginning of declaration
    include/linux/u64_stats_sync.h:127:1: warning: ‘inline’ is not at beginning of declaration
    kernel/time.c:241:1: warning: ‘inline’ is not at beginning of declaration
    kernel/time.c:257:1: warning: ‘inline’ is not at beginning of declaration
    kernel/perf_event.c:4513:1: warning: ‘inline’ is not at beginning of declaration
    mm/page_alloc.c:4012:1: warning: ‘inline’ is not at beginning of declaration
    Signed-off-by: Jesper Juhl <>
    Signed-off-by: Jiri Kosina <>
Commits on Jul 27, 2010
  1. time: Kill off CONFIG_GENERIC_TIME

    John Stultz authored Thomas Gleixner committed
    Now that all arches have been converted over to use generic time via
    clocksources or arch_gettimeoffset(), we can remove the GENERIC_TIME
    config option and simplify the generic code.
    Signed-off-by: John Stultz <>
    LKML-Reference: <>
    Signed-off-by: Thomas Gleixner <>
Commits on May 24, 2010
  1. timekeeping: Fix timezone update

    Thomas Gleixner authored
    commit 64ce4c2 (time: Clean up warp_clock()) breaks the timezone
    update in a very subtle way. To avoid the direct access to timekeeping
    internals it adds the timezone delta to the current time with
    timespec_add_safe(). This works nicely when the timezone delta is > 0.
    If timezone delta is < 0 then the wrap check in timespec_add_safe()
    triggers and timespec_add_safe() returns TIME_MAX and screws up
    timekeeping completely. 
    The comment above timespec_add_safe() says:
        It's assumed that both values are valid (>= 0)
    Add the timezone seconds adjustment directly.
    Reported-by: Rafael J. Wysocki <>
    Tested-by: Rafael J. Wysocki <>
    Acked-by: John Stultz <>
    Signed-off-by: Thomas Gleixner <>
Commits on May 10, 2010
  1. Merge branch 'linus' into timers/core

    Thomas Gleixner authored
    Reason: Further posix_cpu_timer patches depend on mainline changes
    Signed-off-by: Thomas Gleixner <>
Commits on Mar 30, 2010
  1. include cleanup: Update gfp.h and slab.h includes to prepare for brea…

    Tejun Heo authored
    …king implicit slab.h inclusion from percpu.h
    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files.  percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.
    percpu.h -> slab.h dependency is about to be removed.  Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability.  As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.
    The script does the followings.
    * Scan files for gfp and slab usages and update includes such that
      only the necessary includes are there.  ie. if only gfp is used,
      gfp.h, if slab is used, slab.h.
    * When the script inserts a new include, it looks at the include
      blocks and try to put the new include such that its order conforms
      to its surrounding.  It's put in the include block which contains
      core kernel includes, in the same order that the rest are ordered -
      alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
      doesn't seem to be any matching order.
    * If the script can't find a place to put a new include (mostly
      because the file doesn't have fitting include block), it prints out
      an error message indicating which .h file needs to be added to the
    The conversion was done in the following steps.
    1. The initial automatic conversion of all .c files updated slightly
       over 4000 files, deleting around 700 includes and adding ~480 gfp.h
       and ~3000 slab.h inclusions.  The script emitted errors for ~400
    2. Each error was manually checked.  Some didn't need the inclusion,
       some needed manual addition while adding it to implementation .h or
       embedding .c file was more appropriate for others.  This step added
       inclusions to around 150 files.
    3. The script was run again and the output was compared to the edits
       from #2 to make sure no file was left behind.
    4. Several build tests were done and a couple of problems were fixed.
       e.g. lib/decompress_*.c used malloc/free() wrappers around slab
       APIs requiring slab.h to be added manually.
    5. The script was run on all .h files but without automatically
       editing them as sprinkling gfp.h and slab.h inclusions around .h
       files could easily lead to inclusion dependency hell.  Most gfp.h
       inclusion directives were ignored as stuff from gfp.h was usually
       wildly available and often used in preprocessor macros.  Each
       slab.h inclusion directive was examined and added manually as
    6. percpu.h was updated not to include slab.h.
    7. Build test were done on the following configurations and failures
       were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
       distributed build env didn't work with gcov compiles) and a few
       more options had to be turned off depending on archs to make things
       build (like ipr on powerpc/64 which failed due to missing writeq).
       * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
       * powerpc and powerpc64 SMP allmodconfig
       * sparc and sparc64 SMP allmodconfig
       * ia64 SMP allmodconfig
       * s390 SMP allmodconfig
       * alpha SMP allmodconfig
       * um on x86_64 SMP allmodconfig
    8. percpu.h modifications were reverted so that it could be applied as
       a separate patch and serve as bisection point.
    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.
    Signed-off-by: Tejun Heo <>
    Guess-its-ok-by: Christoph Lameter <>
    Cc: Ingo Molnar <>
    Cc: Lee Schermerhorn <>
Commits on Mar 12, 2010
  1. time: Clean up warp_clock()

    John Stultz authored Thomas Gleixner committed
    warp_clock() currently accesses timekeeping internal state directly, which
    is unnecessary.  Convert it to use the proper timekeeping interfaces.
    Signed-off-by: John Stultz <>
    Cc: Ingo Molnar <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Thomas Gleixner <>
Commits on Dec 22, 2009
  1. Revert "time: Remove xtime_cache"

    This reverts commit 7bc7d63, as
    requested by John Stultz. Quoting John:
     "Petr Titěra reported an issue where he saw odd atime regressions with
      2.6.33 where there were a full second worth of nanoseconds in the
      nanoseconds field.
      He also reviewed the time code and narrowed down the problem: unhandled
      overflow of the nanosecond field caused by rounding up the
      sub-nanosecond accumulated time.
       * At the end of update_wall_time(), we currently round up the
      sub-nanosecond portion of accumulated time when storing it into xtime.
      This was added to avoid time inconsistencies caused when the
      sub-nanosecond portion was truncated when storing into xtime.
      Unfortunately we don't handle the possible second overflow caused by
      that rounding.
       * Previously the xtime_cache code hid this overflow by normalizing the
      xtime value when storing into the xtime_cache.
       * We could try to handle the second overflow after the rounding up, but
      since this affects the timekeeping's internal state, this would further
      complicate the next accumulation cycle, causing small errors in ntp
      steering. As much as I'd like to get rid of it, the xtime_cache code is
      known to work.
       * The correct fix is really to include the sub-nanosecond portion in the
      timekeeping accessor function, so we don't need to round up at during
      accumulation. This would greatly simplify the accumulation code.
      Unfortunately, we can't do this safely until the last three
      non-GENERIC_TIME arches (sparc32, arm, cris) are converted  (those
      patches are in -mm) and we kill off the spots where arches set xtime
      directly. This is all 2.6.34 material, so I think reverting the
      xtime_cache change is the best approach for now.
      Many thanks to Petr for both reporting and finding the issue!"
    Reported-by: Petr Titěra <>
    Requested-by: john stultz <>
    Cc: Ingo Molnar <>
    Signed-off-by: Linus Torvalds <>
Commits on Dec 9, 2009
  1. Merge branch 'timers-for-linus' of git://…

    * 'timers-for-linus' of git://
      timers, init: Limit the number of per cpu calibration bootup messages
      posix-cpu-timers: optimize and document timer_create callback
      clockevents: Add missing include to pacify sparse
      x86: vmiclock: Fix printk format
      x86: Fix printk format due to variable type change
      sparc: fix printk for change of variable type
      clocksource/events: Fix fallout of generic code changes
      nohz: Allow 32-bit machines to sleep for more than 2.15 seconds
      nohz: Track last do_timer() cpu
      nohz: Prevent clocksource wrapping during idle
      nohz: Type cast printk argument
      mips: Use generic mult/shift factor calculation for clocks
      clocksource: Provide a generic mult/shift factor calculation
      clockevents: Use u32 for mult and shift factors
      nohz: Introduce arch_needs_cpu
      nohz: Reuse ktime in sub-functions of tick_check_idle.
      time: Remove xtime_cache
      time: Implement logarithmic time accumulation
Commits on Nov 26, 2009
  1. sched, time: Define nsecs_to_jiffies()

    Hidetoshi Seto authored Ingo Molnar committed
    Use of msecs_to_jiffies() for nsecs_to_cputime() have some
     - The type of msecs_to_jiffies()'s argument is unsigned int, so
       it cannot convert msecs greater than UINT_MAX = about 49.7 days.
     - msecs_to_jiffies() returns MAX_JIFFY_OFFSET if MSB of argument
       is set, assuming that input was negative value.  So it cannot
       convert msecs greater than INT_MAX = about 24.8 days too.
    This patch defines a new function nsecs_to_jiffies() that can
    deal greater values, and that can deal all incoming values as
    Signed-off-by: Hidetoshi Seto <>
    Acked-by: Peter Zijlstra <>
    Cc: Stanislaw Gruszka <>
    Cc: Spencer Candland <>
    Cc: Oleg Nesterov <>
    Cc: Balbir Singh <>
    Cc: Amrico Wang <>
    Cc: Thomas Gleixner <>
    Cc: John Stultz <>
    LKML-Reference: <>
    Signed-off-by: Ingo Molnar <>
Commits on Oct 5, 2009
  1. time: Remove xtime_cache

    john stultz authored Ingo Molnar committed
    With the prior logarithmic time accumulation patch, xtime will now
    always be within one "tick" of the current time, instead of
    possibly half a second off.
    This removes the need for the xtime_cache value, which always
    stored the time at the last interrupt, so this patch cleans that up
    removing the xtime_cache related code.
    This is a bit simpler, but still could use some wider testing.
    Signed-off-by: John Stultz <>
    Acked-by: Thomas Gleixner <>
    Reviewed-by: John Kacur <>
    Cc: Clark Williams <>
    Cc: Martin Schwidefsky <>
    Cc: Andrew Morton <>
    LKML-Reference: <1254525855.7741.95.camel@localhost.localdomain>
    Signed-off-by: Ingo Molnar <>
Commits on Sep 15, 2009
  1. time: Prevent 32 bit overflow with set_normalized_timespec()

    Thomas Gleixner authored
    set_normalized_timespec() nsec argument is of type long. The recent
    timekeeping changes of ktime_get_ts() feed 
    	ts->tv_nsec + tomono.tv_nsec + nsecs
    to set_normalized_timespec(). On 32 bit machines that sum can be
    larger than (1 << 31) and therefor result in a negative value which
    screws up the result completely.
    Make the nsec argument of set_normalized_timespec() s64 to fix the
    problem at hand. This also prevents similar problems for future users
    of set_normalized_timespec().
    Signed-off-by: Thomas Gleixner <>
    Tested-by: Carsten Emde <>
    LKML-Reference: <new-submission>
    Cc: Martin Schwidefsky <>
    Cc: John Stultz <>
Commits on Jan 14, 2009
  1. [CVE-2009-0029] System call wrappers part 01

    Heiko Carstens authored
    Signed-off-by: Heiko Carstens <>
Commits on Jan 6, 2009
  1. @paulusmack

    Allow times and time system calls to return small negative values

    paulusmack authored committed
    At the moment, the times() system call will appear to fail for a period
    shortly after boot, while the value it want to return is between -4095 and
    -1.  The same thing will also happen for the time() system call on 32-bit
    platforms some time in 2106 or so.
    On some platforms, such as x86, this is unavoidable because of the system
    call ABI, but other platforms such as powerpc have a separate error
    indication from the return value, so system calls can in fact return small
    negative values without indicating an error.  On those platforms,
    force_successful_syscall_return() provides a way to indicate that the
    system call return value should not be treated as an error even if it is
    in the range which would normally be taken as a negative error number.
    This adds a force_successful_syscall_return() call to the time() and
    times() system calls plus their 32-bit compat versions, so that they don't
    erroneously indicate an error on those platforms whose system call ABI has
    a separate error indication.  This will not affect anything on other
    Joakim Tjernlund added the fix for time() and the compat versions of
    time() and times(), after I did the fix for times().
    Signed-off-by: Joakim Tjernlund <>
    Signed-off-by: Paul Mackerras <>
    Acked-by: David S. Miller <>
    Cc: Ingo Molnar <>
    Cc: Thomas Gleixner <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Commits on Sep 6, 2008
  1. @fenrus75

    select: add a timespec_add_safe() function

    Thomas Gleixner authored fenrus75 committed
    For the select() rework, it's important to be able to add timespec
    structures in an overflow-safe manner.
    This patch adds a timespec_add_safe() function for this which is similar in
    operation to ktime_add_safe(), but works on a struct timespec.
    Signed-off-by: Thomas Gleixner <>
    Signed-off-by: Arjan van de Ven <>
Commits on May 2, 2008
  1. Make constants in kernel/timeconst.h fixed 64 bits

    H. Peter Anvin authored
    Force constants in kernel/timeconst.h (except shift counts) to be 64 bits,
    using U64_C() constructor macros, and eliminate constants that cannot
    be represented at all in 64 bits.  This avoids warnings with some gcc
    Drop generating 64-bit constants, since we have no real hope of
    getting a full set (operation on 64-bit values requires a 128-bit
    intermediate result, which gcc only supports on 64-bit platforms, and
    only with libgcc support on some.)  Note that the use of these
    constants does not depend on if we are on a 32- or 64-bit architecture.
    This resolves Bugzilla 10153.
    Signed-off-by: H. Peter Anvin <>
Commits on May 1, 2008
  1. remove div_long_long_rem

    Roman Zippel authored committed
    x86 is the only arch right now, which provides an optimized for
    div_long_long_rem and it has the downside that one has to be very careful that
    the divide doesn't overflow.
    The API is a little akward, as the arguments for the unsigned divide are
    signed.  The signed version also doesn't handle a negative divisor and
    produces worse code on 64bit archs.
    There is little incentive to keep this API alive, so this converts the few
    users to the new API.
    Signed-off-by: Roman Zippel <>
    Cc: Ralf Baechle <>
    Cc: Ingo Molnar <>
    Cc: Thomas Gleixner <>
    Cc: john stultz <>
    Cc: Christoph Lameter <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
  2. convert a few do_div users

    Roman Zippel authored committed
    This converts a few users of do_div to div_[su]64 and this demonstrates nicely
    how it can reduce some expressions to one-liners.
    Signed-off-by: Roman Zippel <>
    Cc: john stultz <>
    Cc: Thomas Gleixner <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Commits on Apr 29, 2008
  1. @rpjday

    kernel: explicitly include required header files under kernel/

    rpjday authored committed
    Following an experimental deletion of the unnecessary directive
     #include <linux/slab.h>
    from the header file <linux/percpu.h>, these files under kernel/ were exposed
    as needing to include one of <linux/slab.h> or <linux/gfp.h>, so explicit
    includes were added where necessary.
    Signed-off-by: Robert P. J. Day <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Commits on Apr 22, 2008
  1. @davem330

    time: Export set_normalized_timespec.

    YOSHIFUJI Hideaki authored davem330 committed
    Sorry I have just realized set_normalized_timespec() (used in
    timespec_sub()) is not exported, and link will fail because of it...
    Signed-off-by: YOSHIFUJI Hideaki <>
    Signed-off-by: David S. Miller <>
Commits on Feb 8, 2008
  1. avoid overflows in kernel/time.c

    H. Peter Anvin authored Linus Torvalds committed
    When the conversion factor between jiffies and milli- or microseconds is
    not a single multiply or divide, as for the case of HZ == 300, we currently
    do a multiply followed by a divide.  The intervening result, however, is
    subject to overflows, especially since the fraction is not simplified (for
    HZ == 300, we multiply by 300 and divide by 1000).
    This is exposed to the user when passing a large timeout to poll(), for
    This patch replaces the multiply-divide with a reciprocal multiplication on
    32-bit platforms.  When the input is an unsigned long, there is no portable
    way to do this on 64-bit platforms there is no portable way to do this
    since it requires a 128-bit intermediate result (which gcc does support on
    64-bit platforms but may generate libgcc calls, e.g.  on 64-bit s390), but
    since the output is a 32-bit integer in the cases affected, just simplify
    the multiply-divide (*3/10 instead of *300/1000).
    The reciprocal multiply used can have off-by-one errors in the upper half
    of the valid output range.  This could be avoided at the expense of having
    to deal with a potential 65-bit intermediate result.  Since the intent is
    to avoid overflow problems and most of the other time conversions are only
    semiexact, the off-by-one errors were considered an acceptable tradeoff.
    At Ralf Baechle's suggestion, this version uses a Perl script to compute
    the necessary constants.  We already have dependencies on Perl for kernel
    compiles.  This does, however, require the Perl module Math::BigInt, which
    is included in the standard Perl distribution starting with version 5.8.0.
    In order to support older versions of Perl, include a table of canned
    constants in the script itself, and structure the script so that
    Math::BigInt isn't required if pulling values from said table.
    Running the script requires that the HZ value is available from the
    Makefile.  Thus, this patch also adds the Kconfig variable CONFIG_HZ to the
    architectures which didn't already have it (alpha, cris, frv, h8300, m32r,
    m68k, m68knommu, sparc, v850, and xtensa.) It does *not* touch the sh or
    sh64 architectures, since Paul Mundt has dealt with those separately in the
    sh tree.
    Signed-off-by: H. Peter Anvin <>
    Cc: Ralf Baechle <>,
    Cc: Sam Ravnborg <>,
    Cc: Paul Mundt <>,
    Cc: Richard Henderson <>,
    Cc: Michael Starvik <>,
    Cc: David Howells <>,
    Cc: Yoshinori Sato <>,
    Cc: Hirokazu Takata <>,
    Cc: Geert Uytterhoeven <>,
    Cc: Roman Zippel <>,
    Cc: William L. Irwin <>,
    Cc: Chris Zankel <>,
    Cc: H. Peter Anvin <>,
    Cc: Jan Engelhardt <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
  2. time: fix typo in comments

    Li Zefan authored Linus Torvalds committed
    Fix typo in comments.
    BTW: I have to fix coding style in arch/ia64/kernel/time.c also, otherwise will be complaining.
    Signed-off-by: Li Zefan <>
    Cc: Thomas Gleixner <>
    Cc: Ingo Molnar <>
    Cc: john stultz <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Commits on Feb 6, 2008
  1. speed up jiffies conversion functions if HZ==USER_HZ

    Andrew Morton authored Linus Torvalds committed
    Avoid calling do_div(x, 1) in this case.
    Cc: David Fries <>
    Cc: "H. Peter Anvin" <>
    Cc: Ingo Molnar <>
    Cc: Thomas Gleixner <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
  2. @dfries

    system timer: fix crash in <100Hz system timer

    dfries authored Linus Torvalds committed
    The kernel has a divide by zero crash when trying to run the system timer
    less than 100Hz.  The problem is x/(HZ/USER_HZ) and related.  Now
    x*(USER_HZ/HZ) will be used if HZ<USER_HZ.
    I'm running the Linux kernel under qemu and went to run a slower system
    timer to take less CPU (and battery) on the host.  I found that the kernel
    paniced under emulation because of a divide by zero in three places.  Here
    is the patch.  The base git was updated today 01-05-2008.  I went for a
    20Hz system time by adding config HZ_20 etc to kernel/Kconfig.hz.  With
    this patch I verified the system timer by looking at /proc/interrupts.
    [ partially clean up the macro maze]
    Signed-off-by: David Fries <>
    Cc: "H. Peter Anvin" <>
    Cc: Ingo Molnar <>
    Cc: Thomas Gleixner <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Commits on Feb 1, 2008
  1. timekeeping: update xtime_cache when time(zone) changes

    Thomas Gleixner authored Ingo Molnar committed
    xtime_cache needs to be updated whenever xtime and or wall_to_monotic
    are changed. Otherwise users of xtime_cache might see a stale (and in
    the case of timezone changes utterly wrong) value until the next
    update happens.
    Fixup the obvious places, which miss this update.
    Signed-off-by: Thomas Gleixner <>
    Acked-by: John Stultz <>
    Tested-by: Dhaval Giani <>
    Signed-off-by: Ingo Molnar <>
Commits on Oct 18, 2007
  1. whitespace fixes: time syscalls

    Daniel Walker authored Linus Torvalds committed
    Signed-off-by: Daniel Walker <>
    Cc: Thomas Gleixner <>
    Cc: Ingo Molnar <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
  2. @tbreeds

    Fix discrepancy between VDSO based gettimeofday() and sys_gettimeofda…

    tbreeds authored Linus Torvalds committed
    On platforms that copy sys_tz into the vdso (currently only x86_64, soon to
    include powerpc), it is possible for the vdso to get out of sync if a user
    calls (admittedly unusual) settimeofday(NULL, ptr).
    This patch adds a hook for architectures that set
    CONFIG_GENERIC_TIME_VSYSCALL to ensure when sys_tz is updated they can also
    updatee their copy in the vdso.
    Signed-off-by: Tony Breeds <>
    Cc: Andi Kleen <>
    Cc: Tony Luck <>
    Acked-by: John Stultz <>
    Cc: Paul Mackerras <>
    Cc: Benjamin Herrenschmidt <>
    Cc: Thomas Gleixner <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Commits on Oct 17, 2007
  1. Clean up duplicate includes in kernel/

    Jesper Juhl authored Linus Torvalds committed
    This patch cleans up duplicate includes in
    Signed-off-by: Jesper Juhl <>
    Acked-by: Paul E. McKenney <>
    Reviewed-by: Satyam Sharma <>
    Signed-off-by: Andrew Morton <>
    Signed-off-by: Linus Torvalds <>
Something went wrong with that request. Please try again.