aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeann Ogasawara <leann.ogasawara@canonical.com>2011-05-05 06:51:39 -0700
committerJohn Rigby <john.rigby@linaro.org>2012-06-25 15:02:12 -0600
commit6f36de149e6908cd7163dd00e472e10bf355b673 (patch)
tree0d6fbf2651e866098329f4f711fc4a0fdcd5f608
parent647ee03d851126dec80b39750081aca83dbff5ff (diff)
UBUNTU: SAUCE: [arm] fixup __aeabi_uldivmod undefined build error
When building on arm we run into the following build error due to gcc-4.6 optimizing do_div into a uldivmod call: ERROR: "__aeabi_uldivmod" [drivers/scsi/megaraid/megaraid_sas.ko] undefined! Inline some assembly to prevent the compiler optimization. Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
-rw-r--r--arch/arm/include/asm/div64.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h
index fe92ccf1d0b..2dedab7ae08 100644
--- a/arch/arm/include/asm/div64.h
+++ b/arch/arm/include/asm/div64.h
@@ -73,6 +73,7 @@
#define do_div(n, base) \
({ \
unsigned int __r, __b = (base); \
+ asm("" : "+r" (__b)); \
if (!__builtin_constant_p(__b) || __b == 0 || \
(__LINUX_ARM_ARCH__ < 4 && (__b & (__b - 1)) != 0)) { \
/* non-constant divisor (or zero): slow path */ \