Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6940721imu; Thu, 31 Jan 2019 02:11:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN7QXzQ5B62DGoSVVbmM0VZl2WteyK0x3cv4PjP0N3lANGkJxSye7d0qTC8O2L+6Y7G5DY02 X-Received: by 2002:a17:902:e002:: with SMTP id ca2mr34724555plb.103.1548929485423; Thu, 31 Jan 2019 02:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548929485; cv=none; d=google.com; s=arc-20160816; b=JSysDPNaGHozW8DQqrJ3Zc7AScpylOr2K+HRes5mGCYttykOr6+soFQvZ0CJ3YESvg 5lTgk8Z2km2kug1Kv3dhIGJo9C774UxWjW2ZqQc7/CkobM0wZE8KqRIFYrHrwUo2hUkP qjhVTzAtM1CZAw9QQdaPdYPAAmd/r+K5zWedPaMkdwwMOtJMd/8BClVSnrO78yCk62A5 HtkUul0/UUTx09WUdleH4ciwghr7l9k/9VOCnztG7vsbNc6SLilcpYTckXZG3hWiMClC 3ZjX7s2C5cKExix5tnnHNU3dczsexc4FfyoRAGYd6NWRwEUebGjFmecCp6g5DzW/V85E 0EdQ== 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=RKnLzg8KtVsjDsnOtBObMBW8+bwI3rJVtk1LBNKXIkw=; b=SIS2ssn2OEwdwEKRG2F7SoAqq6m5azOeUjJ0J5KmGVC8Vym24fJSzgdgJ49SNPon8R titTNFKRDt3cJqvDKDPAkBu3I6x6NBqboTP8DiPpSSV8Ta5QRQp8WztVksPuHoQqWOO8 3N8sSmUMuWds7lpBccQeVbNgk21rn5LRPZHcH6NJdrZ3CP0Dy4DpefGRTZreS38tGfj9 99pekRS4mUtPFxJdzi3AZwlwEBtP62AWcid1VCR3mu6zeD0FLu02JBmDEoD5uIvp5T2M ozx1wJxDzCYEJMt3LQjyG4rIyyYglY9mfs3zf3NgtOoXyH6QcgGkKnFT3dOaJFGc0EN2 7cJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=VzPNf6OS; 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 q32si3928677pgm.410.2019.01.31.02.11.10; Thu, 31 Jan 2019 02:11:25 -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=VzPNf6OS; 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 S1727501AbfAaKKR (ORCPT + 99 others); Thu, 31 Jan 2019 05:10:17 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:12741 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729232AbfAaKIt (ORCPT ); Thu, 31 Jan 2019 05:08:49 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43qwtQ16QRz9tyxD; Thu, 31 Jan 2019 11:08:46 +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=VzPNf6OS; 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 Pd1lwmXEVKIQ; Thu, 31 Jan 2019 11:08:46 +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 43qwtQ04kRz9tyx9; Thu, 31 Jan 2019 11:08:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1548929326; bh=RKnLzg8KtVsjDsnOtBObMBW8+bwI3rJVtk1LBNKXIkw=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=VzPNf6OS1ys/wV4D+0lu/HG4lGXNQHCIg3GSF1eIhpb0mC7I39C3RPH/c19iorhtB 5OJlwpqM+l6jQRqazLbdvkJIGuJ2pC5G6v5h049n1ALzmR5ZRPc+k37kRT79cOL9fH V+8ekJty9iBr1caiCb6b1pbTGiF04c7rsQLnRwgU= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1ED068B814; Thu, 31 Jan 2019 11:08:47 +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 aBh9T47M05TU; Thu, 31 Jan 2019 11:08:47 +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 E09A68B78D; Thu, 31 Jan 2019 11:08:46 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 8A5E272E14; Thu, 31 Jan 2019 10:08:46 +0000 (UTC) Message-Id: In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v15 02/13] powerpc/32: Fix CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 31 Jan 2019 10:08:46 +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, make sure it also calls ACCOUNT_CPU_USER_ENTRY() when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is selected. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 0768dfd8a64e..d4c6186aa7e8 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S @@ -166,6 +166,13 @@ transfer_to_handler: internal debug mode bit to do this. */ lwz r12,THREAD_DBCR0(r12) andis. r12,r12,DBCR0_IDM@h +#endif +#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE + CURRENT_THREAD_INFO(r9, r1) + tophys(r9, r9) + ACCOUNT_CPU_USER_ENTRY(r9, r11, r12) +#endif +#if defined(CONFIG_40x) || defined(CONFIG_BOOKE) beq+ 3f /* From user and task is ptraced - load up global dbcr0 */ li r12,-1 /* clear all pending debug events */ @@ -185,11 +192,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.13.3