Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2442107rdb; Fri, 8 Dec 2023 08:13:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFN6ZOTLzUmAot5sLqxJfw/9R8O9vdim3buRmWEhmZxyBgu8Qo6a4QcWxdFM7l3xKM+pBOp X-Received: by 2002:a17:902:be17:b0:1d0:9a64:e511 with SMTP id r23-20020a170902be1700b001d09a64e511mr214859pls.73.1702052006496; Fri, 08 Dec 2023 08:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702052006; cv=none; d=google.com; s=arc-20160816; b=TNCdJQ9w2OJ3qxQeMBO6ci+dAAwuazz90WS1bomq8+dDX8O8Qltp5fQt8PDTIUsme6 yf9ZxGUln2WFSlAFzrUV9yu/8PYCW/vTxY+4R9XdoIWlqCVuW2NCMEe1MkQhdXQjHeDa iIY46d1CV86AKH0AtMcooJx7uqOnxE/h36EKBSpneZ+RALbgFAoPBz/bCxnqvqDHrpov f9Hu3SBEWQ/ISZwo6gp5056gqvKIYdPkv/1ZoJRwHbtTa1TAG3jAbzR/85Qzxd+KrUK6 nMTd/QhYgvZff3YaQtNGH+u6Ug1ayWmax+cqi5wQ0IPiKd5UksHId8zursMaxz6C8rwR PpZg== 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=kNyOO2JYEBCACy/ou6JJVpj+itRAbdz025mZlrfQ0SImmFaOqP/7SCkzvHrciRDN/9 YM+y3c4YaKZr1gChp0JsBFGHd5OoDLgDGm6tbSbdM1ndMG8tRyNU573GWIjDzX23NWBo tzvEBgaIy+q4fNPEHWLhH1C3mzDmrnrgCNUwU7Vo/OVoZLGpkh1csby6dPVatD1wfeVu nUQ4jkdJgLa1jZgwNB1E4wdolIaORrjYGM2Q/juYgrXHZm5MxaOCvhcjsTDHzu5W+7jd ZkSd1jP9eKGLUH+Fdz3PhfLL6/nxjFyH4GgoVYvLMnRmMIjip/dQos2+ya8q+YUT8px2 KLVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lHcuhmuK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id z13-20020a170902ee0d00b001d2e35e7485si1730414plb.167.2023.12.08.08.13.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 08:13:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=lHcuhmuK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id B598681BE82E; Fri, 8 Dec 2023 08:13:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233657AbjLHQMx (ORCPT + 99 others); Fri, 8 Dec 2023 11:12:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233643AbjLHQMu (ORCPT ); Fri, 8 Dec 2023 11:12:50 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::225]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C2A01989; Fri, 8 Dec 2023 08:12:55 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id B2FBF1C0002; Fri, 8 Dec 2023 16:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702051974; 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=lHcuhmuKBGK5IAcxAaYiljE7+sInWwTIAtnUhrJfS30lsaqypgvAJalyTooge5norCGBdr xKi1+c60B3ZfSG9pHNSvQDWTSDMyik3eim3oCfSLxazg/n37CIQUWlLPIL3PHsw4fgfhRp Z3MIkKKsCPKMwaZ4qQqIOm1BC91xjcPOXCu/mP6FoV0MOgVU5PZ3POGfyk41fN1p8Q8sro w51pPQ6LWOqDNCT3L8/Br8IOyxrfWJpdnfKhaaEobxnZZU+RQ1iEAPnAcn+Aef7VIAszrg BXcL272vbScLfxSiZb++7yvIQLE+gCsbmCXyIGfsA9Ty8NykKsTa7R4nKPrVHw== 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 v4 01/22] MIPS: compressed: Use correct instruction for 64 bit code Date: Fri, 8 Dec 2023 17:12:17 +0100 Message-ID: <20231208161249.1827174-2-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231208161249.1827174-1-gregory.clement@bootlin.com> References: <20231208161249.1827174-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 fry.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 (fry.vger.email [0.0.0.0]); Fri, 08 Dec 2023 08:13:22 -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