[PATCH v16 19/21] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU
Nicholas Piggin
npiggin at gmail.com
Thu Feb 7 15:27:56 AEDT 2019
Michael Ellerman's on February 5, 2019 9:32 pm:
> From: Christophe Leroy <christophe.leroy at c-s.fr>
>
> Now that thread_info is similar to task_struct, its address is in r2
> so CURRENT_THREAD_INFO() macro is useless. This patch removes it.
You wouldn't want to keep CURRENT_THREAD_INFO(r2) to mean get the thread
info out of current, as just a no-op for documentation purpose? I don't
know /32 code at all so it's up to you.
> This patch also moves the 'tovirt(r2, r2)' down just before the
> reactivation of MMU translation, so that we keep the physical address
> of 'current' in r2 until then. It avoids a few calls to tophys().
>
> At the same time, as the 'cpu' field is not anymore in thread_info,
> TI_CPU is renamed TASK_CPU by this patch.
>
> It also allows to get rid of a couple of
> '#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE' as ACCOUNT_CPU_USER_ENTRY()
> and ACCOUNT_CPU_USER_EXIT() are empty when
> CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not defined.
May want to split these a little more?
More information about the Linuxppc-dev
mailing list