Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87702a3

Browse files
committed
Merge tag 'sched-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Thomas Gleixner: "Two scheduler fixes: - A trivial build fix for sched_feat() to compile correctly with CONFIG_JUMP_LABEL=n - Replace a zero lenght array with a flexible array"* tag 'sched-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/features: Fix !CONFIG_JUMP_LABEL case sched: Replace zero-length array with flexible-array
2 parentsa3d1b31 +a73f863 commit87702a3

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

‎kernel/sched/core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(sched_update_nr_running_tp);
4444

4545
DEFINE_PER_CPU_SHARED_ALIGNED(structrq,runqueues);
4646

47-
#if defined(CONFIG_SCHED_DEBUG)&& defined(CONFIG_JUMP_LABEL)
47+
#ifdefCONFIG_SCHED_DEBUG
4848
/*
4949
* Debugging: various feature bits
5050
*

‎kernel/sched/sched.h‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ struct sched_group_capacity {
14711471
intid;
14721472
#endif
14731473

1474-
unsigned longcpumask[0];/* Balance mask */
1474+
unsigned longcpumask[];/* Balance mask */
14751475
};
14761476

14771477
structsched_group {
@@ -1629,14 +1629,15 @@ enum {
16291629

16301630
#undef SCHED_FEAT
16311631

1632-
#if defined(CONFIG_SCHED_DEBUG)&& defined(CONFIG_JUMP_LABEL)
1632+
#ifdefCONFIG_SCHED_DEBUG
16331633

16341634
/*
16351635
* To support run-time toggling of sched features, all the translation units
16361636
* (but core.c) reference the sysctl_sched_features defined in core.c.
16371637
*/
16381638
externconst_debug unsignedintsysctl_sched_features;
16391639

1640+
#ifdefCONFIG_JUMP_LABEL
16401641
#defineSCHED_FEAT(name,enabled)\
16411642
static __always_inline bool static_branch_##name(struct static_key *key) \
16421643
{\
@@ -1649,7 +1650,13 @@ static __always_inline bool static_branch_##name(struct static_key *key) \
16491650
externstructstatic_keysched_feat_keys[__SCHED_FEAT_NR];
16501651
#definesched_feat(x) (static_branch_##x(&sched_feat_keys[__SCHED_FEAT_##x]))
16511652

1652-
#else/* !(SCHED_DEBUG && CONFIG_JUMP_LABEL) */
1653+
#else/* !CONFIG_JUMP_LABEL */
1654+
1655+
#definesched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
1656+
1657+
#endif/* CONFIG_JUMP_LABEL */
1658+
1659+
#else/* !SCHED_DEBUG */
16531660

16541661
/*
16551662
* Each translation unit has its own copy of sysctl_sched_features to allow
@@ -1665,7 +1672,7 @@ static const_debug __maybe_unused unsigned int sysctl_sched_features =
16651672

16661673
#definesched_feat(x) !!(sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
16671674

1668-
#endif/* SCHED_DEBUG&& CONFIG_JUMP_LABEL*/
1675+
#endif/* SCHED_DEBUG */
16691676

16701677
externstructstatic_key_falsesched_numa_balancing;
16711678
externstructstatic_key_falsesched_schedstats;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp