Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp232026pxb; Wed, 25 Aug 2021 01:44:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBkV4vR1qstgBAer9C/ugdSGqjxftzV6188yJMJUFkmbv81OzbZinf8LulER2vmtB245e8 X-Received: by 2002:a17:907:3f14:: with SMTP id hq20mr44658710ejc.370.1629881087756; Wed, 25 Aug 2021 01:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629881087; cv=none; d=google.com; s=arc-20160816; b=T5mVv9uEYPccsCE+mIg3hMBKPNSSLrEb4WDnyszaAO32OTNIGNKzWek+t1bS698wYx Cu3mEHIflaFgy7EZUamyIU7imnQl1zGDJYUUlEL1uHJ6AW+VtsItb0yq203Yx5x0bayR 4ypaiHim1xp+6FpakvJPrWgSA6guQK0pQNlfs+/0A8AIHQoGP56T1ieHVZiB5GmFiyWT YqPN1kWrGV8qawSIA10Hc3AA/koyUqy5JPmBZJTt8Da9qqs91NWc1rV5N4CDp+TR2o2S 9EdbSUXC1Z1hiDuhmvABX4jfF1bVrrsfdfykhVqkOKCo3mpJ+TSDR57dNoxTp0pjuA6T aAYQ== 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 :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=IeDzfSUZnqDxS4fc/uM+pZb4q6z5C+kPh3eiO3TXJ+I=; b=IyXJ3MN/kOlJcrs4WmuZAemv2ypPLCr4A7wwLgpQPL3jkmaTh9yph62J/DlsRp3xeh h7zeJazCZX6XNLhDm1PFpqSvp8C4+nfF0gratHips9RFTFZ0HMa1EeA+yEGd4SNwLMeM 34grrnAZ6dG/f7Vl3jTg9xS/Ymlu5aYuTfO3eakkPry+K9ycs9Z8xN/1QeOQ+ci3dGaE UCdyk7y3DEv9Bnd1b5T6IQmbsMopoXmqWUvI8lb1bDMKZ84eij61XFMPROhb4JGhGRIi Q0r74QkD6ccheetry+AhOq2ZbXcO9qs3UeEvx3DwF0jk62ki96tlt6x+Gy2/voRqFc1r OMdA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si3179776edq.197.2021.08.25.01.44.24; Wed, 25 Aug 2021 01:44:47 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237110AbhHYIn0 convert rfc822-to-8bit (ORCPT + 99 others); Wed, 25 Aug 2021 04:43:26 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:25166 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbhHYIn0 (ORCPT ); Wed, 25 Aug 2021 04:43:26 -0400 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-211-acg3lIP0NjC_OiehBTtT1g-1; Wed, 25 Aug 2021 09:42:37 +0100 X-MC-Unique: acg3lIP0NjC_OiehBTtT1g-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 25 Aug 2021 09:42:35 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.023; Wed, 25 Aug 2021 09:42:35 +0100 From: David Laight To: 'Segher Boessenkool' , Christophe Leroy CC: "linuxppc-dev@lists.ozlabs.org" , "Paul Mackerras" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] powerpc/32: Don't use lmw/stmw for saving/restoring non volatile regs Thread-Topic: [PATCH] powerpc/32: Don't use lmw/stmw for saving/restoring non volatile regs Thread-Index: AQHXmPzihkMZIJQywUykgaGdDaInuauD5vuA Date: Wed, 25 Aug 2021 08:42:35 +0000 Message-ID: <7afe86ab2d934aa694a0461b1abbd2ce@AcuMS.aculab.com> References: <316c543b8906712c108985c8463eec09c8db577b.1629732542.git.christophe.leroy@csgroup.eu> <20210823184648.GY1583@gate.crashing.org> <9bbc9797-cfc7-1484-90ad-2146ff1a5e18@csgroup.eu> <20210824131600.GF1583@gate.crashing.org> <20210824152813.GG1583@gate.crashing.org> In-Reply-To: <20210824152813.GG1583@gate.crashing.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Segher Boessenkool > Sent: 24 August 2021 16:28 > > On Tue, Aug 24, 2021 at 08:16:00AM -0500, Segher Boessenkool wrote: > > On Tue, Aug 24, 2021 at 07:54:22AM +0200, Christophe Leroy wrote: > > > >On mpccore both lmw and stmw are only N+1 btw. But the serialization > > > >might cost another cycle here? > > > > > > That coherent on MPC8xx, that's only 2 cycles. > > > But on the mpc832x which has a e300c2 core, it looks like I have 10 cycles > > > difference. Is anything wrong ? > > > > I don't know that core very well, I'll have a look. > > So, I don't see any difference between e300c2 and e300c1 (which is 603 > basically, for this) that is significant here. The e300c2 has two > integer units instead of just one, but it still has only one load/store > unit, and I don't see anything else that could matter either. Huh. Is the cpu as brain-damaged as the (old) strongarm (SA1100 etc) where ldm/stm always took 1 clock to check each register bit regardless of the number of registers to copy? (IIRC it also took the same length of time when conditionally not executed.) If x86 had ever had ldm/stm then it would end up being a microcoded instruction and take forever to decode. Intel never managed to optimise 'loop' (dec %cx and jump nz). David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)