From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Geert Uytterhoeven <geert+renesas@glider.be>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>, Arnd Bergmann <arnd@arndb.de>
Cc: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: boot: Remove sh5 cache handling
Date: Mon, 29 Apr 2024 09:46:40 +0200 [thread overview]
Message-ID: <d5f53c4c490d0058956f6a501191107c4b148720.camel@physik.fu-berlin.de> (raw)
In-Reply-To: <23e9b3fd0d78e46c9fc1835852ba226aba92c3ca.1713959531.git.geert+renesas@glider.be>
Hi Geert,
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 <ysato@users.sourceforge.jp>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> arch/sh/boot/compressed/Makefile | 2 +-
> arch/sh/boot/compressed/cache.c | 13 -------------
> arch/sh/boot/compressed/misc.c | 7 -------
> 3 files changed, 1 insertion(+), 21 deletions(-)
> delete mode 100644 arch/sh/boot/compressed/cache.c
>
> diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
> index 6c6c791a1d0630e2..54efed53c8918eef 100644
> --- a/arch/sh/boot/compressed/Makefile
> +++ b/arch/sh/boot/compressed/Makefile
> @@ -5,7 +5,7 @@
> # create a compressed vmlinux image from the original vmlinux
> #
>
> -OBJECTS := head_32.o misc.o cache.o piggy.o \
> +OBJECTS := head_32.o misc.o piggy.o \
> ashiftrt.o ashldi3.o ashrsi3.o ashlsi3.o lshrsi3.o
>
> targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
> diff --git a/arch/sh/boot/compressed/cache.c b/arch/sh/boot/compressed/cache.c
> deleted file mode 100644
> index 31e04ff4841ed084..0000000000000000
> --- 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;
> -}
> diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
> index ca05c99a3d5b488d..195367d40031f9e9 100644
> --- a/arch/sh/boot/compressed/misc.c
> +++ b/arch/sh/boot/compressed/misc.c
> @@ -26,11 +26,6 @@
> #undef memcpy
> #define memzero(s, n) memset ((s), 0, (n))
>
> -/* cache.c */
> -#define CACHE_ENABLE 0
> -#define CACHE_DISABLE 1
> -int cache_control(unsigned int command);
> -
> extern char input_data[];
> extern int input_len;
> static unsigned char *output;
> @@ -139,8 +134,6 @@ void decompress_kernel(void)
> free_mem_end_ptr = free_mem_ptr + HEAP_SIZE;
>
> puts("Uncompressing Linux... ");
> - cache_control(CACHE_ENABLE);
> __decompress(input_data, input_len, NULL, NULL, output, 0, NULL, error);
> - cache_control(CACHE_DISABLE);
> puts("Ok, booting the kernel.\n");
> }
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.
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
next prev parent reply other threads:[~2024-04-29 7:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-24 11:54 [PATCH] sh: boot: Remove sh5 cache handling Geert Uytterhoeven
2024-04-29 7:46 ` John Paul Adrian Glaubitz [this message]
2024-04-29 7:49 ` Geert Uytterhoeven
2024-04-29 7:52 ` John Paul Adrian Glaubitz
2024-04-29 8:06 ` Geert Uytterhoeven
2024-04-29 8:22 ` John Paul Adrian Glaubitz
2024-04-29 8:29 ` Geert Uytterhoeven
2024-05-02 13:50 ` Yoshinori Sato
2024-05-01 9:26 ` John Paul Adrian Glaubitz
2024-05-02 7:25 ` Geert Uytterhoeven
2024-05-02 10:32 ` John Paul Adrian Glaubitz
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=d5f53c4c490d0058956f6a501191107c4b148720.camel@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=arnd@arndb.de \
--cc=dalias@libc.org \
--cc=geert+renesas@glider.be \
--cc=linux-sh@vger.kernel.org \
--cc=ysato@users.sourceforge.jp \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).