Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp419151rdh; Thu, 23 Nov 2023 07:27:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8+pxc4VFXkykEJ5HpLOGQkWmDZrsvbPyMMQ4cY1qSy6wmIx9K8jawUsK733c4BmVgbdNV X-Received: by 2002:a05:6a20:4418:b0:18b:d09d:5d47 with SMTP id ce24-20020a056a20441800b0018bd09d5d47mr223781pzb.1.1700753251710; Thu, 23 Nov 2023 07:27:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700753251; cv=none; d=google.com; s=arc-20160816; b=hqv4/rXLVhHhBjzgWTV8bZCU4xGa51KnRW3jK+YHKg/BuRaN9egn1vIPsP4gMxxJIS 87EsqI09GkhVdsUM8hjlKc6ZEnhQfinx63q98AbdZB5+L611n4qt76bIpJl9HHkFi7li HcGZhrURD2tYLqq2FG1RicYpDvT5ivxMmOB6XMNVC4xEQyhPsrF0rzdTqI64h90ygkUW nQrxrAiFs1sZsKBr9/kk8Au3dFNFcuPsXNIyDYwBv+jkx12UTN+y8W6mDqy0a4qSQj4g ww4D5Nxl1PfK8uuSd4iG/ApkAu8oQvxbl+CoUw4B8HY1UTcJNxnqhqrScTfl6+rDa4pr gTbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=F1EYqlVYF1fJ33cC2a0Mertg3uhTJJ/NIkImZDHepJg=; fh=RBP3N/z2dRF20CQ37qwMigTrhQ/jDE9ZZ/B9XmmkgnU=; b=NBop9vvCRT6S9/BzV31xKy1vpRE+tfE13Qiz4kAwatTFe2ERNUwrnRNYN1FzwDQM4Z ypGVu2zpCkbnMisPug97q+EFhGC2rxpatBRHBb/1OJqz/A4vqy9t3lEXSP00sfUCX3d/ Hn9Q3N9/CVidVenKU0+NyGnD/De7CuhtPODrFCPXuTcOuKE4uLdefmCnqyvbMuELm3Te ibB8Ugc04OxLjT7/GmT8DHtcD1yb64D/RDFP8rQa6lzLiRTT7RQMg1wMFV2eiwFRYBto Xs1BwYoaTfMaYzvw5dYuTitLsw8olquG1hlrpye2tg9wKCWFK9ja1n8g36fRCknykoCm bGDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Qa0TaAX3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id x14-20020a63fe4e000000b005775e2a7951si1454624pgj.345.2023.11.23.07.27.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 07:27:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Qa0TaAX3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 04D26806D812; Thu, 23 Nov 2023 07:27:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346074AbjKWP0t (ORCPT + 99 others); Thu, 23 Nov 2023 10:26:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346059AbjKWP0r (ORCPT ); Thu, 23 Nov 2023 10:26:47 -0500 Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A2C3D5A; Thu, 23 Nov 2023 07:26:52 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B949424000C; Thu, 23 Nov 2023 15:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700753211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F1EYqlVYF1fJ33cC2a0Mertg3uhTJJ/NIkImZDHepJg=; b=Qa0TaAX35przqfse0Y7pj19YS8keDDV1tZXDJA74SmXNXAAw+P/mEhobnbrAHkicEhQX7P IylTzzUBtrXI3qMH6FqGegR7P9u8iB3YhnGTyAc2wFcm4yeLqw9a8oPJsTm5D0k6PF7m7N m9WgwgEDDPnPNVkMAqZjnVagYxNfKsqjTrNNZ2e71Nf0hWcGA7ZfX/vd+THXdVEPovQFnq f8WyYJKBKThZBAic8j3xqrrbKtNaOQ1qtSVQ1RNJryMKGvdYOOoluMOa6Vts7VRgH7mPiQ mpJkztcNxwRKn7NnWd+p+2035Q0Xw8Im/92jbjxFVg95QZI8hJDCFac6SKHh3Q== From: Gregory CLEMENT To: Paul Burton , Thomas Bogendoerfer , linux-mips@vger.kernel.org, Jiaxun Yang , Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vladimir Kondratiev , Tawfik Bayouk , Alexandre Belloni , =?UTF-8?q?Th=C3=A9o=20Lebrun?= , Thomas Petazzoni , Gregory CLEMENT , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Florian Fainelli Subject: [PATCH v2 01/21] MIPS: compressed: Use correct instruction for 64 bit code Date: Thu, 23 Nov 2023 16:26:18 +0100 Message-ID: <20231123152639.561231-2-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231123152639.561231-1-gregory.clement@bootlin.com> References: <20231123152639.561231-1-gregory.clement@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Sasl: gregory.clement@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 07:27:23 -0800 (PST) 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