Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5108091ybc; Tue, 26 Nov 2019 21:43:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyxzDdEfSgzHbxOLT7WcJR0VcSQQDCqLuldbezkE7xM+b0ZgPudYmmMvPGdxH3Br9mX61NN X-Received: by 2002:a17:906:4dda:: with SMTP id f26mr47091724ejw.89.1574833398697; Tue, 26 Nov 2019 21:43:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574833398; cv=none; d=google.com; s=arc-20160816; b=ktixzgYcXfWZzRIUbFgfCzCR+a0yuuDcC+BTWclN4IjlMD2gW3vIvToaULfr7cGCgE skcDvEGKpq3YqTfzXrpxgcOGhWF212+YOZz5GnEan+zUsuN4qH6cxXPfS7U/3Ntl83an Yd3znJQghfs4wJI8stlbrh9/QBwPGyF6thfyBe4d8StZKkE+vcojXudJhgF5S8qv1Y1B igm6KLRkUwdySUGERRNHueoeoCnq+7PcG0wdSfbiU56NIqJ3F3UpBtd6q3tThhC7lRmd 9CidbgbGBUnXIUMGm13zvYLtI7NZB/oKef6UE4r/po0FwlEsmSmaFXMTi2b/xLG1YczU 8oQg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=hF4O3c/eGWDgrTc5H8GaCkgtjbbpw3OdnkIyDRrWDLQ=; b=HdoI5wJ+XQ+vhLVIvs/4+kaGJnq5EUm2rQrFIPYnihZ8Qrn9OFkmhmteWiY7RB0iPq 8V6FVGwpvgGukDuhjvbyfXxNWqItsFddQa0BnYGTzf6RH4wDB7zlIfSh+l0GElIu/sXj i1zjUrxez61isTUpKsqkFFabN0ZGsNElzAJM1rblzj0OdTRRwkUpCPfe9SeFMAMVaXpM iYaL92od7/iJ5Ktu+Bhrs/DEPQK45/6jEvMio1obWvjnvqSkFvnOpCr1q2As77Os4T6c gkgLVVFw16WKY+7ZyoAtK85Og1b9GTDhBM7oMTRsfoLDjnCQa7d0bp0X7e5PgkE5wUiU xJxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=wQSFsTt9; 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 z18si8434467ejw.349.2019.11.26.21.42.55; Tue, 26 Nov 2019 21:43:18 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=wQSFsTt9; 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 S1726576AbfK0FlO (ORCPT + 99 others); Wed, 27 Nov 2019 00:41:14 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:60768 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbfK0FlN (ORCPT ); Wed, 27 Nov 2019 00:41:13 -0500 Received: from localhost (mailhub1-ext [192.168.12.233]) by localhost (Postfix) with ESMTP id 47N8lB4zCpz9tysk; Wed, 27 Nov 2019 06:41:10 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=wQSFsTt9; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id ioOz1oZBDhmO; Wed, 27 Nov 2019 06:41:10 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 47N8lB3cJ4z9tysj; Wed, 27 Nov 2019 06:41:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1574833270; bh=hF4O3c/eGWDgrTc5H8GaCkgtjbbpw3OdnkIyDRrWDLQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=wQSFsTt9qoFnjvCZTCZuwndaKfq7d6l5nBde8BRossKAePsEKATcpRWKFX6bnF4dK BSdcca7DaOrDog4rjNriF6jFy/xPqzQ5S9bgRLv09mjFbGLQWgz1wRtu0SjFt6kIxI TospyT5I+uxd4cHHottPoIempb6RtopoN5owQZZ8= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 406248B837; Wed, 27 Nov 2019 06:41:11 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id sckFHEe4BP-g; Wed, 27 Nov 2019 06:41:11 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 428BB8B770; Wed, 27 Nov 2019 06:41:09 +0100 (CET) Subject: Re: [PATCH v2 29/35] powerpc/perf: remove current_is_64bit() To: Michal Suchanek , linuxppc-dev@lists.ozlabs.org Cc: 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 References: <83795e9690ad8b51a2d991919bc102351a3bbb20.1574798487.git.msuchanek@suse.de> From: Christophe Leroy Message-ID: Date: Wed, 27 Nov 2019 06:41:09 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <83795e9690ad8b51a2d991919bc102351a3bbb20.1574798487.git.msuchanek@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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); >