Skip to content

Commit

Permalink
[S390]: Fix build on 31-bit.
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
David S. Miller committed Apr 26, 2007
1 parent efd1e8d commit cb8c181
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/s390/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
EXTRA_AFLAGS := -traditional

lib-y += delay.o string.o uaccess_std.o uaccess_pt.o qrnnd.o
lib-$(CONFIG_32BIT) += div64.o
obj-$(CONFIG_32BIT) += div64.o
lib-$(CONFIG_64BIT) += uaccess_mvcos.o
lib-$(CONFIG_SMP) += spinlock.o
2 changes: 0 additions & 2 deletions arch/s390/lib/div64.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,3 @@ uint32_t __div64_32(uint64_t *n, uint32_t base)
}

#endif /* MARCH_G5 */

EXPORT_SYMBOL(__div64_32);
2 changes: 1 addition & 1 deletion lib/div64.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/* Not needed on 64bit architectures */
#if BITS_PER_LONG == 32

uint32_t __div64_32(uint64_t *n, uint32_t base)
uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
{
uint64_t rem = *n;
uint64_t b = base;
Expand Down

0 comments on commit cb8c181

Please sign in to comment.