]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/x86/kernel/cpu/amd.c
x86/cpu: Use indirect call to measure performance in init_amd_k6()
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 11 Jul 2017 11:44:05 +0000 (07:44 -0400)
committerIngo Molnar <mingo@kernel.org>
Sun, 16 Jul 2017 09:05:04 +0000 (11:05 +0200)
commit5f8a16156aa1b2d0223eaee9dacdfb9bc096f610
treec6f700537ad052e82cbcd19cea2c108ce07db9b9
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
x86/cpu: Use indirect call to measure performance in init_amd_k6()

This old piece of code is supposed to measure the performance of indirect
calls to determine if the processor is buggy or not, however the compiler
optimizer turns it into a direct call.

Use the OPTIMIZER_HIDE_VAR() macro to thwart the optimization, so that a real
indirect call is generated.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/alpine.LRH.2.02.1707110737530.8746@file01.intranet.prod.int.rdu2.redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/amd.c