powerpc/perf: remove current_is_64bit()

Since commit ed1cd6deb0 ("powerpc: Activate CONFIG_THREAD_INFO_IN_TASK")
current_is_64bit() is quivalent to !is_32bit_task().
Remove the redundant function.

Suggested-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190912194633.12045-1-msuchanek@suse.de
This commit is contained in:
Michal Suchanek 2019-09-12 21:46:33 +02:00 committed by Michael Ellerman
parent de84ffc3cc
commit 42484d2c0f

View File

@ -284,16 +284,6 @@ static void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry,
} }
} }
static inline int current_is_64bit(void)
{
/*
* We can't use test_thread_flag() here because we may be on an
* interrupt stack, and the thread flags don't get copied over
* from the thread_info on the main stack to the interrupt stack.
*/
return !test_ti_thread_flag(task_thread_info(current), TIF_32BIT);
}
#else /* CONFIG_PPC64 */ #else /* CONFIG_PPC64 */
/* /*
* On 32-bit we just access the address and let hash_page create a * On 32-bit we just access the address and let hash_page create a
@ -321,11 +311,6 @@ static inline void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry
{ {
} }
static inline int current_is_64bit(void)
{
return 0;
}
static inline int valid_user_sp(unsigned long sp, int is_64) static inline int valid_user_sp(unsigned long sp, int is_64)
{ {
if (!sp || (sp & 7) || sp > TASK_SIZE - 32) if (!sp || (sp & 7) || sp > TASK_SIZE - 32)
@ -486,7 +471,7 @@ static void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
void void
perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs) perf_callchain_user(struct perf_callchain_entry_ctx *entry, struct pt_regs *regs)
{ {
if (current_is_64bit()) if (!is_32bit_task())
perf_callchain_user_64(entry, regs); perf_callchain_user_64(entry, regs);
else else
perf_callchain_user_32(entry, regs); perf_callchain_user_32(entry, regs);