提交 b1f896ce 编写于 作者: D Denis Kirjanov 提交者: Michael Ellerman

powerpc/xmon: fix task state output

p_state is unsigned since the commit 2f064a59

The patch also uses TASK_RUNNING instead of null.

Fixes: 2f064a59 ("sched: Change task_struct::state")
Signed-off-by: NDenis Kirjanov <kda@linux-powerpc.org>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211026133108.7113-1-kda@linux-powerpc.org
上级 290fe8aa
...@@ -3264,8 +3264,7 @@ static void show_task(struct task_struct *volatile tsk) ...@@ -3264,8 +3264,7 @@ static void show_task(struct task_struct *volatile tsk)
* appropriate for calling from xmon. This could be moved * appropriate for calling from xmon. This could be moved
* to a common, generic, routine used by both. * to a common, generic, routine used by both.
*/ */
state = (p_state == 0) ? 'R' : state = (p_state == TASK_RUNNING) ? 'R' :
(p_state < 0) ? 'U' :
(p_state & TASK_UNINTERRUPTIBLE) ? 'D' : (p_state & TASK_UNINTERRUPTIBLE) ? 'D' :
(p_state & TASK_STOPPED) ? 'T' : (p_state & TASK_STOPPED) ? 'T' :
(p_state & TASK_TRACED) ? 'C' : (p_state & TASK_TRACED) ? 'C' :
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册