Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp313245pxf; Thu, 11 Mar 2021 04:40:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyx83LmRmLfJTvT3i8Q7dO0wZ7eyJeo3tEm0UXC0fthNFDizFP/aA2mpmIWLxbbi4nJy2X+ X-Received: by 2002:a05:6402:1691:: with SMTP id a17mr8323848edv.336.1615466436859; Thu, 11 Mar 2021 04:40:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615466436; cv=none; d=google.com; s=arc-20160816; b=Jf+GjjDB440GK0Tm/hoTDyrZhj7WEnc50DkwjabPhp8KAgi/DoSI+/lCzxNzkFU8yu j9x4c6OPelTtYrejAguQNvrQmrF6H0PPydBwEdoFOI5prNORz9aUUyLPTkJndXRicB2J rRer/J8Kjez+V5i3A7+mZGvEwnygauzBj2x8TmPqLhdpXKO33NrGFVvWi1XpzL3BBWT2 GJUKzVPbNAoOtMHGPuyBJ2DwQZDJ07K7J/sq14PdtCvCW/xmPhojp0fOe7/i/YxSmTEv 4+S5kzB7pBIPZMhdjo2cnWd45tmlWZTlaz5XIu8VSH+sQZgqNFmJWRAZF80Il/YGU61g Ugrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=wPA1+vtr3AQzG3caEh8rTKiiLvGD80i4queKAjsaHPg=; b=ADaLMUGBvMlNA41Qx07TYkjFrxMtt+3HHuL+ChBhU8/TrOS67uH0Twthd+xiw0aomT Jo8eOWT97Qm+M8T1c7unlzHgdsqAaDB3FZ+M6pweCknBkGhizsW1pETHNQKqJb6/wzG1 YV32Xn9kbMzkz7/dO0Jjm/colfODDsGG3SRMeBKNIrVCm7nvR9UR5tVaDAvAFbAO9WUT pgwfUj4VWQG7I29VLaOc5uuPnt0ZLb0Q6eQLMgOez3Ty4RkXVmurZA5iOmiLRSqO1/4I 2p6kb0NksiDEMdC5oCii9zo5xzb+VHgX3sbD+gM+NgMXpAkXQOGLD/HqRndA9nXsOOYZ 43Bw== 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 k12si1613938eds.217.2021.03.11.04.40.14; Thu, 11 Mar 2021 04:40:36 -0800 (PST) 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 S233362AbhCKMig (ORCPT + 99 others); Thu, 11 Mar 2021 07:38:36 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:63340 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233396AbhCKMiI (ORCPT ); Thu, 11 Mar 2021 07:38:08 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4Dx7lF5W0Kz9typg; Thu, 11 Mar 2021 13:38:01 +0100 (CET) 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 Zg2vF4EyxMrh; Thu, 11 Mar 2021 13:38:01 +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 4Dx7lF478Pz9typf; Thu, 11 Mar 2021 13:38:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id E028F8B80A; Thu, 11 Mar 2021 13:38:02 +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 TXSY3mhLfLtq; Thu, 11 Mar 2021 13:38:02 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5FCCF8B80D; Thu, 11 Mar 2021 13:38:02 +0100 (CET) Subject: Re: [PATCH v2 36/43] powerpc/32: Set current->thread.regs in C interrupt entry From: Christophe Leroy To: Nicholas Piggin , Benjamin Herrenschmidt , Michael Ellerman , Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <8d523f9ecee1de0515cc31d43030c12ab171a670.1615291474.git.christophe.leroy@csgroup.eu> <1615339900.vmbtzuirqw.astroid@bobo.none> <035298ad-4d0b-5e74-6f5c-e03677580924@csgroup.eu> Message-ID: <5a80e05e-27d7-0e95-67c7-0fe3255c4be1@csgroup.eu> Date: Thu, 11 Mar 2021 13:38:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <035298ad-4d0b-5e74-6f5c-e03677580924@csgroup.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 11/03/2021 à 11:38, Christophe Leroy a écrit : > > > Le 10/03/2021 à 02:33, Nicholas Piggin a écrit : >> Excerpts from Christophe Leroy's message of March 9, 2021 10:10 pm: >>> No need to do that is assembly, do it in C. >> >> Hmm. No issues with the patch as such, but why does ppc32 need this but >> not 64? AFAIKS 64 sets this when a thread is created. > > Looks like ppc64 was doing the same in function save_remaining_regs() in arch/ppc64/kernel/head.S > until commit https://github.com/mpe/linux-fullhistory/commit/e5bb080d > > But I can't find what happend to it in that commit. > > Where is it done now ? Maybe that's also already done for ppc32. > I digged a bit more and found a later bug fix which adds that setting of current->thread.regs at task creation: https://github.com/mpe/linux-fullhistory/commit/3eac1897 That was in the ppc64 tree only at that time, and was merged into the common powerpc tree via commit https://github.com/mpe/linux-fullhistory/commit/06d67d54 So we have it for both ppc32 and ppc64 and ppc32 doesn't need to do it at exception entry anymore. I'll remove it. Thanks Christophe