Message ID | 20190912194633.12045-1-msuchanek@suse.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 42484d2c0f82b666292faf6668c77b49a3a04bc0 |
Headers | show |
Series | powerpc/perf: remove current_is_64bit() | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | warning | Failed to apply on branch next (c317052c95bef1f977b023158e5aa929215f443d) |
snowpatch_ozlabs/apply_patch | fail | Failed to apply to any branch |
On Thu, 2019-09-12 at 19:46:33 UTC, Michal Suchanek wrote: > 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@c-s.fr> > Signed-off-by: Michal Suchanek <msuchanek@suse.de> Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/42484d2c0f82b666292faf6668c77b49a3a04bc0 cheers
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);
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@c-s.fr> Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- arch/powerpc/perf/callchain.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)