summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bset.c
diff options
context:
space:
mode:
authorBrett Holman <bpholman5@gmail.com>2021-05-21 16:45:38 -0600
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:04 -0400
commit2eba51a69a7aba82bd4639a71b0906be7e23ca5c (patch)
tree46b8dd7269cba025da5be844bd0fb23a94d3e218 /fs/bcachefs/bset.c
parent1ce0cf5fe9300f28e834e6fa001cc5a114cd0493 (diff)
bcachefs: rewrote prefetch asm in gas syntax for clang compatibility
Signed-off-by: Brett Holman <bpholman5@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bset.c')
-rw-r--r--fs/bcachefs/bset.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/fs/bcachefs/bset.c b/fs/bcachefs/bset.c
index e569d9a9b906..84c4664c9912 100644
--- a/fs/bcachefs/bset.c
+++ b/fs/bcachefs/bset.c
@@ -1181,13 +1181,11 @@ static struct bkey_packed *bset_search_write_set(const struct btree *b,
static inline void prefetch_four_cachelines(void *p)
{
-#if (CONFIG_X86_64 && !defined(__clang__))
- asm(".intel_syntax noprefix;"
- "prefetcht0 [%0 - 127 + 64 * 0];"
- "prefetcht0 [%0 - 127 + 64 * 1];"
- "prefetcht0 [%0 - 127 + 64 * 2];"
- "prefetcht0 [%0 - 127 + 64 * 3];"
- ".att_syntax prefix;"
+#if CONFIG_X86_64
+ asm("prefetcht0 (-127 + 64 * 0)(%0);"
+ "prefetcht0 (-127 + 64 * 1)(%0);"
+ "prefetcht0 (-127 + 64 * 2)(%0);"
+ "prefetcht0 (-127 + 64 * 3)(%0);"
:
: "r" (p + 127));
#else