lkml.org 
[lkml]   [2006]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/4] therm_throt: Make the jiffies compares use the 64bit safe macros.
    Date
    Signed-off-by: Dmitriy Zavin <dmitriyz@google.com>
    ---
    arch/i386/kernel/cpu/mcheck/therm_throt.c | 6 +++---
    1 files changed, 3 insertions(+), 3 deletions(-)

    diff --git a/arch/i386/kernel/cpu/mcheck/therm_throt.c b/arch/i386/kernel/cpu/mcheck/therm_throt.c
    index 342750e..3d6f217 100644
    --- a/arch/i386/kernel/cpu/mcheck/therm_throt.c
    +++ b/arch/i386/kernel/cpu/mcheck/therm_throt.c
    @@ -22,7 +22,7 @@ #endif /* CONFIG_X86_64 */
    /* How long to wait between reporting thermal events */
    #define CHECK_INTERVAL (300 * HZ)

    -static DEFINE_PER_CPU(unsigned long, next_check);
    +static DEFINE_PER_CPU(__u64, next_check) = INITIAL_JIFFIES;

    #ifdef CONFIG_X86_64
    static void therm_throt_log_mce(unsigned int cpu, __u64 status)
    @@ -58,10 +58,10 @@ void therm_throt_process(int curr, __u64
    {
    unsigned int cpu = smp_processor_id();

    - if (time_before(jiffies, __get_cpu_var(next_check)))
    + if (time_before64(get_jiffies_64(), __get_cpu_var(next_check)))
    return;

    - __get_cpu_var(next_check) = jiffies + CHECK_INTERVAL;
    + __get_cpu_var(next_check) = get_jiffies_64() + CHECK_INTERVAL;

    /* if we just entered the thermal event */
    if (curr) {
    --
    1.4.2
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-09-20 04:45    [W:0.038 / U:29.352 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site