From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA2DDC4361A for ; Thu, 3 Dec 2020 16:28:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A077221ED for ; Thu, 3 Dec 2020 16:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730966AbgLCQ2C (ORCPT ); Thu, 3 Dec 2020 11:28:02 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:53374 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbgLCQ2C (ORCPT ); Thu, 3 Dec 2020 11:28:02 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 8B74210A4DD; Thu, 3 Dec 2020 11:27:18 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=jM4hyLW+TSH6eWSfoM8RCvw63Lg=; b=CHo7hv AikdQ7XbJBXtw/sMbKd77sMQQE+YXkwV9L/kZQ9VHDPqJyCyoa4d/mnNVPGbgSHG 4olx+JIDjDidSxAznBucOGdOln8ouoLxjfL+NmTC7AeowDuB5A1P392pLx6+7hh9 IGOZf10kmoExAqvupniSnNE1OW2Cp6KxSivOQ= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 824F110A4DC; Thu, 3 Dec 2020 11:27:18 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=3PGlveTzkl/T/55mZzO73S7cfYNfZVyY/4IhZFtmgvk=; b=yFQ4F901q8j6hQqmrmc9p8nd+Dw6HIN7NaGkKozfC4cC/rlfBXmEpYDXqWrasaKVA5RZO64PjmTPQheRlcr4SncIoHhjKf2eXlWY/9UJuJE4hnmb0WVN/0BccASPfbD//0ZdhL1gYmbP8FML1nNCIfr+kM6DMcuA62zlgFDJCKo= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id F2B3410A4D6; Thu, 3 Dec 2020 11:27:14 -0500 (EST) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 49F712DA0B35; Thu, 3 Dec 2020 11:27:13 -0500 (EST) Date: Thu, 3 Dec 2020 11:27:13 -0500 (EST) From: Nicolas Pitre To: Geert Uytterhoeven cc: Russell King , Ard Biesheuvel , Marek Szyprowski , Dmitry Osipenko , Linus Walleij , Arnd Bergmann , Eric Miao , =?ISO-8859-15?Q?Uwe_Kleine-K=F6nig?= , Lukasz Stelmach , Stephen Boyd , Chris Brandt , linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v10 2/3] ARM: uncompress: Add OF_DT_MAGIC macro In-Reply-To: <20201203121916.2870975-3-geert+renesas@glider.be> Message-ID: References: <20201203121916.2870975-1-geert+renesas@glider.be> <20201203121916.2870975-3-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Pobox-Relay-ID: 674F0A34-3584-11EB-BA09-D609E328BF65-78420484!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Dec 2020, Geert Uytterhoeven wrote: > The DTB magic marker is stored as a 32-bit big-endian value, and thus > depends on the CPU's endianness. Add a macro to define this value in > native endianness, to reduce #ifdef clutter and (future) duplication. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Nicolas Pitre > --- > v10: > - New. > --- > arch/arm/boot/compressed/head.S | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S > index aabdc544c03aafdc..d9cce7238a365081 100644 > --- a/arch/arm/boot/compressed/head.S > +++ b/arch/arm/boot/compressed/head.S > @@ -11,6 +11,12 @@ > > #include "efi-header.S" > > +#ifdef __ARMEB__ > +#define OF_DT_MAGIC 0xd00dfeed > +#else > +#define OF_DT_MAGIC 0xedfe0dd0 > +#endif > + > AR_CLASS( .arch armv7-a ) > M_CLASS( .arch armv7-m ) > > @@ -335,11 +341,7 @@ restart: adr r0, LC1 > */ > > ldr lr, [r6, #0] > -#ifndef __ARMEB__ > - ldr r1, =0xedfe0dd0 @ sig is 0xd00dfeed big endian > -#else > - ldr r1, =0xd00dfeed > -#endif > + ldr r1, =OF_DT_MAGIC > cmp lr, r1 > bne dtb_check_done @ not found > > -- > 2.25.1 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11CB9C4361A for ; Thu, 3 Dec 2020 16:28:35 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E1B5221ED for ; Thu, 3 Dec 2020 16:28:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E1B5221ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fluxnic.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:In-Reply-To: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=B0Deg/4crnO1i1rKMFMr7V+ae9a66tpSYG9Lbs11Kx8=; b=EQ/jeWHwsI9Ns0SG6aL7VKbDa 7Kit8q71a8VyvQDCiBGVDvzo8/PVZhVAoJB9j7xtATjoIoF2of8HQ4xpboUKl+y31m2QSVCpc+nnJ vvf2S8Ywry1+48sKhU4cR1tOARijcDipBJna38pgTX6zPqL6QhVvAp/XhvhneBRQCGcVqth8dpTGP B3ZBGP4ZHz7iZeQxyQW+ldl3Tgz0nljflvceqA1kuywH66Am8gbZzEbTwfl66bYqbEopOJjrPt4/z mi5yvfrvj6dDUNhq41ULmjCTIPEGiNYBsROJFaRIhSL6KUWER39aOzfTfcrGTuj3c8jKbu6m3yp08 9jPaa91/w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkrRz-0005ii-PY; Thu, 03 Dec 2020 16:27:23 +0000 Received: from pb-smtp21.pobox.com ([173.228.157.53]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkrRx-0005hw-82 for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2020 16:27:22 +0000 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 8B74210A4DD; Thu, 3 Dec 2020 11:27:18 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sasl; bh=jM4hyLW+TSH6eWSfoM8RCvw63Lg=; b=CHo7hv AikdQ7XbJBXtw/sMbKd77sMQQE+YXkwV9L/kZQ9VHDPqJyCyoa4d/mnNVPGbgSHG 4olx+JIDjDidSxAznBucOGdOln8ouoLxjfL+NmTC7AeowDuB5A1P392pLx6+7hh9 IGOZf10kmoExAqvupniSnNE1OW2Cp6KxSivOQ= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 824F110A4DC; Thu, 3 Dec 2020 11:27:18 -0500 (EST) (envelope-from nico@fluxnic.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=fluxnic.net; h=date:from:to:cc:subject:in-reply-to:message-id:references:mime-version:content-type; s=2016-12.pbsmtp; bh=3PGlveTzkl/T/55mZzO73S7cfYNfZVyY/4IhZFtmgvk=; b=yFQ4F901q8j6hQqmrmc9p8nd+Dw6HIN7NaGkKozfC4cC/rlfBXmEpYDXqWrasaKVA5RZO64PjmTPQheRlcr4SncIoHhjKf2eXlWY/9UJuJE4hnmb0WVN/0BccASPfbD//0ZdhL1gYmbP8FML1nNCIfr+kM6DMcuA62zlgFDJCKo= Received: from yoda.home (unknown [24.203.50.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id F2B3410A4D6; Thu, 3 Dec 2020 11:27:14 -0500 (EST) (envelope-from nico@fluxnic.net) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTPSA id 49F712DA0B35; Thu, 3 Dec 2020 11:27:13 -0500 (EST) Date: Thu, 3 Dec 2020 11:27:13 -0500 (EST) From: Nicolas Pitre To: Geert Uytterhoeven Subject: Re: [PATCH v10 2/3] ARM: uncompress: Add OF_DT_MAGIC macro In-Reply-To: <20201203121916.2870975-3-geert+renesas@glider.be> Message-ID: References: <20201203121916.2870975-1-geert+renesas@glider.be> <20201203121916.2870975-3-geert+renesas@glider.be> MIME-Version: 1.0 X-Pobox-Relay-ID: 674F0A34-3584-11EB-BA09-D609E328BF65-78420484!pb-smtp21.pobox.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201203_112721_414243_D7D58B33 X-CRM114-Status: GOOD ( 18.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Stephen Boyd , Linus Walleij , Lukasz Stelmach , Russell King , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Chris Brandt , =?ISO-8859-15?Q?Uwe_Kleine-K=F6nig?= , Eric Miao , Dmitry Osipenko , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, Marek Szyprowski Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 3 Dec 2020, Geert Uytterhoeven wrote: > The DTB magic marker is stored as a 32-bit big-endian value, and thus > depends on the CPU's endianness. Add a macro to define this value in > native endianness, to reduce #ifdef clutter and (future) duplication. > > Signed-off-by: Geert Uytterhoeven Reviewed-by: Nicolas Pitre > --- > v10: > - New. > --- > arch/arm/boot/compressed/head.S | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S > index aabdc544c03aafdc..d9cce7238a365081 100644 > --- a/arch/arm/boot/compressed/head.S > +++ b/arch/arm/boot/compressed/head.S > @@ -11,6 +11,12 @@ > > #include "efi-header.S" > > +#ifdef __ARMEB__ > +#define OF_DT_MAGIC 0xd00dfeed > +#else > +#define OF_DT_MAGIC 0xedfe0dd0 > +#endif > + > AR_CLASS( .arch armv7-a ) > M_CLASS( .arch armv7-m ) > > @@ -335,11 +341,7 @@ restart: adr r0, LC1 > */ > > ldr lr, [r6, #0] > -#ifndef __ARMEB__ > - ldr r1, =0xedfe0dd0 @ sig is 0xd00dfeed big endian > -#else > - ldr r1, =0xd00dfeed > -#endif > + ldr r1, =OF_DT_MAGIC > cmp lr, r1 > bne dtb_check_done @ not found > > -- > 2.25.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel