Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61677965 authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen
Browse files

[PATCH] x86-64: Synchronize RDTSC on single core AMD



There is no guarantee that two RDTSCs in a row are monotonic,
so don't assume it on single core AMD systems.
This will make gettimeofday slower again
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent a1a70c25
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -732,10 +732,7 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
	/* Fix cpuid4 emulation for more */
	/* Fix cpuid4 emulation for more */
	num_cache_leaves = 3;
	num_cache_leaves = 3;


	/* When there is only one core no need to synchronize RDTSC */
	/* RDTSC can be speculated around */
	if (num_possible_cpus() == 1)
	        set_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
	else
	clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
	clear_bit(X86_FEATURE_SYNC_RDTSC, &c->x86_capability);
}
}