Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4179085pxu; Mon, 21 Dec 2020 06:11:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPvHX9O/t7azV8LHdPaNrEwTo+ASxbooirtJe2wGCY8Suo3uVEXzVTdmZc/eE9UAENDXqq X-Received: by 2002:a05:6402:3186:: with SMTP id di6mr15599919edb.16.1608559915821; Mon, 21 Dec 2020 06:11:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608559915; cv=none; d=google.com; s=arc-20160816; b=CBSQTmhMcTf7DgCx4m4LiTvmnutjQ/oGQZu/+Ha7vYgZ/fGWjZtH8x1NFt+fZ9kuX1 t7xYZzD5lmFKlYLjS9zIU8yYayz/i/cdeqDV9GlGkzFJ5aWbKabKIvN+tvwC+6014PdR ay217Qk2AC+5kF2BaVH49j51LqduPO2Is5GbPSpXASKK59SS6qSMopNiEDdvfd7nEx+L kFkHdgxZPa2m7KKRmUOvKGfAfTXjGfI5rZrXfvYCAarmwo3eJOLk96L5vLXJDf8M3Ygq nGJm+0wsfO8Xu2+MgHWMugSfeQXFk5DoYmiTxItvkg4ViowTLOvAzi8P5H3hkpmjw2q/ mPgw== 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:cc:to:subject:from:date; bh=iJpEwBTyFDfPYgNknge0+uTKOetqXsOVpyl6SJpFI4A=; b=ER4gqfsKee2fPrx+9Vxdj6H7PAEMWS7I41M3eJlJcqc85C3ivcsy9WTWhaCc9Teh3y LNw7XNziooIy/EM5IkKfdZDMuxrWd21VmL+w48vU/440G4WUPa4qomb40Tfw71KSSDo2 zCHNUifsIJ2D9bZezBnr7MB0ah0ifXua7UoYuVYFNj+gYlStcXUiXF40iIyGU0oifDB1 ttGBhjqiYhEAMicj2jbmbp0OoCcuFNA8rqDoh1NnhGHWayjvEYlU7Z6UsQgWeOi0bIwQ 2WA5eUTsslng70SwLYmeqgtvSudpkFbHB4VhUN6msakOwyv9AeXeaEHtfuIbqPo8ZL9i 9GYg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m6si10134786edr.532.2020.12.21.06.11.33; Mon, 21 Dec 2020 06:11:55 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726614AbgLUOKq convert rfc822-to-8bit (ORCPT + 99 others); Mon, 21 Dec 2020 09:10:46 -0500 Received: from aposti.net ([89.234.176.197]:59550 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbgLUOKp (ORCPT ); Mon, 21 Dec 2020 09:10:45 -0500 Date: Mon, 21 Dec 2020 14:09:53 +0000 From: Paul Cercueil Subject: Re: [PATCH] MIPS: zboot: head.S clean up To: Jiaxun Yang Cc: linux-mips@vger.kernel.org, Thomas Bogendoerfer , linux-kernel@vger.kernel.org Message-Id: In-Reply-To: <20201221130048.7753-1-jiaxun.yang@flygoat.com> References: <20201221130048.7753-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiaxun, Le lun. 21 d?c. 2020 ? 21:00, Jiaxun Yang a ?crit : > .cprestore is removed as we don't except Position Independent > zboot ELF. > > .noreorder is also removed and rest instructions is massaged > to improve readability. > > t9 register is used to indirect jump as MIPS ABI requirement. > > Reported-by: Paul Cercueil > Signed-off-by: Jiaxun Yang > --- > 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: You can also remove the 'start' label, since it's declared inside the LEAF() macro as well. GNU's assembler won't mind, but LLVM will choke on that. Cheers, -Paul > /* 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.29.2 >