aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
authorLeann Ogasawara <leann.ogasawara@canonical.com>2011-05-05 09:51:39 -0400
committerLeann Ogasawara <leann.ogasawara@canonical.com>2011-08-30 13:16:01 -0400
commitc19fa89b5bf399e7e3e9c4bad0052a47b481cb62 (patch)
tree86c4127fd4b142890ee4f3e1779a70204e2afd95 /arch/arm/include
parent53020263754dfb7eea43a5bea13b92bf891efe9b (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>
Diffstat (limited to 'arch/arm/include')
-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 d3f0a9eee9f..0445d361371 100644
--- a/arch/arm/include/asm/div64.h
+++ b/arch/arm/include/asm/div64.h
@@ -73,6 +73,7 @@
73#define do_div(n, base) \ 73#define do_div(n, base) \
74({ \ 74({ \
75 unsigned int __r, __b = (base); \ 75 unsigned int __r, __b = (base); \
76 asm("" : "+r" (__b)); \
76 if (!__builtin_constant_p(__b) || __b == 0 || \ 77 if (!__builtin_constant_p(__b) || __b == 0 || \
77 (__LINUX_ARM_ARCH__ < 4 && (__b & (__b - 1)) != 0)) { \ 78 (__LINUX_ARM_ARCH__ < 4 && (__b & (__b - 1)) != 0)) { \
78 /* non-constant divisor (or zero): slow path */ \ 79 /* non-constant divisor (or zero): slow path */ \