Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp199563rdb; Thu, 21 Dec 2023 06:57:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmRZCsanXIsEZCQKt9SUc5ZorspFrWdwiR6WBnVQGFJoRhQMkXafJhkL4oSlJJuXuD3Hul X-Received: by 2002:a05:6a20:1e62:b0:18f:e0f1:5546 with SMTP id cy34-20020a056a201e6200b0018fe0f15546mr843698pzb.47.1703170666171; Thu, 21 Dec 2023 06:57:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703170666; cv=none; d=google.com; s=arc-20160816; b=G5vNrrxripJrjcJXGB9eN+GkDtZnk2aD15SBtqAlZvjSrjrYpIR4XlTB5d+Iu5bZ/I jfgpceKfnOg/taJ2ng2qdp3I39Mq1fNS+y9FqbjMDUDVW8+6VS9cQZwfhfWEyoxS+LMJ 4g8AAz0/FMvMZLNJHNPRK68rqbp2xFIfttpjqeiRyi4QRuqhLeQWoBXHmYPO4xpxrE1I Ee54P00M/1HL6rDH039w0s0IbnwulLacswJyjFx/7KrOzWfBRMVjzoLz29XGYGEr7kCr 9ntKjZEw4pNlI9OLR+ulfXQD6q4Vy7new+rON8fLZdJwRDOYDczf1Hs+v/bfbBMN263j jkLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=bxoJ3Hp/kzY/LO9oD1i3iuXFYMUjm5BtZ1C+fcH74KY=; fh=0ncoXqG9TOfqOIxWxoQeimXoMVduTqA5h/FQldLvJ4U=; b=W3PCSl1lTLlvqQfLh1djMBxEmyHmXQrOolSuyE76uKJom00FZQx5PHuHtgEBm4IUbp sysb6oSTjcmufP0YjynpBcC8lEJPRQZ5xNMYI40Lw7pCITVLaJnTlXLnQDRujdvhU+2h rz6B1CesYLJQejwnbA6kVA4E8Op+Em9uBkC3EmJkuWBHajJXpF8jnZpozvx3jGDRF8b9 G/ZglBhj9TdC+rXkvIoNppCumwRXyqbvW6nCCHcMLPVI+89oDjEexyNSi4DsSUpk6InM TIRyzj3N7wXkU1nYYF3xQPt07ae7+C6w2prG2MR2NuqSWpuujEdHVvGkUpErJPSgYuZk U+Cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8596-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ch4-20020a056a0208c400b005bdc949fee3si1688763pgb.880.2023.12.21.06.57.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 06:57:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8596-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8596-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 54380B24C67 for ; Thu, 21 Dec 2023 14:56:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8039539E5; Thu, 21 Dec 2023 14:56:02 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EFD17360B4; Thu, 21 Dec 2023 14:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 1rGKSr-0002PV-00; Thu, 21 Dec 2023 15:55:57 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id AD3D4C0A2B; Thu, 21 Dec 2023 15:38:20 +0100 (CET) Date: Thu, 21 Dec 2023 15:38:20 +0100 From: Thomas Bogendoerfer To: Gregory CLEMENT Cc: Paul Burton , linux-mips@vger.kernel.org, Jiaxun Yang , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?iso-8859-1?Q?Th=E9o?= Lebrun , Thomas Petazzoni , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= , Florian Fainelli Subject: Re: [PATCH v5 01/22] MIPS: compressed: Use correct instruction for 64 bit code Message-ID: References: <20231212163459.1923041-1-gregory.clement@bootlin.com> <20231212163459.1923041-2-gregory.clement@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231212163459.1923041-2-gregory.clement@bootlin.com> On Tue, Dec 12, 2023 at 05:34:33PM +0100, Gregory CLEMENT wrote: > The code clearing BSS already use macro or use correct instruction > depending if the CPU is 32 bits or 64 bits. However, a few > instructions remained 32 bits only. > > By using the accurate MACRO, it is now possible to deal with memory > address beyond 32 bits. As a side effect, when using 64bits processor, > it also divides the loop number needed to clear the BSS by 2. > > Reviewed-by: Philippe Mathieu-Daud? > Reviewed-by: Florian Fainelli > Signed-off-by: Gregory CLEMENT > --- > arch/mips/boot/compressed/head.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S > index 5795d0af1e1b2..d237a834b85ee 100644 > --- a/arch/mips/boot/compressed/head.S > +++ b/arch/mips/boot/compressed/head.S > @@ -25,8 +25,8 @@ > /* Clear BSS */ > PTR_LA a0, _edata > PTR_LA a2, _end > -1: sw zero, 0(a0) > - addiu a0, a0, 4 > +1: PTR_S zero, 0(a0) > + PTR_ADDIU a0, a0, PTRSIZE > bne a2, a0, 1b > > PTR_LA a0, (.heap) /* heap address */ > -- > 2.42.0 applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]