Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10254789pxu; Tue, 29 Dec 2020 19:49:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGDEEctWXWZlJiPQMlXpVtzLF63dHrVlBpBETLXIcKUGHW0SlZdLreDYBCLP4xPEjzQIkb X-Received: by 2002:a17:906:d0c1:: with SMTP id bq1mr42133309ejb.202.1609300190104; Tue, 29 Dec 2020 19:49:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609300190; cv=none; d=google.com; s=arc-20160816; b=bB6FswTneeqonAASG0XM0pRRkxtmbg5XFcHn/tclILiEbnewMrfkvlsSajhSNR+FNM t6fXy7FF8IHt3tAHWcJsyQmN6DBAjWwBK5el3Yu13cLwDVnQkZbPyPfRpbyTTCpWr1lt qtIgN8XRpspp8acj40QSmKtS8VoKHk8Uo9zXuzsX0pyzXzKgbeYZesMblDtNedBsQJ5g DroC6tUmLPEPPPqSqUtj6SQNmsZXMcd1aQfaXNnwHe0uHYkfJxGGwC0TGUJplrjw5vF3 wJT0C4vuApZax4LR3V0hK/ig/6uWv92EyCadmAeABwF7nN1NXzHJYFW8mnlhhwl0PdAe bopA== 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=+5TVbFo7PKA8kJgS6b5nECRaImFiu29loKh/etNYJIc=; b=MGXmEg1ioA+s+PZsgNUJoF6PrXrKwlrN2ftgzGx66jsFqNctRT7bI00PZxqkIgtf9W mPhfECwDkpBcFC9w0eUMP9vtXVnPkZR90BcygPOuESswMXQSzlMA3EiD8urRhGJ3J9t+ qS+O1C9v1Wlpbj+puHKQu8tZOVJGztGdhw20vUmwWZydQHyMVJTxolNSa2iub0drruF1 G8sq0BUkxe4umSmTzd0d+dPbr7/E+Qe32YRBqOiojiqumn9g4slb8eC69xsc8bvLnmAr WzCjnTRRr6fYf/q4tsd6zZ6rbhqCPnxVI6/JX/RDsOaLjXqdLRctiP9t+FoI0JsNOvLT LCRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm1 header.b=x2JGoMtu; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=pjBW5Tm6; 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 c5si20972155ejz.259.2020.12.29.19.49.26; Tue, 29 Dec 2020 19:49:50 -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=x2JGoMtu; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=pjBW5Tm6; 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 S1726293AbgL3Dso (ORCPT + 99 others); Tue, 29 Dec 2020 22:48:44 -0500 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:54839 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726221AbgL3Dso (ORCPT ); Tue, 29 Dec 2020 22:48:44 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id 4D3C595B; Tue, 29 Dec 2020 22:47:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 29 Dec 2020 22:47:38 -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=+5TVbFo7PKA8kJgS6b5nECRaIm Fiu29loKh/etNYJIc=; b=x2JGoMtu4i2NuHb7o47Y3egwSxUetCQF5HuqZbm7zN QLvmrzZXeuXmBPCH9aEo+TpEoXuXH3ktUlzK8dSEam0raln8IyF+BPn3rrN7oLWt 5gUYpk2s49McJF8cLOgNUJ732GDeEBNgCvYhHrGArJZs7dfv0Zo3b/1HBA4cFK9w /LMsOhdIYwYUIbGqu9lV5nZFJQOL0BPJphuSK49UnMjUeBYhI1l8ifylmEb/y/kQ Rr59u711HGGZz2Wo6zyukRuhTHnrbrg0yi7F54yUofGeFt7C0tcFa2/1YiwmY5zK 06rjiGjeWguQE87sR2ldlNRb9iyYkXTWZyvvEM/hPPng== 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=+5TVbFo7PKA8kJgS6 b5nECRaImFiu29loKh/etNYJIc=; b=pjBW5Tm6llOPXWYrvKHmf5Ww4uazTO62R 1Xnz2TuwQijT3jijFf42Fu11P94uo2fRXvtLwWNfdfmynLK4lYHQt2JlMDoKi2Bn pKflTarxaz3HVcLN2IIlNzj74z34vRXv+W+QnZMfE7pd4uc07ZQBMOQrrwdZtMp2 eTEkHD3dy92xodiUkk4OM1Qqd2+79x6bHsPZ0YMAQIDktBdSJwlufmQTgEhYjmid JTwQJ5Ca6KnrQ3uWQSRXpCznzU3/6V2q+jcalufyGYvu7MDFq3zrO5krZIS7CgUM tFrhqct94fFaB4FR1AH/uPdBRF8E/58oKGzNxidstk7byI6A5mJaA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgieegucetufdoteggodetrfdotf 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 4873C1080057; Tue, 29 Dec 2020 22:47:34 -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 v3] MIPS: zboot: head.S clean up Date: Wed, 30 Dec 2020 11:47:22 +0800 Message-Id: <20201230034723.17266-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 | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S index 409cb483a9ff..070b2fbabae4 100644 --- a/arch/mips/boot/compressed/head.S +++ b/arch/mips/boot/compressed/head.S @@ -15,10 +15,7 @@ #include #include - .set noreorder - .cprestore LEAF(start) -start: /* Save boot rom start args */ move s0, a0 move s1, a1 @@ -35,21 +32,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