[PATCH] avr32: __div64_const32 is not ok

From: Guenter Roeck
Date: Sat Apr 30 2016 - 20:29:14 EST


Building avr32 images may fail with errors such as

ERROR: "__avr32_udiv64" [fs/btrfs/btrfs.ko] undefined!
ERROR: "__avr32_udiv64" [drivers/watchdog/kempld_wdt.ko] undefined!

gcc for avr32 generates those symbols for certain constants used
as divisor in do_div(). The problem can be avoided by setting
__div64_const32_is_OK to false for the architecture.

Cc: Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
arch/avr32/include/asm/div64.h | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 arch/avr32/include/asm/div64.h

diff --git a/arch/avr32/include/asm/div64.h b/arch/avr32/include/asm/div64.h
new file mode 100644
index 000000000000..1f3328e178df
--- /dev/null
+++ b/arch/avr32/include/asm/div64.h
@@ -0,0 +1,3 @@
+#define __div64_const32_is_OK false
+
+#include <asm-generic/div64.h>
--
2.5.0