Skip to content

Commit cb8c181

Browse files
author
David S. Miller
committed
[S390]: Fix build on 31-bit.
Allow s390 to properly override the generic __div64_32() implementation by: 1) Using obj-y for div64.o in s390's makefile instead of lib-y 2) Adding the weak attribute to the generic implementation. Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent efd1e8d commit cb8c181

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎arch/s390/lib/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
EXTRA_AFLAGS := -traditional
66

77
lib-y += delay.o string.o uaccess_std.o uaccess_pt.o qrnnd.o
8-
lib-$(CONFIG_32BIT) += div64.o
8+
obj-$(CONFIG_32BIT) += div64.o
99
lib-$(CONFIG_64BIT) += uaccess_mvcos.o
1010
lib-$(CONFIG_SMP) += spinlock.o

‎arch/s390/lib/div64.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,3 @@ uint32_t __div64_32(uint64_t *n, uint32_t base)
147147
}
148148

149149
#endif /* MARCH_G5 */
150-
151-
EXPORT_SYMBOL(__div64_32);

‎lib/div64.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/* Not needed on 64bit architectures */
2424
#if BITS_PER_LONG == 32
2525

26-
uint32_t __div64_32(uint64_t *n, uint32_t base)
26+
uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
2727
{
2828
uint64_t rem = *n;
2929
uint64_t b = base;

0 commit comments

Comments
 (0)