diff options
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 753bdd567416..42b1f304b044 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h | |||
@@ -600,7 +600,7 @@ static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu) | |||
600 | * Tunables that become constants when CONFIG_SCHED_DEBUG is off: | 600 | * Tunables that become constants when CONFIG_SCHED_DEBUG is off: |
601 | */ | 601 | */ |
602 | #ifdef CONFIG_SCHED_DEBUG | 602 | #ifdef CONFIG_SCHED_DEBUG |
603 | # include <linux/jump_label.h> | 603 | # include <linux/static_key.h> |
604 | # define const_debug __read_mostly | 604 | # define const_debug __read_mostly |
605 | #else | 605 | #else |
606 | # define const_debug const | 606 | # define const_debug const |
@@ -619,18 +619,18 @@ enum { | |||
619 | #undef SCHED_FEAT | 619 | #undef SCHED_FEAT |
620 | 620 | ||
621 | #if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) | 621 | #if defined(CONFIG_SCHED_DEBUG) && defined(HAVE_JUMP_LABEL) |
622 | static __always_inline bool static_branch__true(struct jump_label_key *key) | 622 | static __always_inline bool static_branch__true(struct static_key *key) |
623 | { | 623 | { |
624 | return likely(static_branch(key)); /* Not out of line branch. */ | 624 | return static_key_true(key); /* Not out of line branch. */ |
625 | } | 625 | } |
626 | 626 | ||
627 | static __always_inline bool static_branch__false(struct jump_label_key *key) | 627 | static __always_inline bool static_branch__false(struct static_key *key) |
628 | { | 628 | { |
629 | return unlikely(static_branch(key)); /* Out of line branch. */ | 629 | return static_key_false(key); /* Out of line branch. */ |
630 | } | 630 | } |
631 | 631 | ||
632 | #define SCHED_FEAT(name, enabled) \ | 632 | #define SCHED_FEAT(name, enabled) \ |
633 | static __always_inline bool static_branch_##name(struct jump_label_key *key) \ | 633 | static __always_inline bool static_branch_##name(struct static_key *key) \ |
634 | { \ | 634 | { \ |
635 | return static_branch__##enabled(key); \ | 635 | return static_branch__##enabled(key); \ |
636 | } | 636 | } |
@@ -639,7 +639,7 @@ static __always_inline bool static_branch_##name(struct jump_label_key *key) \ | |||
639 | 639 | ||
640 | #undef SCHED_FEAT | 640 | #undef SCHED_FEAT |
641 | 641 | ||
642 | extern struct jump_label_key sched_feat_keys[__SCHED_FEAT_NR]; | 642 | extern struct static_key sched_feat_keys[__SCHED_FEAT_NR]; |
643 | #define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x])) | 643 | #define sched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x])) |
644 | #else /* !(SCHED_DEBUG && HAVE_JUMP_LABEL) */ | 644 | #else /* !(SCHED_DEBUG && HAVE_JUMP_LABEL) */ |
645 | #define sched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) | 645 | #define sched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x)) |