| From 47d7f66bba84133977268e4aca6af6f81205d3c0 Mon Sep 17 00:00:00 2001 |
| From: Peng Liu <iwtbavbm@gmail.com> |
| Date: Tue, 9 Jun 2020 23:09:36 +0800 |
| Subject: [PATCH] sched: correct SD_flags returned by tl->sd_flags() |
| |
| commit 9b1b234bb86bcdcdb142e900d39b599185465dbb upstream. |
| |
| During sched domain init, we check whether non-topological SD_flags are |
| returned by tl->sd_flags(), if found, fire a waning and correct the |
| violation, but the code failed to correct the violation. Correct this. |
| |
| Fixes: 143e1e28cb40 ("sched: Rework sched_domain topology definition") |
| Signed-off-by: Peng Liu <iwtbavbm@gmail.com> |
| Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> |
| Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org> |
| Reviewed-by: Valentin Schneider <valentin.schneider@arm.com> |
| Link: https://lkml.kernel.org/r/20200609150936.GA13060@iZj6chx1xj0e0buvshuecpZ |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c |
| index a906d2535710..6fb3e636fbe1 100644 |
| --- a/kernel/sched/topology.c |
| +++ b/kernel/sched/topology.c |
| @@ -1332,7 +1332,7 @@ sd_init(struct sched_domain_topology_level *tl, |
| sd_flags = (*tl->sd_flags)(); |
| if (WARN_ONCE(sd_flags & ~TOPOLOGY_SD_FLAGS, |
| "wrong sd_flags in topology description\n")) |
| - sd_flags &= ~TOPOLOGY_SD_FLAGS; |
| + sd_flags &= TOPOLOGY_SD_FLAGS; |
| |
| /* Apply detected topology flags */ |
| sd_flags |= dflags; |
| -- |
| 2.27.0 |
| |