Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp233773pxu; Fri, 4 Dec 2020 01:48:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWPNQQ1d+w2AD0dnnDfSabdmb3FFwdbgeUnx1hHL+EZ9kQPoDXZGIaOgHvomBq6pU3BQfU X-Received: by 2002:aa7:db56:: with SMTP id n22mr6916804edt.4.1607075283119; Fri, 04 Dec 2020 01:48:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607075283; cv=none; d=google.com; s=arc-20160816; b=KrqdAhe3hLj0Y5PqCQ/K3p7MnrX4RBap+wBGHlLI70A2ZwIruk5pCzF8Sa87GYSZwv LpKmWyML95O0nCxhakPcXwByykqoRuHL9AX2d4te8WRKPi/AZy8lVrTRzXyjtmrJ3ZTr HC7khoLDx3uVROYxP2s9nOmXc/4AAh5h5Q/p1a686uS3jsryPmB63nflhsGSurdTmscH JeOhXmsYJKdsLWmxdR6DICmVwpc9AYWtF/xPmJkKvmD48Pe3epEcltpM6NWRo5gvQo2Q MpxX2pJDQa8gnoKW6bjMdcvWk4Q5Qnd6lg8qo6yFEUqETHd0N560mekgNTUXsqGr6pXu AuEA== 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; bh=vWnMuYS3DqYvyte2bJR+CQw9EeKiRYtc7g55CoJJvhY=; b=bVgmiooY6y8mCVHG+FOB+Fje9e/hKauHI3vGG0bYxnxGS/mX+jXIG9cGYJobTjW6hK VGfMICZ4Pc5bqj3gFt/OgFxmHge+VFCd4M/efEVKkX2xLhsKrk/nNU6f2LUQOhJu2IDR KOLxe/uuxriFUzXZZtXbPb0IB+Y0l4VCOF6Fw0gXF6TBn8tkpOK50gVLdLkCc6FhVjV4 bzucxE2r3UJk5/gAzs43RrK8MWdheZigoop5y7h3yLyg8n584m1swzTSRHixSXamgr5K vWLDsooMQ+gsHQ0J0EwZeo1BpfCvntKmynUZyHBhnuS2MBLfPimEqsRiiw2Zxoxbbc/d rkcw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si2552447edu.277.2020.12.04.01.47.39; Fri, 04 Dec 2020 01:48:03 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728459AbgLDJoK (ORCPT + 99 others); Fri, 4 Dec 2020 04:44:10 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:35687 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726999AbgLDJoK (ORCPT ); Fri, 4 Dec 2020 04:44:10 -0500 Received: by mail-ot1-f66.google.com with SMTP id t18so4626799otk.2; Fri, 04 Dec 2020 01:43:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vWnMuYS3DqYvyte2bJR+CQw9EeKiRYtc7g55CoJJvhY=; b=l+elcDQ/K9JuTc9SR4JYD4YIcTwxyy92JGGraI8Y6oc/gTNAHrj5tIFmmyFIEBsLk+ l/REVHMXCyIaiMBVMsJPnMMaSDx1rZ1qm/baC1Q7ta1eJhIA8FpuWCAq725S9AXk5YSw Ug1lxFBCVXXmz3CzpuNYpr11O9c4aXkNkA0zpKFLuc5uVDZVEcLaZMZfQanOjACXjR+b mWQLwrypxNAcZKsWJNwTGQDOav41PpTRKJFqbvBCjs7t0rXYzK8xIPW7Pu70ibASPMxK ebCFgRcVkegA2/pX/jMv9GNWNPVFBAdJXdvIrX1l/A+L9nZ+gkDKiH8C3oh33QqdjMXQ E+CA== X-Gm-Message-State: AOAM530Ubm4GNor9mYs5LPSa1YsgSzvcXVTUsrDnBT+CyBsZ/Lghy394 C/iqLYyeAr/w6kf3dBrMjgAfgAFnnJ5LMudZ4EmZSSfZ X-Received: by 2002:a05:6830:1f5a:: with SMTP id u26mr2983512oth.250.1607075009366; Fri, 04 Dec 2020 01:43:29 -0800 (PST) MIME-Version: 1.0 References: <20201203121916.2870975-1-geert+renesas@glider.be> <20201203121916.2870975-2-geert+renesas@glider.be> In-Reply-To: From: Geert Uytterhoeven Date: Fri, 4 Dec 2020 10:43:17 +0100 Message-ID: Subject: Re: [PATCH v10 1/3] ARM: uncompress: Add be32tocpu macro To: Ard Biesheuvel Cc: Russell King , Nicolas Pitre , Marek Szyprowski , Dmitry Osipenko , Linus Walleij , Arnd Bergmann , Eric Miao , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lukasz Stelmach , Stephen Boyd , Chris Brandt , Linux ARM , Linux-Renesas , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ard, On Thu, Dec 3, 2020 at 1:50 PM Ard Biesheuvel wrote: > On Thu, 3 Dec 2020 at 13:19, Geert Uytterhoeven wrote: > > DTB stores all values as 32-bit big-endian integers. > > Add a macro to convert such values to native CPU endianness, to reduce > > duplication. > > > > Signed-off-by: Geert Uytterhoeven > > --- > > v10: > > - New. > > --- > > arch/arm/boot/compressed/head.S | 26 ++++++++++++-------------- > > 1 file changed, 12 insertions(+), 14 deletions(-) > > > > diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S > > index 835ce64f1674c9a2..aabdc544c03aafdc 100644 > > --- a/arch/arm/boot/compressed/head.S > > +++ b/arch/arm/boot/compressed/head.S > > @@ -165,6 +165,16 @@ > > orr \res, \res, \tmp1, lsl #24 > > .endm > > > > + .macro be32tocpu, val, tmp > > +#ifndef __ARMEB__ > > + /* convert to little endian */ > > + eor \tmp, \val, \val, ror #16 > > + bic \tmp, \tmp, #0x00ff0000 > > + mov \val, \val, ror #8 > > + eor \val, \val, \tmp, lsr #8 > > +#endif > > + .endm > > + > > Thanks for cleaning this up. > > This patch is fine as is. > > Reviewed-by: Ard Biesheuvel Thanks, submitted to rmk's patch tracker. > However, I would like to note that, since we are touching this code, > we might do it properly. (Given the v10, feel free to ignore or defer > to a later time) [...] Thanks for the suggestion, adding to my list. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds