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

Link: https://github.com/linuxppc/issues/issues/275
Link: https://lkml.org/lkml/2019/9/12/540

Fixes: linuxppc#275
Suggested-by: Christophe Leroy <christophe.le...@c-s.fr>
Signed-off-by: Michal Suchanek <msucha...@suse.de>
---
 arch/powerpc/perf/callchain.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
index 8f30f1b47c78..dd5051015008 100644
--- a/arch/powerpc/perf/callchain.c
+++ b/arch/powerpc/perf/callchain.c
@@ -100,22 +100,10 @@ perf_callchain_kernel(struct perf_callchain_entry_ctx 
*entry, struct pt_regs *re
        }
 }
 
-static inline int current_is_64bit(void)
-{
-       if (!IS_ENABLED(CONFIG_COMPAT))
-               return IS_ENABLED(CONFIG_PPC64);
-       /*
-        * 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);
-}
-
 void
 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);
        else
                perf_callchain_user_32(entry, regs);
-- 
2.23.0

Reply via email to