Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp769108ybc; Tue, 12 Nov 2019 08:56:12 -0800 (PST) X-Google-Smtp-Source: APXvYqy+JGo/oNHSaY2hqVtEdbUcHbbeH9/4YhMvqiP6R27wiKuT4BnqLLS9Wd65bIDWCJRGc6Bd X-Received: by 2002:a17:906:9248:: with SMTP id c8mr1195083ejx.47.1573577772856; Tue, 12 Nov 2019 08:56:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573577772; cv=none; d=google.com; s=arc-20160816; b=cYPkdMpCefU1UGO0/Ha/EUiYTYmJ/jbKcCHd9FvOkwBq8XMwnNLwogyvznuPuZXSM2 2vkizlyqyLsHiUe8QCmiCwhkpA5isNaMAZA/t7tGaCAOWqGs1HbVaXfNakxvxjVa12PJ 1N2XpA2x+CHP1NtKl+DQ1y270vOyxRqO8+tFAjcEg0vk17/bErNhrDh1LSGnQHvADnyA s78M3bP7K47gtGFrDn8MQpq+yNSpKSfnYXS2pqul7BHyiEaUuXqDjEVkjqGBbKcCGTnp lEda2pHmDEDaN9n+zLgHXWgG88hezx3+qvQw5Iyg50+Lm50h4+FxwNuoCqROFaIDl68x 9G5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CchHz4AmnvGRbRQJJSMYaHcQs8JVkTXEzd6uAJw/kbw=; b=vPniCVhVhke/oNJYeVjJFtALUEiJGtHUz9JCKJD3ClVLUJrAVkn+MN4AwJW6qyg1F8 3DGTG1G45+KnogHgQkz+qYeM0awExw9xdNvUWclxzKWpkNwjHlp6p/kz/FYKRWEvajok GM8VaCPQqjY9XIQ+wkUAIlhvUiZE8PL01DUFrDiXKp9kApI1GP75cS5ocV9Lu+LoBTMV eE785TOszgb5vg39GjMc0ccP85EeHDiP6p5q1gSIIOkxo09Lc5jgn6GBiyV0V90PqFVw EXkwqvSp57CzrzS62g65zUFW/5VCgrNQ/38JPrApP58XuRd2dm63otStD6KQD17OvuV6 NB7A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mj3si311031ejb.381.2019.11.12.08.55.48; Tue, 12 Nov 2019 08:56:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727820AbfKLQy3 (ORCPT + 99 others); Tue, 12 Nov 2019 11:54:29 -0500 Received: from mx2.suse.de ([195.135.220.15]:35594 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727716AbfKLQyB (ORCPT ); Tue, 12 Nov 2019 11:54:01 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 628D7B134; Tue, 12 Nov 2019 16:53:59 +0000 (UTC) From: Michal Suchanek To: linuxppc-dev@lists.ozlabs.org Cc: Michal Suchanek , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Oleg Nesterov , Alexander Viro , Christian Brauner , Nicholas Piggin , Allison Randal , "Naveen N. Rao" , Thomas Gleixner , Breno Leitao , Christophe Leroy , Claudio Carvalho , Russell Currey , Greg Kroah-Hartman , Mahesh Salgaonkar , Arnd Bergmann , Geert Uytterhoeven , Firoz Khan , Dmitry Vyukov , Masahiro Yamada , Hari Bathini , Andrew Donnellan , Nicolai Stange , Valentin Schneider , Diana Craciun , Daniel Axtens , Michael Neuling , Gustavo Romero , Mathieu Malaterre , "Steven Rostedt" , "Eric W. Biederman" , Heiko Carstens , David Howells , Brajeswar Ghosh , Jagadeesh Pagadala , David Hildenbrand , Andrew Morton , Madhavan Srinivasan , linux-kernel@vger.kernel.org Subject: [PATCH 30/33] powerpc/perf: remove current_is_64bit() Date: Tue, 12 Nov 2019 17:52:28 +0100 Message-Id: X-Mailer: git-send-email 2.23.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Michal Suchanek --- 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