Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1155020pxb; Thu, 19 Aug 2021 22:17:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRksjzVB16+DqXVzMr7mj8CtiYkAH2mrAHEhM9NXquWBmqTurD8nVej8jPLStwvY+JUp8R X-Received: by 2002:a6b:8b4b:: with SMTP id n72mr14177081iod.18.1629436622673; Thu, 19 Aug 2021 22:17:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629436622; cv=none; d=google.com; s=arc-20160816; b=J063ZUvJzIP/Sb5j2vuGRBoqzIzBCJEE1qPclEyy574A3W2Q4dRzDGIw3UKXWdCTz6 L0y8Cp5bO1cNg4KjyKj9uyw+5igvtBFTHT1GG/2psyZMeBBguSJ1ZGP9e3l3WihfSQng ePZVfSmVMZyiYF3jx7OMdumDwAUKAoqG1MM/gR0AzEdHgXFa7juQk/UIBvsCKyoEOE+J yzuksFQuoqv9U85s2nkDwdBDR23sAHPEv71Cnz6XjkJVmswQhH4+cwAwYa5zevjFC2Of 6WHMb4kQtF6U4YdMrLGXwyutS3bxmH4GjOoiZgbgex/HD5h5NmuVRZVWbu+wymByJ6/Z Aosg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:cc:to:subject:from:message-id; bh=KmY7gUNfZpFW/6A0oJrT3tbx2yfIfKbdySbmyWAgOxU=; b=Swv7z5JwNXvTTEjLFG7udsZc4VEawHUSr85ofnjIrc6oBm6Y/ayRlGMrZLXdNkiKch lL8j7LHgAH7Rw+1qxCko82EcEqmx0kJF5oQhwD2ZbNoqIWr6pnTk1wqSTPNLTWJ5Kn9F 2ilDaXtuPE3sOWRpw2yshNLmSQE0i4LmLDUOz01i7dsPbCW/I7mXyMEaqQqRTwKLBRJD Pp6IUeKfGNOoH1UA+W2hiDgJBId1nqXtOLPwJOC9QpvtsJ/SuqL+PbGwdkb7PxTIuM99 I3Q79Q0j/Toy+7lprbIoxty4FPAAYPctt+6blOsakw08+sJjsHcbREbXwt9J0HiQjdNI MG+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r131si2371880ior.19.2021.08.19.22.16.50; Thu, 19 Aug 2021 22:17:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235243AbhHTFQs (ORCPT + 99 others); Fri, 20 Aug 2021 01:16:48 -0400 Received: from pegase2.c-s.fr ([93.17.235.10]:39341 "EHLO pegase2.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233951AbhHTFQr (ORCPT ); Fri, 20 Aug 2021 01:16:47 -0400 Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4GrVGZ54MGz9sVZ; Fri, 20 Aug 2021 07:16:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ATiTfI51WLBX; Fri, 20 Aug 2021 07:16:06 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4GrVGZ49dvz9sVF; Fri, 20 Aug 2021 07:16:06 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6E0738B76A; Fri, 20 Aug 2021 07:16:06 +0200 (CEST) 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 Cgy46c8AJQ5G; Fri, 20 Aug 2021 07:16:06 +0200 (CEST) Received: from po9473vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3AFB68B773; Fri, 20 Aug 2021 07:16:06 +0200 (CEST) Received: by po9473vm.idsi0.si.c-s.fr (Postfix, from userid 0) id EAB9466977; Fri, 20 Aug 2021 05:16:05 +0000 (UTC) Message-Id: <91b1d242525307ceceec7ef6e832bfbacdd4501b.1629436472.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH] powerpc/32: indirect function call use bctrl rather than blrl in ret_from_kernel_thread To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Fri, 20 Aug 2021 05:16:05 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Copied from commit 89bbe4c798bc ("powerpc/64: indirect function call use bctrl rather than blrl in ret_from_kernel_thread") blrl is not recommended to use as an indirect function call, as it may corrupt the link stack predictor. This is not a performance critical path but this should be fixed for consistency. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 0273a1349006..61fdd53cdd9a 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -161,10 +161,10 @@ ret_from_fork: ret_from_kernel_thread: REST_NVGPRS(r1) bl schedule_tail - mtlr r14 + mtctr r14 mr r3,r15 PPC440EP_ERR42 - blrl + bctrl li r3,0 b ret_from_syscall -- 2.25.0