Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5304857ybc; Wed, 27 Nov 2019 01:53:29 -0800 (PST) X-Google-Smtp-Source: APXvYqzpsq/PEG5KEWRp8qaEVWMGa3aUbEijicJT/cAqDsHDzfYTCytIjQzH8CEzGwAyC9YCSztK X-Received: by 2002:a17:906:4d58:: with SMTP id b24mr47769974ejv.277.1574848409657; Wed, 27 Nov 2019 01:53:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574848409; cv=none; d=google.com; s=arc-20160816; b=iM4mZGPPLlsE7AFz5u5qAZYHJq/c+mcEazwHWZjZ1/DhhupMdHrgfoPRRAn98Garc0 D5yi3GTKrBX5tlKOMx0XXQCRrk/dWeyLlpDi/cT+RJkWGsKCIv3T1rzDnNLN0JlHLGAT eirKdpiD7B0q0BIPFgOd0WWVQLQypqjCFJdOM5ZhSIkiOHevZ1uj8aCoyqyKaTi8DUZX CUTrUD0Ricz27Xw9gRZ+UF58YC+0vncBVo4GYrrFzLUTjNOds7yQZYXb5x6B50Mt4f1v H8bEJgRjkdj2zSNaqbGlxeCBMang5LqiYLaUyHJnP957Qw6YIylLx4MXVGEOpKxRrcv8 3D9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=QalMWcK32HfsTlpk+iLIusW3g8QLG7et8grhGnLybIc=; b=tmwEenfrFWZzm7suWKxCkRKqCPOWJsVICL42UAeeY9Bm6UVi/jZ6Yqylzro3PzpUzm VzIaEDanaqDmUHN3q47SOR9NI4LLJachZFng17GJjYhq5gUzMNWSdk5Rl+3D9lQJ3oyh aQECCcQ5s9m4kywe+GyBTCOrBLwBIcYw/nRJjF6YvhwdjaSUmgsPgU9LgG+74tHbdQEP AEKsB/vtMmjcmd9XfQZNfxSgI1u9A677f5Xx7p9bAd0HbrZR3l3VfRaiu7wp7Vjg99hG kwZ34xfSp1xGxpdV7Gv0DB7SND+JisAgzW/TQTaNGTuYBNpCbDdyhbb9ROalwhD8pXCG dRZA== 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 fy10si2746423ejb.394.2019.11.27.01.53.05; Wed, 27 Nov 2019 01:53:29 -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 S1727120AbfK0JtP (ORCPT + 99 others); Wed, 27 Nov 2019 04:49:15 -0500 Received: from mx2.suse.de ([195.135.220.15]:53326 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727110AbfK0JtK (ORCPT ); Wed, 27 Nov 2019 04:49:10 -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 42736B1DF; Wed, 27 Nov 2019 09:49:06 +0000 (UTC) Date: Wed, 27 Nov 2019 10:49:00 +0100 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org, Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Oleg Nesterov , Alexander Viro , Christian Brauner , Nicholas Piggin , Allison Randal , "Naveen N. Rao" , Thomas Gleixner , Breno Leitao , 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: Re: [PATCH v2 29/35] powerpc/perf: remove current_is_64bit() Message-ID: <20191127094900.GA11661@kitsune.suse.cz> References: <83795e9690ad8b51a2d991919bc102351a3bbb20.1574798487.git.msuchanek@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 27, 2019 at 06:41:09AM +0100, Christophe Leroy wrote: > > > Le 26/11/2019 ? 21:13, Michal Suchanek a ?crit?: > > 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 > > This change is already in powerpc/next, see https://github.com/linuxppc/linux/commit/42484d2c0f82b666292faf6668c77b49a3a04bc0 Right, needs rebase. Thanks Michal > > Christophe > > > --- > > 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); > >