Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3285220imm; Thu, 17 May 2018 06:29:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqS5W6lUaBU25W27uty9cgcfdjFeTWrsQ5hp+wUKwf4rRGsYXZvL/FAYDR2vJn/O/HfUjx2 X-Received: by 2002:a62:5610:: with SMTP id k16-v6mr5184565pfb.19.1526563787227; Thu, 17 May 2018 06:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526563787; cv=none; d=google.com; s=arc-20160816; b=juTCUsaulTY5T3WC/HjBqT5wVQGmcmWuTpHCxEQ14AHffmGBOF3DXqVuqerg/bp+Z3 FhQuCdZhhJ6vMGNN7KVdPJsdWzcEfRqL9tu+gUCVBlx+BSA8K2oPCenp2P9Cl69Yf5lS Woq0dVHeRcb26E+9MmusoNIdnSfanvfYlLTm8HtWWu+3+Nc3Qy5vr2NOPQF4Qc/pyp2o P0pN3tH7+TldcgyQ6dqT829D00blB2alVGfannlWYfU75LDWWGlvJ9zIdFRmNJgQNr1P IkgvF8PWXUHLx2rAZPSIC4BVVl8S8SOKKPS9CUhAk4IujcMF5FfhcTQWIoYKNe1/UpcK tTxQ== 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:from:references:cc:to:subject:arc-authentication-results; bh=q5kwQKY4fCv1pkPLLcS5LVUO4GWjJXL/Hj5Dc3/HHrQ=; b=jjVsles2sR7PcV1uBNz0vvHnERLwHW97g5l/4QBWlFXxr1yUUaXVjjjNO1hEoNmKmX Ws4Xr85XsgKCxmjNrqDJZ3MJny6SBozdK40T4i75MJzdG5suzX+XSrXG3a/e8T3FdQLy AnoLiaSCvG3+/5FUKfYfsv6Z85YW54U3o4kfGIRbTJ7+ysYAVkx0/PcvUf7j2+9hDQ9J 2o42vkXb08F5pYOZTxtzZP26Jtu+nBXO8N3Bpiff6/lem9Rhl/VTZIyYPu/eTu57Q3oS 106kjGE89fv8ETGIa7B7TkKNJdigqcsxRiNdRtBEJDWo87G98ibv9toypJUAeJwV4BIE EZqw== ARC-Authentication-Results: i=1; mx.google.com; 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 a7-v6si2707176pgu.26.2018.05.17.06.29.32; Thu, 17 May 2018 06:29:47 -0700 (PDT) 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; 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 S1752100AbeEQN1k (ORCPT + 99 others); Thu, 17 May 2018 09:27:40 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:21185 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbeEQN1j (ORCPT ); Thu, 17 May 2018 09:27:39 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 40msYN4pNsz9v2fq; Thu, 17 May 2018 15:27:36 +0200 (CEST) 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 Tlx2YjU-rErB; Thu, 17 May 2018 15:27:36 +0200 (CEST) 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 40msYN4DCrz9v2fp; Thu, 17 May 2018 15:27:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 42DC68B998; Thu, 17 May 2018 15:27:38 +0200 (CEST) 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 zx07295Shbwu; Thu, 17 May 2018 15:27:38 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0BC158B993; Thu, 17 May 2018 15:27:38 +0200 (CEST) Subject: Re: [PATCH v2 2/2] powerpc/32be: use stmw/lmw for registers save/restore in asm To: Segher Boessenkool , Michael Ellerman Cc: Benjamin Herrenschmidt , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <7fbae252f24ec4d30f52f57a549901fa3f799f8f.1523984745.git.christophe.leroy@c-s.fr> <87zi0ymqj6.fsf@concordia.ellerman.id.au> <20180517131550.GR17342@gate.crashing.org> From: Christophe LEROY Message-ID: <74ce3f30-6c06-e884-f1ea-1539edbf1a74@c-s.fr> Date: Thu, 17 May 2018 15:27:37 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180517131550.GR17342@gate.crashing.org> 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 17/05/2018 à 15:15, Segher Boessenkool a écrit : > On Thu, May 17, 2018 at 10:10:21PM +1000, Michael Ellerman wrote: >> Christophe Leroy writes: >>> arch/powerpc/Makefile activates -mmultiple on BE PPC32 configs >>> in order to use multiple word instructions in functions entry/exit >> >> True, though that could be a lot simpler because the MULTIPLEWORD value >> is only used for PPC32, which is always big endian. I'll send a patch >> for that. > > Do you mean in the kernel? Many 32-bit processors can do LE, and many > do not implement multiple or string insns in LE mode. > >>> The patch does the same for the asm parts, for consistency >>> >>> On processors like the 8xx on which insn fetching is pretty slow, >>> this speeds up registers save/restore >> >> OK. I've always heard that they should be avoided, but that's coming >> from 64-bit land. >> >> I guess we've been enabling this for all 32-bit targets for ever so it >> must be a reasonable option. > > On 603, load multiple (and string) are one cycle slower than doing all the > loads separately, and store is essentially the same as separate stores. > On 7xx and 7xxx both loads and stores are one cycle slower as multiple > than as separate insns. That's in theory when the instructions are already in the cache. But loading several instructions into the cache takes time. Christophe > > load/store multiple are nice for saving/storing registers. > > > Segher >