All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "Russell King" <linux@armlinux.org.uk>,
	"Nicolas Pitre" <nico@fluxnic.net>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Eric Miao" <eric.miao@nvidia.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lukasz Stelmach" <l.stelmach@samsung.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Chris Brandt" <chris.brandt@renesas.com>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v10 1/3] ARM: uncompress: Add be32tocpu macro
Date: Fri, 4 Dec 2020 10:43:17 +0100	[thread overview]
Message-ID: <CAMuHMdVBCVWWNqFfziGy5RbDRyudV9wm3m62BA4mvmgtvA4Axw@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXEKdRGQXFh9qMgrWcZnoW5s8Bj5TaKqStU=w1qJ-Nu9zA@mail.gmail.com>

Hi Ard,

On Thu, Dec 3, 2020 at 1:50 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> On Thu, 3 Dec 2020 at 13:19, Geert Uytterhoeven <geert+renesas@glider.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@glider.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@kernel.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@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

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Ard Biesheuvel <ardb@kernel.org>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Nicolas Pitre" <nico@fluxnic.net>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Lukasz Stelmach" <l.stelmach@samsung.com>,
	"Russell King" <linux@armlinux.org.uk>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"Chris Brandt" <chris.brandt@renesas.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Eric Miao" <eric.miao@nvidia.com>,
	"Dmitry Osipenko" <digetx@gmail.com>,
	"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
	"Marek Szyprowski" <m.szyprowski@samsung.com>
Subject: Re: [PATCH v10 1/3] ARM: uncompress: Add be32tocpu macro
Date: Fri, 4 Dec 2020 10:43:17 +0100	[thread overview]
Message-ID: <CAMuHMdVBCVWWNqFfziGy5RbDRyudV9wm3m62BA4mvmgtvA4Axw@mail.gmail.com> (raw)
In-Reply-To: <CAMj1kXEKdRGQXFh9qMgrWcZnoW5s8Bj5TaKqStU=w1qJ-Nu9zA@mail.gmail.com>

Hi Ard,

On Thu, Dec 3, 2020 at 1:50 PM Ard Biesheuvel <ardb@kernel.org> wrote:
> On Thu, 3 Dec 2020 at 13:19, Geert Uytterhoeven <geert+renesas@glider.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@glider.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@kernel.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@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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-12-04  9:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 12:19 [PATCH v10 0/3] ARM: uncompress: Validate start of physical memory against passed DTB Geert Uytterhoeven
2020-12-03 12:19 ` Geert Uytterhoeven
2020-12-03 12:19 ` [PATCH v10 1/3] ARM: uncompress: Add be32tocpu macro Geert Uytterhoeven
2020-12-03 12:19   ` Geert Uytterhoeven
2020-12-03 12:49   ` Ard Biesheuvel
2020-12-03 12:49     ` Ard Biesheuvel
2020-12-04  9:43     ` Geert Uytterhoeven [this message]
2020-12-04  9:43       ` Geert Uytterhoeven
2020-12-03 16:26   ` Nicolas Pitre
2020-12-03 16:26     ` Nicolas Pitre
2020-12-03 12:19 ` [PATCH v10 2/3] ARM: uncompress: Add OF_DT_MAGIC macro Geert Uytterhoeven
2020-12-03 12:19   ` Geert Uytterhoeven
2020-12-03 12:50   ` Ard Biesheuvel
2020-12-03 12:50     ` Ard Biesheuvel
2020-12-03 16:27   ` Nicolas Pitre
2020-12-03 16:27     ` Nicolas Pitre
2020-12-04  9:43     ` Geert Uytterhoeven
2020-12-04  9:43       ` Geert Uytterhoeven
2020-12-03 12:19 ` [PATCH v10 3/3] ARM: uncompress: Validate start of physical memory against passed DTB Geert Uytterhoeven
2020-12-03 12:19   ` Geert Uytterhoeven
2020-12-03 13:14   ` Ard Biesheuvel
2020-12-03 13:14     ` Ard Biesheuvel
2020-12-03 14:04   ` Russell King - ARM Linux admin
2020-12-03 14:04     ` Russell King - ARM Linux admin
2020-12-03 14:29     ` Geert Uytterhoeven
2020-12-03 14:29       ` Geert Uytterhoeven
2020-12-03 16:34   ` Nicolas Pitre
2020-12-03 16:34     ` Nicolas Pitre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdVBCVWWNqFfziGy5RbDRyudV9wm3m62BA4mvmgtvA4Axw@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=chris.brandt@renesas.com \
    --cc=digetx@gmail.com \
    --cc=eric.miao@nvidia.com \
    --cc=l.stelmach@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=nico@fluxnic.net \
    --cc=sboyd@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.