From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 924D0C432C0 for ; Wed, 27 Nov 2019 09:49:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6E6A120678 for ; Wed, 27 Nov 2019 09:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbfK0JtQ (ORCPT ); Wed, 27 Nov 2019 04:49:16 -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); > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E7A8C432C0 for ; Wed, 27 Nov 2019 09:52:30 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 39CE82070A for ; Wed, 27 Nov 2019 09:52:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39CE82070A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47NGK668gWzDqnK for ; Wed, 27 Nov 2019 20:52:26 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.de (client-ip=195.135.220.15; helo=mx1.suse.de; envelope-from=msuchanek@suse.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47NGFM6sgjzDqkd for ; Wed, 27 Nov 2019 20:49:11 +1100 (AEDT) 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 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) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Madhavan Srinivasan , David Hildenbrand , Heiko Carstens , Claudio Carvalho , David Howells , Masahiro Yamada , Paul Mackerras , Christian Brauner , Breno Leitao , Michael Neuling , Nicolai Stange , Diana Craciun , Firoz Khan , Allison Randal , Mahesh Salgaonkar , Geert Uytterhoeven , "Naveen N. Rao" , Valentin Schneider , Jagadeesh Pagadala , Arnd Bergmann , Nicholas Piggin , Alexander Viro , Steven Rostedt , Thomas Gleixner , Dmitry Vyukov , Daniel Axtens , Gustavo Romero , Mathieu Malaterre , Greg Kroah-Hartman , Oleg Nesterov , linux-kernel@vger.kernel.org, "Eric W. Biederman" , Andrew Donnellan , Brajeswar Ghosh , Hari Bathini , Andrew Morton , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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); > >