All SD flags requiring 2+ sched_group to have any effect are now decorated with the SDF_NEEDS_GROUPS metaflag. This means we can now use the bitwise negation of SD_DEGENERATE_MASK in sd_degenerate() instead of explicitly using SD_WAKE_AFFINE (IOW the only flag without SDF_NEEDS_GROUPS).
>From now on, any flag without SDF_NEEDS_GROUPS will be correctly accounted as a flag not requiring 2+ sched_groups. Signed-off-by: Valentin Schneider <[email protected]> --- kernel/sched/topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 8064f495641b..3bb145ef5abd 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -165,7 +165,7 @@ static int sd_degenerate(struct sched_domain *sd) return 0; /* Following flags don't use groups */ - if (sd->flags & (SD_WAKE_AFFINE)) + if (sd->flags & ~SD_DEGENERATE_GROUPS_MASK) return 0; return 1; -- 2.27.0

