Fix detection of idle

When we switch from migration -> rcu_preempt, the prev task of
rcu_preempt could be idle. If say, rcu_preempt went to sleep waiting on
a timer. In that case, it thinks the next task is idle.

Remove dependence on the stack of the switched-to process by storing
what the previous task was on the CPU, and not on the task's stack.

Signed-off-by: Joel Fernandes <joelaf@google.com>
2 files changed