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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 565C3C48BD1 for ; Fri, 11 Jun 2021 02:32:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31822610A2 for ; Fri, 11 Jun 2021 02:32:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231318AbhFKCew (ORCPT ); Thu, 10 Jun 2021 22:34:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230160AbhFKCev (ORCPT ); Thu, 10 Jun 2021 22:34:51 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAD8EC061574 for ; Thu, 10 Jun 2021 19:32:39 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id c12so3225561pfl.3 for ; Thu, 10 Jun 2021 19:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=UOW92aC6DkTa48QgwUGsp3h2g6ZPsQbasSzlvBgjQLY=; b=soK2L6BbXZVKYT6oA2EzWgCP9hBQeaKJ7XGF2nyly4PCKroZgSzoJHJjRNDtnPofC1 IKPpc8haDqSsqL36iPERWU3bPoQzG9NeQngwMWEH29Xqu39t0lWZYLUe9bNwxv2Yd3v1 eCkTbjOPWG2KY7ZT6q3r+VzogSmValMR6uJpPliS32pqdYi3egSOjYMAlgyDMYO52Mc9 pkZP0Th3cvp+Vtr2cWeE7WnEVKf57IM0yyUbdgHF02S0LUNlbXN6BMeQPh6BJUz0Ruwv CiIo+WZTC1yqcfzOJSVELjsXR71FmPuAqXVIIK8OnqZ9jUrPvWRPCVsh6Lu6hfwwhH3g GcAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=UOW92aC6DkTa48QgwUGsp3h2g6ZPsQbasSzlvBgjQLY=; b=V69pR58QQcU0AXQyG8dc+IHwaJMcXYBLkVimkSUZRePdm4GB7MrV6M2q7MWIg1hZWT g9dY76bmdjBtMSuJG+D2An0SDCM96i1avAxCMk6lFUcU0MVaiE7ff0EJOwkcs4/RcmGq ZXs6n//FUvaPpnjf9WAAmgU6Jkl5tejEN7/mXNJspV5WSWrnfPHfkEday9Km0AaWcZGD v0rVREXcJrZl/Of0MqjU2/8YnA6+q6D7Knfg5Ajj3wW4qgjLYC3V5e5+NVONufbdo5XE nUakgmd8XXQHGm9XAPdLdITmtbROMmN4ajxAN+w01fwv5Q4o43d4MTdMxPSeoAVmCXgJ EyMg== X-Gm-Message-State: AOAM530pmJtHgTZHLc0Fm+5t0WmfrD8hlANda9FetIL9qJapu++3dknf +ypq9dkvDBw9fEE/cYScflQ= X-Google-Smtp-Source: ABdhPJwgfmWBVfBMAJSTfEk7UoGj8K6Twg7sGzqbjVToujODcjt2zObXKzxTHUOLAMJm6evNOoIfYA== X-Received: by 2002:a63:62c2:: with SMTP id w185mr1380250pgb.76.1623378759533; Thu, 10 Jun 2021 19:32:39 -0700 (PDT) Received: from localhost (60-242-147-73.tpgi.com.au. [60.242.147.73]) by smtp.gmail.com with ESMTPSA id p16sm3580523pgl.60.2021.06.10.19.32.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 19:32:39 -0700 (PDT) Date: Fri, 11 Jun 2021 12:32:34 +1000 From: Nicholas Piggin Subject: Re: [PATCH v2 3/4] powerpc/interrupt: Rename and lightly change syscall_exit_prepare_main() To: Benjamin Herrenschmidt , Christophe Leroy , Michael Ellerman , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <809d316bf5f1a81acdd69e220c13e716dac24f53.1622818556.git.christophe.leroy@csgroup.eu> In-Reply-To: MIME-Version: 1.0 Message-Id: <1623378700.koj918a90m.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Excerpts from Christophe Leroy's message of June 5, 2021 12:56 am: > Rename syscall_exit_prepare_main() into interrupt_exit_prepare_main() >=20 > Make it static as it is not used anywhere else. >=20 > Pass it the 'ret' so that it can 'or' it directly instead of > oring twice, once inside the function and once outside. >=20 > And remove 'r3' parameter which is not used. >=20 > Also fix a typo where CONFIG_PPC_BOOK3S should be CONFIG_PPC_BOOK3S_64. This all looks good I think. I need to grab this fix from your series. Reviewed-by: Nicholas Piggin >=20 > Signed-off-by: Christophe Leroy > --- > arch/powerpc/kernel/interrupt.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) >=20 > diff --git a/arch/powerpc/kernel/interrupt.c b/arch/powerpc/kernel/interr= upt.c > index b6aa80930733..bc3c1892ed80 100644 > --- a/arch/powerpc/kernel/interrupt.c > +++ b/arch/powerpc/kernel/interrupt.c > @@ -228,11 +228,10 @@ static notrace void booke_load_dbcr0(void) > #endif > } > =20 > -notrace unsigned long syscall_exit_prepare_main(unsigned long r3, > - struct pt_regs *regs) > +static notrace unsigned long > +interrupt_exit_user_prepare_main(struct pt_regs *regs, unsigned long ret= ) > { > unsigned long ti_flags; > - unsigned long ret =3D 0; > =20 > again: > ti_flags =3D READ_ONCE(current_thread_info()->flags); > @@ -254,7 +253,7 @@ notrace unsigned long syscall_exit_prepare_main(unsig= ned long r3, > ti_flags =3D READ_ONCE(current_thread_info()->flags); > } > =20 > - if (IS_ENABLED(CONFIG_PPC_BOOK3S) && IS_ENABLED(CONFIG_PPC_FPU)) { > + if (IS_ENABLED(CONFIG_PPC_BOOK3S_64) && IS_ENABLED(CONFIG_PPC_FPU)) { > if (IS_ENABLED(CONFIG_PPC_TRANSACTIONAL_MEM) && > unlikely((ti_flags & _TIF_RESTORE_TM))) { > restore_tm_state(regs); > @@ -350,7 +349,7 @@ notrace unsigned long syscall_exit_prepare(unsigned l= ong r3, > } > =20 > local_irq_disable(); > - ret |=3D syscall_exit_prepare_main(r3, regs); > + ret =3D interrupt_exit_user_prepare_main(regs, ret); > =20 > #ifdef CONFIG_PPC64 > regs->exit_result =3D ret; > @@ -378,7 +377,7 @@ notrace unsigned long syscall_exit_restart(unsigned l= ong r3, struct pt_regs *reg > =20 > BUG_ON(!user_mode(regs)); > =20 > - regs->exit_result |=3D syscall_exit_prepare_main(r3, regs); > + regs->exit_result =3D interrupt_exit_user_prepare_main(regs, regs->exit= _result); > =20 > return regs->exit_result; > } > --=20 > 2.25.0 >=20 >=20