diff mbox series

parisc: fix compilation failure due to missing __lshrdi3

Message ID alpine.LRH.2.02.2111270717490.10680@file01.intranet.prod.int.rdu2.redhat.com (mailing list archive)
State Superseded, archived
Headers show
Series parisc: fix compilation failure due to missing __lshrdi3 | expand

Commit Message

Mikulas Patocka Nov. 27, 2021, 12:36 p.m. UTC
Hi

I get this error when compiling a 64-bit kernel on a current Debian-ports 
system.

  CC [M]  drivers/hid/hid-generic.o
  LD [M]  drivers/hid/hid.o
  GEN     .version
  CHK     include/generated/compile.h
  LD      vmlinux.o
  MODPOST vmlinux.symvers
  MODINFO modules.builtin.modinfo
  GEN     modules.builtin
  LD      .tmp_vmlinux.kallsyms1
hppa64-linux-gnu-ld: arch/parisc/kernel/parisc_ksyms.o:(___ksymtab+__lshrdi3+0x0): undefined reference to `__lshrdi3'
make: *** [Makefile:1161: vmlinux] Chyba 1

This patch fixes it.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org

---
 arch/parisc/kernel/parisc_ksyms.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

Index: linux-5.16-rc2/arch/parisc/kernel/parisc_ksyms.c
===================================================================
--- linux-5.16-rc2.orig/arch/parisc/kernel/parisc_ksyms.c	2021-11-26 17:55:20.000000000 +0100
+++ linux-5.16-rc2/arch/parisc/kernel/parisc_ksyms.c	2021-11-26 19:18:31.000000000 +0100
@@ -92,17 +92,20 @@  EXPORT_SYMBOL($$divI_12);
 EXPORT_SYMBOL($$divI_14);
 EXPORT_SYMBOL($$divI_15);
 
+#ifndef CONFIG_64BIT
 extern void __ashrdi3(void);
 extern void __ashldi3(void);
 extern void __lshrdi3(void);
-extern void __muldi3(void);
 extern void __ucmpdi2(void);
 
 EXPORT_SYMBOL(__ashrdi3);
 EXPORT_SYMBOL(__ashldi3);
 EXPORT_SYMBOL(__lshrdi3);
-EXPORT_SYMBOL(__muldi3);
 EXPORT_SYMBOL(__ucmpdi2);
+#endif
+
+extern void __muldi3(void);
+EXPORT_SYMBOL(__muldi3);
 
 asmlinkage void * __canonicalize_funcptr_for_compare(void *);
 EXPORT_SYMBOL(__canonicalize_funcptr_for_compare);