Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10243871pxu; Tue, 29 Dec 2020 19:20:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxESDSm+3mp5/esKa56qdd78vKgdZIxPRswHSctJ0q5ucnnhcqZhif9TUFyJYSaw4ERHZpH X-Received: by 2002:aa7:c358:: with SMTP id j24mr49222788edr.265.1609298409820; Tue, 29 Dec 2020 19:20:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609298409; cv=none; d=google.com; s=arc-20160816; b=V3vpMCAzIZ72LbNBK0p94YrnzHG1aK4mrtH97qBe7cxUwF6J7tPefb8eRevRCbXCkc hlnrS7QfKG/30QAraEd9ui2iCGfgTnWOka5QS6LpdFluPDePXQ1x1RKl29mgnGl7L9cc r71JluGfIF2fxrHhE8TXCNIx4nL7ltV28clt+X3GF4K8bgGoLIwTGsVqlt4TckT7s7Nz DB/oIB1Xvf2NRiUoRqelKqpsZG+e9JxkWMnCT0XwJHEofi8MabhYDPuXAfXkOCcrmRH8 DQZEh7qWuCeudryZe1g0HWzUVwRYBdx4qKHfn6hC3Cv0JbUQrwJzdEmSaj49i0XzDck7 1pfA== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=2ZH7aTrO8m5nIG/iSnyvaWGwhfRo13fCpvGhSVuvXkc=; b=otURWNJndhnhpHtuTbVtcUcH603lvsC8UppciIxHTYrvQMBQxF/EedfXgqDLrDVzpG w5tnI30P30+NfJvnn+mS0LhYExHaEfJlQ93bZ+4ofHyIbwvUTsX3znmRYK8MWSh6GH8D qydsuw82VjSxKyIfeQtIgZKLQzh+cw0aU+Kwcsm8PY3Keck7aQT0drCFirBdezFzNue5 Im/q4CuKHRtkrUbP5lstcFWZU0XKlAfZGJ9tnl8YxEVu7rtVPqIRcQ0lfd31QhQJN4XD cKACTv4pGKszNq4hVj/0/S4Pjf6Gb2QI9i5KEtRIVlZgWWABUNtZvwLXzHVUjBgMxLAg oXqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=vf1yEDZi; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=QMEFl8p3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb6si21349461ejb.459.2020.12.29.19.19.47; Tue, 29 Dec 2020 19:20:09 -0800 (PST) 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; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=vf1yEDZi; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=QMEFl8p3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726284AbgL3DRE (ORCPT + 99 others); Tue, 29 Dec 2020 22:17:04 -0500 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:39543 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbgL3DRD (ORCPT ); Tue, 29 Dec 2020 22:17:03 -0500 X-Greylist: delayed 462 seconds by postgrey-1.27 at vger.kernel.org; Tue, 29 Dec 2020 22:17:03 EST Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 98E6721A; Tue, 29 Dec 2020 22:08:35 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 29 Dec 2020 22:08:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=2ZH7aTrO8m5nIG/iSnyvaWGwhf Ro13fCpvGhSVuvXkc=; b=vf1yEDZip6npHzk7vpftCzIxzXmo8zXxkgdu7WhHcb Bty2jmTye2PeakMO4DgWfCrrqBFDG2t/+12ckd4VQ+XJnuXanPa3RBidwnOwiOrN +YIUzpdhLP1Ja0a1Rny/76Nxrm7hSoRpwaQswZ/GVpO/4w7kw+zbi7rDtQZ0GelV QxYk+yIgZRuSN5tEv5tWh7XUi4yx0VV7ehsvMaWSH7lVk9orF3CXmMMWjoDwshyL vpIPpzfGREITi9Qz5dQt5DvLFvzAN7vFJ+8/ej3YBVFem67psWWf4WJ7R91ScwvZ G69YwmBfUqRWbG5zvBHgH27VFkX5YwLOhqlzbBg0h0fA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=2ZH7aTrO8m5nIG/iS nyvaWGwhfRo13fCpvGhSVuvXkc=; b=QMEFl8p3rDihKv5CAOA6WMAc4/eROD4BR +IPUaoirYo89PjEFobInQzlTDW2tKAlODIx30vhlHDPIDG+h1kAUuBpyKGGXIJ1y pzn3T6yaayrVKioGmpepHYly/t+XJ5aYjuGxHel6hqx+18oJxsf0M3QU0w1th97i oBf1Bl0R3IYvvGHwsmqlgbptsXBpaIJMGY0Nz8GkpWIAfgcRNUONB/+tUDN5Znlv os5rwqYj4+ADOIHvlMl6JSqIlgq3C7xFk7KA6RWOd8sLQd95GhJhAVn28awIfE0M 8AQwgDBNFzCk76gDjJHlizbBiwBIdRQWxrOsff5z9LfEStowZm0Rw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihunhcu jggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecuggftrf grthhtvghrnhepkeeutdevieejleeifeeuveelteegudfgjeeufeettdefgefhhffgfeeh teeitdefnecuffhomhgrihhnpehhvggrugdrshgsnecukfhppeeitddrudejjedrudekle drudejudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: from strike.202.net.flygoat.com (unknown [60.177.189.171]) by mail.messagingengine.com (Postfix) with ESMTPA id BE06624005B; Tue, 29 Dec 2020 22:08:31 -0500 (EST) From: Jiaxun Yang To: linux-mips@vger.kernel.org Cc: Jiaxun Yang , Paul Cercueil , Thomas Bogendoerfer , linux-kernel@vger.kernel.org Subject: [PATCH v2] MIPS: zboot: head.S clean up Date: Wed, 30 Dec 2020 11:08:18 +0800 Message-Id: <20201230030819.4510-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org .cprestore is removed as we don't expect Position Independent zboot ELF. .noreorder is also removed and rest instructions are massaged to improve readability. t9 register is used for indirect jump as MIPS ABI requirement. start label is removed as it already defined in LEAF. Reported-by: Paul Cercueil Signed-off-by: Jiaxun Yang -- v2: Remove start label (paul) --- arch/mips/boot/compressed/head.S | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S index 409cb483a9ff..977218c90bc8 100644 --- a/arch/mips/boot/compressed/head.S +++ b/arch/mips/boot/compressed/head.S @@ -15,8 +15,6 @@ #include #include - .set noreorder - .cprestore LEAF(start) start: /* Save boot rom start args */ @@ -35,21 +33,20 @@ start: PTR_LA a0, (.heap) /* heap address */ PTR_LA sp, (.stack + 8192) /* stack address */ - PTR_LA ra, 2f - PTR_LA k0, decompress_kernel - jr k0 - nop + PTR_LA t9, decompress_kernel + jalr t9 + 2: move a0, s0 move a1, s1 move a2, s2 move a3, s3 - PTR_LI k0, KERNEL_ENTRY - jr k0 - nop + PTR_LI t9, KERNEL_ENTRY + jalr t9 + 3: b 3b - nop + END(start) .comm .heap,BOOT_HEAP_SIZE,4 -- 2.30.0