Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp760076ybe; Fri, 13 Sep 2019 06:00:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqx9LgeD0dMvWO1quIPwAKTOgwN6zQ9GN6QTCwQ6Gp9d+oQdf4Xcx7UxQ/utVVCaTS0iV30p X-Received: by 2002:a50:a8c5:: with SMTP id k63mr7780705edc.122.1568379622692; Fri, 13 Sep 2019 06:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568379622; cv=none; d=google.com; s=arc-20160816; b=kxP1wBDFgK4OwAT3iJNH/ZvenUKuaX49lRf+EIA8kF67p6Sly3V1G00JI7GHLsytYC w34jvCfg0qhl72Or7hrBnkyuKMZTX2APqZBVohEODjL4Onbb/qPGum98yUEOnDfSX5pm H8Q0EILeSnZLhRPMBTrGNeBC87cARIWf+RMRe2yU541KNDKsp24tHmYyslL/SoyW7vl+ 3Ly6XOG4sBXjt3HIpXDhXGhG3hwsh59nyJdjxd4lmn4jNFOur+mmeOOUxRjYERWHGOc4 VtYhFQYJ5L/6Y9tFr3fvKWKGqWU3aL/bZYW/PzIpcWFWPdu63ygiKpx3KZee0TkmUXB2 BjXQ== 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=SmYnmDnJWBVxk+hEkdobwz2FRoe9DpnUkk6IoSvYyOmqPuc9hE28z2NoMrt0+eP1Ey /3yzJ0nF1uqMF79cEiEg7TVs+ZUyUzKRhRauSGeq+3GhCLRWNgi9LlCw6KYY5gJ3560E NtptFuUQvLoXBtpct46rPgn11W6FBhZBF0O5sESV3IyA0vYqJXrumlzg13Grx9iTMwI4 miKkvhZjvkCrf1Fmz7jBbp4dCKdeZxAthGumUuqlytNxC+gtmaX6lS5WfJFxs4yAeLX0 +y7cQCYQ6mEJsTDpDIQrKI0OCoIGpRuwvChWx8unYFyT4k0Aap4Yujasm5jU2DYxg+65 T4DA== 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 f21si18228207edb.379.2019.09.13.05.59.59; Fri, 13 Sep 2019 06:00:22 -0700 (PDT) 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 S2387896AbfIMM6O (ORCPT + 99 others); Fri, 13 Sep 2019 08:58:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:44762 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387582AbfIMM6O (ORCPT ); Fri, 13 Sep 2019 08:58:14 -0400 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 725A9AF0B; Fri, 13 Sep 2019 12:58:12 +0000 (UTC) From: Michal Suchanek To: linuxppc-dev@lists.ozlabs.org Cc: Michal Suchanek , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Alexander Viro , Nicholas Piggin , Christophe Leroy , Breno Leitao , Arnd Bergmann , Heiko Carstens , Greg Kroah-Hartman , Firoz Khan , Thomas Gleixner , Joel Stanley , Hari Bathini , Michael Neuling , Andrew Donnellan , Russell Currey , Diana Craciun , "Eric W. Biederman" , David Hildenbrand , Allison Randal , Andrew Morton , Madhavan Srinivasan , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH v9 5/8] powerpc/perf: remove current_is_64bit() Date: Fri, 13 Sep 2019 14:57:59 +0200 Message-Id: <61343717e7960595c3258cea6a9493d67adb56d8.1568319275.git.msuchanek@suse.de> 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