mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

The use of static_call_cond() is essentially the same as static_call() on x86 (e.g. static_call() now handles a NULL pointer as a NOP), so replace it with static_call() to simplify the code. Link: https://lore.kernel.org/all/3916caa1dcd114301a49beafa5030eca396745c1.1679456900.git.jpoimboe@kernel.org/ Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Wei Wang <wei.w.wang@intel.com> Link: https://lore.kernel.org/r/20240507133103.15052-2-wei.w.wang@intel.com Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
27 lines
782 B
C
27 lines
782 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#if !defined(KVM_X86_PMU_OP) || !defined(KVM_X86_PMU_OP_OPTIONAL)
|
|
BUILD_BUG_ON(1)
|
|
#endif
|
|
|
|
/*
|
|
* KVM_X86_PMU_OP() and KVM_X86_PMU_OP_OPTIONAL() are used to help generate
|
|
* both DECLARE/DEFINE_STATIC_CALL() invocations and
|
|
* "static_call_update()" calls.
|
|
*
|
|
* KVM_X86_PMU_OP_OPTIONAL() can be used for those functions that can have
|
|
* a NULL definition.
|
|
*/
|
|
KVM_X86_PMU_OP(rdpmc_ecx_to_pmc)
|
|
KVM_X86_PMU_OP(msr_idx_to_pmc)
|
|
KVM_X86_PMU_OP_OPTIONAL(check_rdpmc_early)
|
|
KVM_X86_PMU_OP(is_valid_msr)
|
|
KVM_X86_PMU_OP(get_msr)
|
|
KVM_X86_PMU_OP(set_msr)
|
|
KVM_X86_PMU_OP(refresh)
|
|
KVM_X86_PMU_OP(init)
|
|
KVM_X86_PMU_OP_OPTIONAL(reset)
|
|
KVM_X86_PMU_OP_OPTIONAL(deliver_pmi)
|
|
KVM_X86_PMU_OP_OPTIONAL(cleanup)
|
|
|
|
#undef KVM_X86_PMU_OP
|
|
#undef KVM_X86_PMU_OP_OPTIONAL
|