Re: [PATCH] sh: boot: Remove sh5 cache handling

Geert Uytterhoeven <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <CAMuHMdW5jMg4K454S=jQkU7EZUXyKYetqFVejL0ft1uxAJQpGQ@mail.gmail.com>
Hi Adrian,

On Mon, Apr 29, 2024 at 9:46 AM John Paul Adrian Glaubitz
<[email protected]> wrote:
> On Wed, 2024-04-24 at 13:54 +0200, Geert Uytterhoeven wrote:
> > Commit 37744feebc086908 ("sh: remove sh5 support") in v5.8 forgot to
> > remove the sh5 cache handling.
> >
> > Suggested-by: Yoshinori Sato <[email protected]>
> > Signed-off-by: Geert Uytterhoeven <[email protected]>

> > --- a/arch/sh/boot/compressed/cache.c
> > +++ /dev/null
> > @@ -1,13 +0,0 @@
> > -// SPDX-License-Identifier: GPL-2.0
> > -int cache_control(unsigned int command)
> > -{
> > -     volatile unsigned int *p = (volatile unsigned int *) 0x80000000;
> > -     int i;
> > -
> > -     for (i = 0; i < (32 * 1024); i += 32) {
> > -             (void)*p;
> > -             p += (32 / sizeof(int));
> > -     }
> > -
> > -     return 0;
> > -}

> Interesting, looking at boot/compressed/cache.c, it seems that the whole code
> is actually a no-op and does nothing but increasing a pointer. So I agree we
> should just delete it.

It is not a no-op: it also reads from memory, to load new data in
the cache, and evicting the old data.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.