Thread (34 messages) 34 messages, 4 authors, 2019-02-26

Re: [PATCH v16 19/21] powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2019-02-07 04:29:35

Michael Ellerman's on February 5, 2019 9:32 pm:
From: Christophe Leroy <redacted>

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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help