Re: [PATCH] m68k: use kernel's generic libgcc functions

Geert Uytterhoeven
2023-10-04T14:52:43Z

Hi Greg,

On Wed, Sep 13, 2023 at 9:14 AM Greg Ungerer <gerg@kernel.org> wrote:
> From: Greg Ungerer <gerg@linux-m68k.org>
>
> The arch/m68k/lib versions of the libgcc functions: ashldi3, ashrdi3
> and lshrdi3 were taken directly from an older version of gcc.
> We can use the kernel's own generic lib versions of these - they are
> virtually identical. Switch to those and remove the m68k local ones.
>
> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
i.e. will queue in the m68k for-v6.7 branch.

> --- a/arch/m68k/Kconfig
> +++ b/arch/m68k/Kconfig
> @@ -19,6 +19,9 @@ config M68K
> select GENERIC_CPU_DEVICES
> select GENERIC_IOMAP
> select GENERIC_IRQ_SHOW
> + select GENERIC_LIB_ASHLDI3
> + select GENERIC_LIB_ASHRDI3
> + select GENERIC_LIB_LSHRDI3
> select HAS_IOPORT if PCI || ISA || ATARI_ROM_ISA
> select HAVE_ARCH_SECCOMP
> select HAVE_ARCH_SECCOMP_FILTER

I guess we can select GENERIC_LIB_MULDI3 if CPU_HAS_NO_MULDIV64
and clean up arch/m68k/lib/muldi3.c, too?

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