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-07-10 17:26:58 +0200
commitf957d278eadd2893cd34aff222e350d15bd53a4e (patch)
tree18de25b41cb48cafb0ca7a8f1ff6a925c57d12b6
parent0dfcf692e71a85e35f7f706a0f8d37dddbf45839 (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 fe92ccf1d0b0..2dedab7ae089 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 */ \