Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7419842imu; Thu, 31 Jan 2019 09:47:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN6htKPPlIl6l/GTpqJ2OO3BLm9MQYV+9rKVfn9NVxDgmld3yiGCZd53jf29Mt4AThoEcM8d X-Received: by 2002:a17:902:7107:: with SMTP id a7mr35686618pll.290.1548956871251; Thu, 31 Jan 2019 09:47:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548956871; cv=none; d=google.com; s=arc-20160816; b=rrJ0Nx9m6S3S8uHKXjnGa5KHXbttFRFeyUJSX7XiyjnGqYa/6sw7B2+b62jY0hCKxm Yp/zTwbCxyugogcYugT7RnRrOczBCSi9o+yrBTWiAT2f0fKh4WkZz6WR5pcPjDWZeoC1 is3xCU3NPdkAxj6yd6QsH7xth4xVQOS0ZgYmrbA0npJgJUlIUnxYf8mwS28ed1+VSjHI EX+ocOmRWVreEC/5Yb2rnwenIfU1rpVbr/SfsOwSzZgkkeKBOeAKPIJAWjqdlpj7xEOU 2PRmoULX7NcfPxm5BGrlSRkpR7S5PE2v9aVYtN38UeCcveUMFjieCFNHZX5YoEIN6l3R gjvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id :dkim-signature; bh=ugoZ4ISKI/Wbc3x+9e2KTETw23VmyIlLo+gOrAR3JkI=; b=mfmBAfI5q4FnC8qaCw7Jpfh5Wyos65i+PmABDhhi07WHnmvxxNl92Gt3K8Nmy3cDme fUJm+qQtOGWSwHSgzTEYcCajIS4v2/izIg2siMqBjk1nDg5SjOHjZxzvIS5Dcw7Qdhzn TMa3+sQQFB/F1v9+REVsR637pCP1qaIWvmb39u2ixl1lKNpUeko/J421/TSZRF2WIiKJ +9GnJp3y4JPBUfEH7gaN9zpbWOJGc6CQY5zPQcOrsNbOcoq91hSUdusYGmsr9jbr0zuB iybOYXtVttK0fq5724j8rAO8shwotLQGaMTC/yVo+Ysj38WYXgFVyb5WF9AMAka8nHc4 KUaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=SDoC3Gfm; 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 s5si5074302plr.211.2019.01.31.09.47.36; Thu, 31 Jan 2019 09:47:51 -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=SDoC3Gfm; 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 S1727101AbfAaRo7 (ORCPT + 99 others); Thu, 31 Jan 2019 12:44:59 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:65208 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbfAaRo4 (ORCPT ); Thu, 31 Jan 2019 12:44:56 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43r70j4T7wz9vBKq; Thu, 31 Jan 2019 18:44:53 +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=SDoC3Gfm; 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 eKvne8ryPTPS; Thu, 31 Jan 2019 18:44:53 +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 43r70j30tgz9vBKn; Thu, 31 Jan 2019 18:44:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1548956693; bh=ugoZ4ISKI/Wbc3x+9e2KTETw23VmyIlLo+gOrAR3JkI=; h=From:Subject:To:Cc:Date:From; b=SDoC3Gfm7FV7wDF3RLUH1e5K9f7/WNELtvyy0QaqUYZ1EZd8/f7JIVcQlrFc20q1U 0wIB9oyitc7HdE6fwM6VHAq5DX/KVsQDmdilrmt9nF7oDQY3QO05SG50EHfOdFhzjm uU/qxhSqh/dnwr9Xq5UxgZy9CRnLQwzs8CECC1XY= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 18D5D8B83A; Thu, 31 Jan 2019 18:44:55 +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 Qx5-lQXDOIpQ; Thu, 31 Jan 2019 18:44:55 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id EAEEF8B835; Thu, 31 Jan 2019 18:44:54 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id BA05F72E25; Thu, 31 Jan 2019 17:44:54 +0000 (UTC) Message-Id: <9f9dd859d571e324c7412ed9db9da8cfba678257.1548956511.git.christophe.leroy@c-s.fr> From: Christophe Leroy Subject: [RFC PATCH] powerpc/6xx: Don't set back MSR_RI before reenabling MMU To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 31 Jan 2019 17:44:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org By delaying the setting of MSR_RI, a 1% improvment is optained on null_syscall selftest on an mpc8321. Without this patch: root@vgoippro:~# ./null_syscall 1134.33 ns 378.11 cycles With this patch: root@vgoippro:~# ./null_syscall 1121.85 ns 373.95 cycles The drawback is that a machine check during that period would be unrecoverable, but as only main memory is accessed during that period, it shouldn't be a concern. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 146385b1c2da..ea28a6ab56ec 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S @@ -282,8 +282,6 @@ __secondary_hold_acknowledge: stw r1,GPR1(r11); \ stw r1,0(r11); \ tovirt(r1,r11); /* set new kernel sp */ \ - li r10,MSR_KERNEL & ~(MSR_IR|MSR_DR); /* can take exceptions */ \ - MTMSRD(r10); /* (except for mach check in rtas) */ \ stw r0,GPR0(r11); \ lis r10,STACK_FRAME_REGS_MARKER@ha; /* exception frame marker */ \ addi r10,r10,STACK_FRAME_REGS_MARKER@l; \ -- 2.13.3