Commit ae465bee authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 timer update from Ingo Molnar:
 "A single simplification of the x86 TSC code"

* 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/tsc: Use topology functions
parents 8ab84ef6 c25323c0
...@@ -1246,14 +1246,14 @@ void __init tsc_init(void) ...@@ -1246,14 +1246,14 @@ void __init tsc_init(void)
*/ */
unsigned long calibrate_delay_is_known(void) unsigned long calibrate_delay_is_known(void)
{ {
int i, cpu = smp_processor_id(); int sibling, cpu = smp_processor_id();
if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC)) if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC))
return 0; return 0;
for_each_online_cpu(i) sibling = cpumask_any_but(topology_core_cpumask(cpu), cpu);
if (cpu_data(i).phys_proc_id == cpu_data(cpu).phys_proc_id) if (sibling < nr_cpu_ids)
return cpu_data(i).loops_per_jiffy; return cpu_data(sibling).loops_per_jiffy;
return 0; return 0;
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment