Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10933097pxu; Wed, 30 Dec 2020 16:31:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZZW5Sz1easye7vhzlkLM872iYkGxJXYrzewHkiTh6u/jd80kuwEClzAzk3vVgvDjNVv13 X-Received: by 2002:a50:fc83:: with SMTP id f3mr53441272edq.219.1609374666531; Wed, 30 Dec 2020 16:31:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609374666; cv=none; d=google.com; s=arc-20160816; b=lcK1I/GuWXl1sJRZfqyJllB94soJbNDzXa+IzxlfLkwC0XZpYRA8q/th+Wjf/gM6fB aKQ4isW5RRC4UAuET5b+PavuQJnW7TpZOCiUom+GVajCSMG19GU4fhTeaZfEX6ojKmwN VbOFEY2seNmy5xStb9KtPCxvgY561f2VDNcEOm6PIlnsaCp2zkySKwZ+DUaVN7/McLSn s5Tzd2S45iQ4jSb3MBP/ZklGjgQrSZCXLZfcQ6yVp27+e7RLn5pLR7mXfzBu1uSBATYi t0l+JGD83lVZ0/v4dFQXJ5eQjlQ3gOGcZqzeuBNZXiMAuSo4xnc59mtzgli1XLE6MdA3 xanA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=OLieVbMioM94jycGAOFKiz5tsb2JIaKf6gv4/m11AII=; b=FUr9ooaCUkVkWeSpxco93P7tS4Xg5NTA2C0nY81JFoSLMevx6DVM3Y1QLyeeAG957f jhHInpYbyPsPGEnLceKYk8+y3KIB42X3PnsN37LbPTDmeKg3s/RUfevCeVMNRs+ozyZZ WcNKFVpHgVr6ZE5Uc/ZS7wg4v4NnLifTXS79BZitkb6JxIjzXL2pwVloxb2oLuChxGme JiIFCARhGzDTjfzlQhchC2phI4VjZZ1Me4sg5VRUxqm27TuPyISc3LuQszdWw8JkiFVv rHwYjW26IYFjZjf242fME3wjXh7N2IceiBRrkW4tN+oKP5bC+W2F0CmIweHt/H6mFDsO 6z5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ukGo3Lkx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si11967142edt.50.2020.12.30.16.30.44; Wed, 30 Dec 2020 16:31:06 -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=@kernel.org header.s=k20201202 header.b=ukGo3Lkx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726883AbgLaA3F (ORCPT + 99 others); Wed, 30 Dec 2020 19:29:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:55420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726763AbgLaA3B (ORCPT ); Wed, 30 Dec 2020 19:29:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0110620758; Thu, 31 Dec 2020 00:28:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609374500; bh=sbeAcjuc8bZ/vBOncjm7RqNqCDmIMZWSvdjprPBrXA4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ukGo3LkxxlUZ3c2D9utqPD5txnu7AuzsP406lbkaISC3tO3oZ/h37ubAWaPLR8NJa EyzPHMWY9Z0QDrfbMzLF88az2MDfrOq7KdW9Hq8uGq6uAfiY7Xr3S5hKpIGRe0cpyJ ZG1ivjXZ9spftO+OoORqQV4djYcpQ0vwW2V921tG9LjFoier1/uEcJ/TZrat2SmSPv WXnem5hXvlPLIn75boy73mURqkTzHSwJZ+KzZdaetFgZVeGTcq0uJR4xTHf6RZb/y3 JN4QiYyQGz1QlIazzyzFFgBJRuv8X2PU5fJTqduNHNag9zQGA/d+lHXNnpOsJz7oxi tjcflVopR9wlw== Received: by mail-il1-f173.google.com with SMTP id e7so12490567ile.7; Wed, 30 Dec 2020 16:28:19 -0800 (PST) X-Gm-Message-State: AOAM5328n+zT9CRtBNbPgnqkrFxURcd7GBfZtLB566gl/984vPWkWwga pISMg3jEgx0Z+f0uqo8ZBjgTZAPxvTAiOdow1iQ= X-Received: by 2002:a05:6e02:f88:: with SMTP id v8mr53892631ilo.270.1609374499463; Wed, 30 Dec 2020 16:28:19 -0800 (PST) MIME-Version: 1.0 References: <20201230034723.17266-1-jiaxun.yang@flygoat.com> In-Reply-To: <20201230034723.17266-1-jiaxun.yang@flygoat.com> From: Huacai Chen Date: Thu, 31 Dec 2020 08:28:07 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3] MIPS: zboot: head.S clean up To: Jiaxun Yang Cc: "open list:MIPS" , Paul Cercueil , Thomas Bogendoerfer , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Huacai Chen On Wed, Dec 30, 2020 at 11:49 AM Jiaxun Yang wrote: > > .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 >