Skip to content

Commit

Permalink
x86/cpufeature: Fix build bug caused by merge artifact with the remov…
Browse files Browse the repository at this point in the history
…al of cpu_has_hypervisor

The 0-day build robot by Fengguang Wu reported a build failure:

   arch/x86/events//intel/cstate.c: In function 'cstate_pmu_init':
   arch/x86/events//intel/cstate.c:680:6: error: 'cpu_has_hypervisor' undeclared (first use in this function)

... which was caused by a merge mistake I made when applying
the following patch:

  0c9f353 ("x86/cpufeature: Remove cpu_has_hypervisor")

apply the missing hunk as well.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: David Kershner <david.kershner@unisys.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: sparmaintainer@unisys.com
Cc: virtualization@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/1459266123-21878-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar committed Apr 1, 2016
1 parent 16bf922 commit d7847a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/events/intel/cstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ static int __init cstate_pmu_init(void)
{
int err;

if (cpu_has_hypervisor)
if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
return -ENODEV;

err = cstate_init();
Expand Down

0 comments on commit d7847a7

Please sign in to comment.