[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVBCVWWNqFfziGy5RbDRyudV9wm3m62BA4mvmgtvA4Axw@mail.gmail.com>
Date: Fri, 4 Dec 2020 10:43:17 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: Russell King <linux@...linux.org.uk>,
Nicolas Pitre <nico@...xnic.net>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Dmitry Osipenko <digetx@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Arnd Bergmann <arnd@...db.de>,
Eric Miao <eric.miao@...dia.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Lukasz Stelmach <l.stelmach@...sung.com>,
Stephen Boyd <sboyd@...nel.org>,
Chris Brandt <chris.brandt@...esas.com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v10 1/3] ARM: uncompress: Add be32tocpu macro
Hi Ard,
On Thu, Dec 3, 2020 at 1:50 PM Ard Biesheuvel <ardb@...nel.org> wrote:
> On Thu, 3 Dec 2020 at 13:19, Geert Uytterhoeven <geert+renesas@...der.be> 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 <geert+renesas@...der.be>
> > ---
> > 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 <ardb@...nel.org>
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@...ux-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
Powered by blists - more mailing lists