[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <fbad11e3607273b0af7d4196d2f7c2d7b0a2b4f9.1573576649.git.msuchanek@suse.de>
Date: Tue, 12 Nov 2019 17:52:28 +0100
From: Michal Suchanek <msuchanek@...e.de>
To: linuxppc-dev@...ts.ozlabs.org
Cc: Michal Suchanek <msuchanek@...e.de>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Oleg Nesterov <oleg@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <christian@...uner.io>,
Nicholas Piggin <npiggin@...il.com>,
Allison Randal <allison@...utok.net>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Breno Leitao <leitao@...ian.org>,
Christophe Leroy <christophe.leroy@....fr>,
Claudio Carvalho <cclaudio@...ux.ibm.com>,
Russell Currey <ruscur@...sell.cc>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>,
Arnd Bergmann <arnd@...db.de>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Firoz Khan <firoz.khan@...aro.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
Hari Bathini <hbathini@...ux.ibm.com>,
Andrew Donnellan <andrew.donnellan@....ibm.com>,
Nicolai Stange <nstange@...e.de>,
Valentin Schneider <valentin.schneider@....com>,
Diana Craciun <diana.craciun@....com>,
Daniel Axtens <dja@...ens.net>,
Michael Neuling <mikey@...ling.org>,
Gustavo Romero <gromero@...ux.ibm.com>,
Mathieu Malaterre <malat@...ian.org>,
"Steven Rostedt" <rostedt@...dmis.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
David Howells <dhowells@...hat.com>,
Brajeswar Ghosh <brajeswar.linux@...il.com>,
Jagadeesh Pagadala <jagdsh.linux@...il.com>,
David Hildenbrand <david@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 30/33] powerpc/perf: remove current_is_64bit()
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.leroy@....fr>
Signed-off-by: Michal Suchanek <msuchanek@...e.de>
---
arch/powerpc/perf/callchain.c | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
index 7863ee0a0e69..fbf76cb01026 100644
--- a/arch/powerpc/perf/callchain.c
+++ b/arch/powerpc/perf/callchain.c
@@ -275,16 +275,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 */
static int read_user_stack_slow(void __user *ptr, void *buf, int nb)
{
@@ -296,11 +286,6 @@ static inline void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry
{
}
-static inline int current_is_64bit(void)
-{
- return 0;
-}
-
#define __SIGNAL_FRAMESIZE32 __SIGNAL_FRAMESIZE
#define sigcontext32 sigcontext
#define mcontext32 mcontext
@@ -477,7 +462,7 @@ static void perf_callchain_user_32(struct perf_callchain_entry_ctx *entry,
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
Powered by blists - more mailing lists