Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5613689imu; Wed, 30 Jan 2019 00:10:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN6D4LaC9hSYv5mQhZKbNmE/CwJELyae9KjlHN8mEWh5dFeKY+2vVxohHlZB1UHH6Iwgmh76 X-Received: by 2002:a62:1f9d:: with SMTP id l29mr29577074pfj.14.1548835813811; Wed, 30 Jan 2019 00:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548835813; cv=none; d=google.com; s=arc-20160816; b=HtnN9kHt8PDgMUNt2qsEdFMbMDQC9zlp4mn1J9f+9DiuvrNsrWlWAZoFs2AmN4dZeT jMislFxO8IDg4F3Rvz/BpGF1MXZ1hzdNhJRyNw2uNC9h92NCjE1uk4YJdz5JVwhlm91s ykk8gYQXcJmqjYWmuXAWnegeDgNP7VxFw2WYt/MAn+JFABb9yNpt8JKdUk7Xj4EyLtZs mQe07/Sox2aMmLCmSA0rS4FUuQc+8n1fGDXXNZ6y4lusBkdx9FMnv3kpIMuqN0E3SfxZ lZDgVXXGd+Xqwy30AG6RtBCcG5QgTVzQnCh2nH7N7LnAM/rz2+5+mr+aEFUcnHzIVTkZ UAJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature; bh=9vW9OR0z4S58IqvSQCrbKbsZWtlNhKwNlQ9D3jbIex4=; b=sv5eA7nIE9+aBFJDJbDVtPWaHWk6IP5yHOIiMqIsjOuDAiSVvN61f15SJSsBXsKbzn qoCKbV8FWMrdUOFpcChEN+N3FPbP9iV0aleD9laQyHIzKfzUmMU01V95zDHasTAcns93 t9fByLGHG8eziFlH3cdYia3QPMOw+0fLb6GQ7hp709yTz3wkTs23l8hBemZihlyWBqpR OfitdPr03k/Rh5IC09B1sqJ6RLNMHZMRQ8kkXDWCcf2y9L7hbtf/eOPiHp2qW/diM0QZ 6Tg6ChtcJKkfnPTJRKiG/NehUEjB3xCNvbcQqjB6fL/skwyg24OiLf7e/Qdem9QyjvvW mdvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=sYKzP3rw; 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 a68si798935pla.267.2019.01.30.00.09.57; Wed, 30 Jan 2019 00:10:13 -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=sYKzP3rw; 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 S1728490AbfA3IIh (ORCPT + 99 others); Wed, 30 Jan 2019 03:08:37 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:60502 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbfA3IIg (ORCPT ); Wed, 30 Jan 2019 03:08:36 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43qGG83L6vz9v0wX; Wed, 30 Jan 2019 09:08:32 +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=sYKzP3rw; 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 QG24T4PNc8TU; Wed, 30 Jan 2019 09:08:32 +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 43qGG82G3Vz9v0wS; Wed, 30 Jan 2019 09:08:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1548835712; bh=9vW9OR0z4S58IqvSQCrbKbsZWtlNhKwNlQ9D3jbIex4=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=sYKzP3rwYPZCGGi4Q6vyE1KvBlBGPwVwckOTPW7Kx89Lj92jYTiOn5NEne+AL37Qx HqFO+TfvvPvd/yruWo5s8Sdx2ynVSEg+Gapx5pZLtu1Qvx8hgC1nkQWHHqz7RJ5IKY ez6UsJhppEcCEZd7RsYBlQgTQm0oAh8JqCV/P4B4= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 446A78B7EB; Wed, 30 Jan 2019 09:08:33 +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 j1GNqgnD3Ty5; Wed, 30 Jan 2019 09:08:33 +0100 (CET) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 1EDA18B755; Wed, 30 Jan 2019 09:08:33 +0100 (CET) Subject: Re: [PATCH v14 01/12] powerpc/32: Fix CONFIG_VIRT_CPU_ACCOUNTING_NATIVE for 40x/booke From: Christophe Leroy To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin , Mike Rapoport Cc: Mark Rutland , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <90ef676a0fba977259221d95dd8ffd1117f963f3.1548346225.git.christophe.leroy@c-s.fr> Message-ID: <9d1db23c-4a5b-6dcb-7cfe-f743a5f053db@c-s.fr> Date: Wed, 30 Jan 2019 09:08:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <90ef676a0fba977259221d95dd8ffd1117f963f3.1548346225.git.christophe.leroy@c-s.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 24/01/2019 à 17:19, Christophe Leroy a écrit : > 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 Now ACCOUNT_CPU_USER_ENTRY() is also in the non-user entry path. This change is crazy, please ignore it :-S Christophe > --- > 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 */ >