All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression
@ 2021-11-10  3:09 Randy Dunlap
  2021-11-10 11:28 ` Arnd Bergmann
  2021-11-10 18:48 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-11-10  3:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, kernel test robot, Arnd Bergmann,
	Thomas Bogendoerfer, linux-mips

For MIPS pre-boot, when CONFIG_KERNEL_ZSTD=y, the decompressor
function uses __bswapdi2(), so this object file should be added to
the target object file.

Fixes these build errors:

mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xxh64':
decompress.c:(.text+0x8be0): undefined reference to `__bswapdi2'
mips-linux-ld: decompress.c:(.text+0x8c78): undefined reference to `__bswapdi2'
mips-linux-ld: decompress.c:(.text+0x8d04): undefined reference to `__bswapdi2'
mips-linux-ld: arch/mips/boot/compressed/decompress.o:decompress.c:(.text+0xa010): more undefined references to `__bswapdi2' follow

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: linux-mips@vger.kernel.org
---
 arch/mips/boot/compressed/Makefile |    6 ++++++
 1 file changed, 6 insertions(+)

--- linux-next-20211109.orig/arch/mips/boot/compressed/Makefile
+++ linux-next-20211109/arch/mips/boot/compressed/Makefile
@@ -56,6 +56,8 @@ $(obj)/uart-ath79.c: $(srctree)/arch/mip
 
 vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o
 
+vmlinuzobjs-$(CONFIG_KERNEL_ZSTD) += $(obj)/bswapdi.o
+
 extra-y += ashldi3.c
 $(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE
 	$(call if_changed,shipped)
@@ -64,6 +66,10 @@ extra-y += bswapsi.c
 $(obj)/bswapsi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
 	$(call if_changed,shipped)
 
+extra-y += bswapdi.c
+$(obj)/bswapdi.c: $(obj)/%.c: $(srctree)/arch/mips/lib/%.c FORCE
+	$(call if_changed,shipped)
+
 targets := $(notdir $(vmlinuzobjs-y))
 
 targets += vmlinux.bin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression
  2021-11-10  3:09 [PATCH] MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression Randy Dunlap
@ 2021-11-10 11:28 ` Arnd Bergmann
  2021-11-10 18:48 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-11-10 11:28 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Linux Kernel Mailing List, kernel test robot, Arnd Bergmann,
	Thomas Bogendoerfer, open list:BROADCOM NVRAM DRIVER

On Wed, Nov 10, 2021 at 4:09 AM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> For MIPS pre-boot, when CONFIG_KERNEL_ZSTD=y, the decompressor
> function uses __bswapdi2(), so this object file should be added to
> the target object file.
>
> Fixes these build errors:
>
> mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xxh64':
> decompress.c:(.text+0x8be0): undefined reference to `__bswapdi2'
> mips-linux-ld: decompress.c:(.text+0x8c78): undefined reference to `__bswapdi2'
> mips-linux-ld: decompress.c:(.text+0x8d04): undefined reference to `__bswapdi2'
> mips-linux-ld: arch/mips/boot/compressed/decompress.o:decompress.c:(.text+0xa010): more undefined references to `__bswapdi2' follow
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: linux-mips@vger.kernel.org

Thank you for the fix, it looks like I missed it when I patched the xz version.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 0652035a5794 ("asm-generic: unaligned: remove byteshift helpers")
Fixes: cddc40f5617e ("mips: always link byteswap helpers into decompressor")

        Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression
  2021-11-10  3:09 [PATCH] MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression Randy Dunlap
  2021-11-10 11:28 ` Arnd Bergmann
@ 2021-11-10 18:48 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2021-11-10 18:48 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: linux-kernel, kernel test robot, Arnd Bergmann, linux-mips

On Tue, Nov 09, 2021 at 07:09:44PM -0800, Randy Dunlap wrote:
> For MIPS pre-boot, when CONFIG_KERNEL_ZSTD=y, the decompressor
> function uses __bswapdi2(), so this object file should be added to
> the target object file.
> 
> Fixes these build errors:
> 
> mips-linux-ld: arch/mips/boot/compressed/decompress.o: in function `xxh64':
> decompress.c:(.text+0x8be0): undefined reference to `__bswapdi2'
> mips-linux-ld: decompress.c:(.text+0x8c78): undefined reference to `__bswapdi2'
> mips-linux-ld: decompress.c:(.text+0x8d04): undefined reference to `__bswapdi2'
> mips-linux-ld: arch/mips/boot/compressed/decompress.o:decompress.c:(.text+0xa010): more undefined references to `__bswapdi2' follow
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: linux-mips@vger.kernel.org
> ---
>  arch/mips/boot/compressed/Makefile |    6 ++++++
>  1 file changed, 6 insertions(+)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-10 18:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-10  3:09 [PATCH] MIPS: boot/compressed/: add __bswapdi2() to target for ZSTD decompression Randy Dunlap
2021-11-10 11:28 ` Arnd Bergmann
2021-11-10 18:48 ` Thomas Bogendoerfer

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.