aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2009-03-10 21:14:26 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-03-11 01:33:06 -0400
commit5490fa96735ce0e2af270c0868987d644b9a38ec (patch)
tree406846ce05eb1f815000327204cde48aaacfcd3f
parent73af76dfd1f998dba71d8e8e785cbe77a990bf17 (diff)
x86, mce: use round_jiffies() instead round_jiffies_relative()
Impact: saving power _very_ little round_jiffies() round up absolute jiffies to full second. round_jiffies_relative() round up relative jiffies to full second. The "t->expires" is absolute jiffies. Then, round_jiffies() should be used instead round_jiffies_relative(). Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce_64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c
index bfbd5323a635..ca14604611ec 100644
--- a/arch/x86/kernel/cpu/mcheck/mce_64.c
+++ b/arch/x86/kernel/cpu/mcheck/mce_64.c
@@ -639,7 +639,7 @@ static void mce_init_timer(void)
639 if (!next_interval) 639 if (!next_interval)
640 return; 640 return;
641 setup_timer(t, mcheck_timer, smp_processor_id()); 641 setup_timer(t, mcheck_timer, smp_processor_id());
642 t->expires = round_jiffies_relative(jiffies + next_interval); 642 t->expires = round_jiffies(jiffies + next_interval);
643 add_timer(t); 643 add_timer(t);
644} 644}
645 645
@@ -1110,7 +1110,7 @@ static int __cpuinit mce_cpu_callback(struct notifier_block *nfb,
1110 break; 1110 break;
1111 case CPU_DOWN_FAILED: 1111 case CPU_DOWN_FAILED:
1112 case CPU_DOWN_FAILED_FROZEN: 1112 case CPU_DOWN_FAILED_FROZEN:
1113 t->expires = round_jiffies_relative(jiffies + next_interval); 1113 t->expires = round_jiffies(jiffies + next_interval);
1114 add_timer_on(t, cpu); 1114 add_timer_on(t, cpu);
1115 smp_call_function_single(cpu, mce_reenable_cpu, &action, 1); 1115 smp_call_function_single(cpu, mce_reenable_cpu, &action, 1);
1116 break; 1116 break;