Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2174437imu; Thu, 24 Jan 2019 08:21:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN4B/j6Is8xzLr/OBqH58CixG1kg88kMELDYDPI58yuKv9S/HYlSldnYXeI/Oqgq+NYY0FCL X-Received: by 2002:a17:902:1745:: with SMTP id i63mr7001112pli.145.1548346910739; Thu, 24 Jan 2019 08:21:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548346910; cv=none; d=google.com; s=arc-20160816; b=yYf2QBnKnFKCTc4fthY9pOnFuII9+S5mOO59SVkunRijWGaQCkuqO6Adp+SfvkQWdK pUbNfmaimRL1LC+lDX4ve0aNmAuOELODTucEIhN0qHwRWHUQgeILpPCKpnMgyfLAYjhS jKVR7+rLPmX9zOzM/aLON4UqWjc/9VAsII6Bdh1Ns2rBO7K+D5FSiJWmL+bxXi21QTOE IUd4UWmm8ZWfUC1ZAIGR2zg9/YicAWGAoFVnJo3G27o9BQLXECAQQizu+G2fi9k6xtm0 akAPxb+ZLrzXUpMLtPwiN9sMieDJN0QhPULdE/s2QaFE+S513iv+l2c1ToY9lOg3YX+h yhYg== 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:references :in-reply-to:message-id:dkim-signature; bh=2yKCyQRfzI6C/C4lxd+i107FYqk5GG5thiY9ISeZqQY=; b=wiZE78h8Rrea4+oMt5oY144K39Fv6/9YCY2ik5/KIp1qF4ANV46XckoGrYRuGZvA3Q l0NlR3WOHk+fHyWzLnW0VCElxIeK96rXHfF/JtTdSuEnVpWAlGH+vNfw46pVG0aSmKgc ugvY3moJpDnVMwl2qa6OT+DkBGUNZq9NsZslOow20qbC2qDsPnfD5VuMl0c6EsyCgj3l Es2dED2fpQxnDv1A3/2qOyJwJLnB8XcUFfhI1uvY1J6QTfwKVFMvD09bxOdhv+GRDhRc tPXFqSlARTWUQmwIJsluWeJmbDwWaPBuB4LAoEc2YrnuWpEf3V2f/3RCccrfpndbC+UT uMew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=N07XDiF8; 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 a1si24917908pld.249.2019.01.24.08.21.35; Thu, 24 Jan 2019 08:21:50 -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=N07XDiF8; 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 S1728389AbfAXQTf (ORCPT + 99 others); Thu, 24 Jan 2019 11:19:35 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:45471 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727573AbfAXQTc (ORCPT ); Thu, 24 Jan 2019 11:19:32 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43lnRP6NDQz9v01c; Thu, 24 Jan 2019 17:19:29 +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=N07XDiF8; 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 I_lbi3nQBZnB; Thu, 24 Jan 2019 17:19:29 +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 43lnRP5Kblz9v01Z; Thu, 24 Jan 2019 17:19:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1548346769; bh=2yKCyQRfzI6C/C4lxd+i107FYqk5GG5thiY9ISeZqQY=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=N07XDiF8l7L2QEMIIGRXEkZUUnlIW5mQu1ekLmcaBVAKRL01fMxVrBvEQMLbQFRrV DkPW/Y1gduahCICHFbt5lkhr5eW+Srd4ip8jCNKMFOb9yrp5RJAOD0CtHOV6/1S1mN fQ5pF/9LV7uuvEeIlQWLYXhwkUMBZ+2g/pI6su6o= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 52FDB8B863; Thu, 24 Jan 2019 17:19:31 +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 B2D2rIXCzySD; Thu, 24 Jan 2019 17:19:31 +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 1F2168B850; Thu, 24 Jan 2019 17:19:31 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id F21E772D88; Thu, 24 Jan 2019 16:19:30 +0000 (UTC) Message-Id: <90ef676a0fba977259221d95dd8ffd1117f963f3.1548346225.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v14 01/12] powerpc/32: Fix CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , Mike Rapoport Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Mark Rutland Date: Thu, 24 Jan 2019 16:19:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 40x/booke have another path to reach 3f from transfer_to_handler, so ACCOUNT_CPU_USER_ENTRY() have to be moved there. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 0768dfd8a64e..0165edd03b38 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -185,12 +185,6 @@ transfer_to_handler: addi r12,r12,-1 stw r12,4(r11) #endif -#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE - CURRENT_THREAD_INFO(r9, r1) - tophys(r9, r9) - ACCOUNT_CPU_USER_ENTRY(r9, r11, r12) -#endif - b 3f 2: /* if from kernel, check interrupted DOZE/NAP mode and @@ -208,9 +202,14 @@ transfer_to_handler: bt- 31-TLF_NAPPING,4f bt- 31-TLF_SLEEPING,7f #endif /* CONFIG_PPC_BOOK3S_32 || CONFIG_E500 */ +3: +#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE + CURRENT_THREAD_INFO(r9, r1) + tophys(r9, r9) + ACCOUNT_CPU_USER_ENTRY(r9, r11, r12) +#endif .globl transfer_to_handler_cont transfer_to_handler_cont: -3: mflr r9 lwz r11,0(r9) /* virtual address of handler */ lwz r9,4(r9) /* where to go when done */ -- 2.13.3