summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeann Ogasawara <leann.ogasawara@canonical.com>2011-05-05 06:51:39 -0700
committerXavier Boudet <x-boudet@ti.com>2012-04-11 18:45:00 +0200
commit77bddf996e63edcb45f36b2375ee313689edd8b6 (patch)
tree886d7afc1485c2f7005c78d3006d5dabd32f549a
parentc3e7bab22d8ec3badb9a6b2bba11ebdbbc9027fa (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 d3f0a9eee9f6..0445d361371e 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 */ \