]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/blobdiff - arch/x86/include/asm/mmu_context.h
perf/x86: Update rdpmc_always_available static key to the modern API
[mirror_ubuntu-disco-kernel.git] / arch / x86 / include / asm / mmu_context.h
index 1de72ce514cd5561dbafea43996d909f449f8766..57e3785d0d26e19f9134485399d1b3aac01b3a2b 100644 (file)
@@ -24,11 +24,12 @@ static inline void paravirt_activate_mm(struct mm_struct *prev,
 #endif /* !CONFIG_PARAVIRT */
 
 #ifdef CONFIG_PERF_EVENTS
-extern struct static_key rdpmc_always_available;
+
+DECLARE_STATIC_KEY_FALSE(rdpmc_always_available_key);
 
 static inline void load_mm_cr4(struct mm_struct *mm)
 {
-       if (static_key_false(&rdpmc_always_available) ||
+       if (static_branch_unlikely(&rdpmc_always_available_key) ||
            atomic_read(&mm->context.perf_rdpmc_allowed))
                cr4_set_bits(X86_CR4_PCE);
        else