Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4648611ybc; Tue, 26 Nov 2019 12:17:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyLVhogMQTzkZrXk6joHNs6iQ3KuVUPccworLMLUmnA9HcQM51HAdemGY4/ossjsnXcsGKL X-Received: by 2002:a05:6402:1b04:: with SMTP id by4mr27775933edb.218.1574799425278; Tue, 26 Nov 2019 12:17:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574799425; cv=none; d=google.com; s=arc-20160816; b=sYjnUKnQMyApImSGF9uF94ebEJoMJnLU1CWDqbzGe5ujcMaxju8a2rZ07EQxEV/CXC JdyZ/hLxlXf7rnJZCawfyuIr8BF/A5x+RyH8Q2HrYBP+8n72san2jzz/ACJWTkTAJBnx NGtmSR4tDIOwIaBfknwtSEKVkJfVxZ5CDbTIZU0AzyAEzalj72xaAvnU0sbwhvp3/GLV 7q4JsmXdG/jDFHTHHwWzmEpFBr8/R0AX730HQtL/0CF9VSQ1dfgKesT4IP732yMU4RHU ZMZZBTlL6WaSFoPo5ZCFK9lUoXh1jKLYm5beKGWjrIZBTLh+EM/Ny+kYgXa5Y1riejtO m3og== 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=V7eCo1hz6t2/KcsfFqfwo6T39bkGA+OmVWzQmMs4rHE=; b=SxPAH3Kbq0UM3Xmef4NOsqeyYTgoOKdT5ozt3S46pGOAf09HeZbaReTR9X+6kQvtAI OiuEhBEe9d/DXMm71rhih0ycCeZLcDMvmZAuZq4e5qtzO4LU6tiapeK27HiEXLN6lHg5 2Wb0oZ27ITXCBWpwYmxJFmyLIbbZLI2ly2+7NwcLPcX/J5v2cMO65MCLZi1IajZQCSZZ aa37sthzMgJ5wqdtFGFZ3Abgs+kkndpMcH3hn/IvEQqqSspZWRzfs9PuhwrSbVx/puQv zMengtFVd38Ba0aAiJas+A3WUmRR84dE8LOoRznEGj7a/bBQgV7JjOwoRuNMQf4ZSNwS Ft0A== 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 ck4si7969751ejb.29.2019.11.26.12.16.41; Tue, 26 Nov 2019 12:17:05 -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 S1727541AbfKZUOx (ORCPT + 99 others); Tue, 26 Nov 2019 15:14:53 -0500 Received: from mx2.suse.de ([195.135.220.15]:47708 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727465AbfKZUOo (ORCPT ); Tue, 26 Nov 2019 15:14:44 -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 0E229B35C; Tue, 26 Nov 2019 20:14:43 +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 v2 29/35] powerpc/perf: remove current_is_64bit() Date: Tue, 26 Nov 2019 21:13:43 +0100 Message-Id: <83795e9690ad8b51a2d991919bc102351a3bbb20.1574798487.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 c84bbd4298a0..35d542515faf 100644 --- a/arch/powerpc/perf/callchain.c +++ b/arch/powerpc/perf/callchain.c @@ -284,16 +284,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 */ /* * On 32-bit we just access the address and let hash_page create a @@ -321,11 +311,6 @@ static inline void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry { } -static inline int current_is_64bit(void) -{ - return 0; -} - static inline int valid_user_sp(unsigned long sp, int is_64) { if (!sp || (sp & 7) || sp > TASK_SIZE - 32) @@ -486,7 +471,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