# Re: \[RFC PATCH 5/8\] sched: move CPU field back into thread\_info if THREAD\_INFO\_IN\_TASK=y

- From: Catalin Marinas \<catalin.marinas@arm.com\>
- Date: 2021-09-21 13:12:19 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2021/09/1517063
- Thread: https://ratatoskr.run/linux-arm-kernel/2021/09/1507796/t.md

```text
On Tue, Sep 14, 2021 at 02:10:33PM +0200, Ard Biesheuvel wrote:
> THREAD_INFO_IN_TASK moved the CPU field out of thread_info, but this
> causes some issues on architectures that define raw_smp_processor_id()
> in terms of this field, due to the fact that #include'ing linux/sched.h
> to get at struct task_struct is problematic in terms of circular
> dependencies.
> 
> Given that thread_info and task_struct are the same data structure
> anyway when THREAD_INFO_IN_TASK=y, let's move it back so that having
> access to the type definition of struct thread_info is sufficient to
> reference the CPU number of the current task.
> 
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
