Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543372
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 06/13] ARM: atomic: fix gcc-4.4 build |
| Date | 2016-12-16 12:10 +0100 |
| Message-ID | <sOYyJ-2L0-5@gated-at.bofh.it> (permalink) |
| References | <sOYp3-2rU-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
gcc-4.4 fails to build some files with this constraint, which was
added to help out with gcc-4.6 and higher:
fs/btrfs/delayed-ref.c: In function 'add_delayed_tree_ref':
arch/arm/include/asm/atomic.h:280: error: 'asm' operand requires impossible reload
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44492
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/include/asm/atomic.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 66d0e215a773..65d5b843831a 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -280,7 +280,10 @@ static inline long long atomic64_read(const atomic64_t *v)
__asm__ __volatile__("@ atomic64_read\n"
" ldrd %0, %H0, [%1]"
: "=&r" (result)
- : "r" (&v->counter), "Qo" (v->counter)
+ : "r" (&v->counter)
+#if GCC_VERSION >= 40600
+ , "Qo" (v->counter)
+#endif
);
return result;
@@ -302,7 +305,10 @@ static inline long long atomic64_read(const atomic64_t *v)
__asm__ __volatile__("@ atomic64_read\n"
" ldrexd %0, %H0, [%1]"
: "=&r" (result)
- : "r" (&v->counter), "Qo" (v->counter)
+ : "r" (&v->counter)
+#if GCC_VERSION >= 40600
+ , "Qo" (v->counter)
+#endif
);
return result;
--
2.9.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 06/13] ARM: atomic: fix gcc-4.4 build Arnd Bergmann <arnd@arndb.de> - 2016-12-16 12:10 +0100
csiph-web