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-05-20 23:42:08 -0600
commit89205d96a477d5c73e287de6c819bc0fa5601b65 (patch)
tree310819776ba8fb7e8d6d74d67f4f4634b45f7953
parentee04a3c6838b1bb3af035210d554336ee4af778d (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 */ \