From bcf779d776b5fc9c18d06f1871c4494c226e6ed0 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Tue, 26 Sep 2006 10:52:41 +0200 Subject: [PATCH] --- yaml --- r: 35969 b: refs/heads/master c: 2049336f60d297c85ac977245b9326ec00396114 h: refs/heads/master i: 35967: 235b6c1be9777585a62070da1bf8eff709c1c14e v: v3 --- [refs] | 2 +- trunk/arch/x86_64/kernel/setup.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 8a725e4fc56e..1194dca9065e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9ddab42d1e65dfbdb14588346d47fb142090ab40 +refs/heads/master: 2049336f60d297c85ac977245b9326ec00396114 diff --git a/trunk/arch/x86_64/kernel/setup.c b/trunk/arch/x86_64/kernel/setup.c index 085f2e09b9dc..26524ce3b239 100644 --- a/trunk/arch/x86_64/kernel/setup.c +++ b/trunk/arch/x86_64/kernel/setup.c @@ -728,6 +728,12 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c) /* Fix cpuid4 emulation for more */ num_cache_leaves = 3; + + /* When there is only one core no need to synchronize RDTSC */ + if (num_possible_cpus() == 1) + set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); + else + clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability); } static void __cpuinit detect_ht(struct cpuinfo_x86 *c)