Message ID | 20231004161038.2818327-2-gregory.clement@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp242731vqb; Wed, 4 Oct 2023 09:11:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEgJW5cnUk/HJYR40RXfFQXGcYCeA5tE/kh4CucFT0UavFy95+9qa0WdIgwPlaNVKI4jTmA X-Received: by 2002:a17:90a:6be6:b0:277:66be:f3ad with SMTP id w93-20020a17090a6be600b0027766bef3admr106157pjj.11.1696435888556; Wed, 04 Oct 2023 09:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696435888; cv=none; d=google.com; s=arc-20160816; b=cE/DoPJ7R+/oRFcFhXnyQMAgKciYQCc5GIAKx5xV1avDMorae2jwix7MXHqmLoZTl8 xy9ODVSFwjje1L6ovEoJzB7lk0i2cee7Qkc4BcsvAu/VSoGj2TEaFQyWcDIWryCnMDhz iMpxbeMLMoFoCUe7+t7aX43fST5+3nWSFwCjtebJPPHCoVteI4JDA+hN+DSyagqbSENL 2DgHQPLSxUJxs3kS3Der5VRjAmvczZ+ayxsTVtL3auiUvgrJTBii57g8NCj0j02xYIxJ ycWCX8OgV84jXKrP+Ykd0+bRQl596U5+7iEuIVkSXwaD9znuC/GW+1jFEqpQmnp6YlnW CGJg== 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=zphNeuBKwavuluA4nnf6uDnS6Nyy4EaH0fzXUOIOYYM=; fh=Se1ENV7S1WlWgaTZX3WsmbP5gu1FYEREoZ/dljQcGVE=; b=XURII0zp7Fi7udgbWrus5t4so4SVKlmsXHCKrSFiy0V7jB1A5BVoaK8KeFx/14d/Oj yilCJX6ILevrwbR3YV4SDGR57kMNAbrgb7xxaJGl4Bus/Aj79IDd/ttgb6IoFnNkPCpE 7++cLbiC+vpH8t1XWG+iX54/xRDBj8RMnBY1IJYgzCdVdrNR36L2fj1q8TujcEtivsEf qzeaO8L1YAG1gBYoXLUNtpCUqnGcIAPaPwJmuOBlRtabtiG9Xiu0ivSkVxDszrpPh6iK dI58BrhfDbKxPcHfHJHajYF4X8O9yqq2X+RYyWCbhvYlfQ5wi+GjF1CAEehCSgPn/Jlf rzVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KjEvbUqb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id pg2-20020a17090b1e0200b0026d4adee541si1734663pjb.150.2023.10.04.09.11.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 09:11:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KjEvbUqb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 7A474801C085; Wed, 4 Oct 2023 09:11:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243260AbjJDQK6 (ORCPT <rfc822;ezelljr.billy@gmail.com> + 19 others); Wed, 4 Oct 2023 12:10:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233853AbjJDQKx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 4 Oct 2023 12:10:53 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A28DA9B; Wed, 4 Oct 2023 09:10:49 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7777260003; Wed, 4 Oct 2023 16:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696435847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zphNeuBKwavuluA4nnf6uDnS6Nyy4EaH0fzXUOIOYYM=; b=KjEvbUqbKE+hHhimKQB2sEaTSSYifdMqsGRX4SqNqrUjX519Vc6KBUKo19UhOljwZBgDb2 WxnVeMUtcmIGODBEKzBQlEsj13mE/0YtMStD1yOnsnNOZxotHBQPcK2HN/4T2F+Mfxg1Qs ZuessHwlQ8gvAPtXqHocasvgOop1Mo5RaJqIEQc+TmWOGfQGbiyHWDD5O/bHbmxlzceM7Q vsrY+aCIh6ITSRUeLsYFy+BnVsLxU3DiFyl+a4T0NJ02aSrz7IvgE6saVuF0R4o0DTY4Lo 0HRtVkGXQ1jMMMyri5AfB3mPBmKS9Eo1TuPhPpVMCZ3womA04etm3tpbrlsMUw== From: Gregory CLEMENT <gregory.clement@bootlin.com> To: Paul Burton <paulburton@kernel.org>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, linux-mips@vger.kernel.org, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vladimir Kondratiev <vladimir.kondratiev@intel.com>, Tawfik Bayouk <tawfik.bayouk@mobileye.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, =?utf-8?q?Th=C3=A9o_Lebr?= =?utf-8?q?un?= <theo.lebrun@bootlin.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Gregory CLEMENT <gregory.clement@bootlin.com> Subject: [PATCH 01/11] MIPS: compressed: Use correct instruction for 64 bit code Date: Wed, 4 Oct 2023 18:10:28 +0200 Message-Id: <20231004161038.2818327-2-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231004161038.2818327-1-gregory.clement@bootlin.com> References: <20231004161038.2818327-1-gregory.clement@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: gregory.clement@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 09:11:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778841958248304754 X-GMAIL-MSGID: 1778841958248304754 |
Series |
Add support for the Mobileye EyeQ5 SoC
|
|
Commit Message
Gregory CLEMENT
Oct. 4, 2023, 4:10 p.m. UTC
The code clearing BSS already use macro or use correct instruction
depending id 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.
Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
---
arch/mips/boot/compressed/head.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On 4/10/23 18:10, Gregory CLEMENT wrote: > The code clearing BSS already use macro or use correct instruction > depending id 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. > > Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> > --- > arch/mips/boot/compressed/head.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
On 10/4/2023 9:10 AM, Gregory CLEMENT wrote: > The code clearing BSS already use macro or use correct instruction > depending id the CPU is 32 bits or 64 bits. s/id/if/ > 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. > > Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> > --- > 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 5795d0af1e1b..d237a834b85e 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 */
diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S index 5795d0af1e1b..d237a834b85e 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 */