bcachefs: rewrote prefetch asm in gas syntax for clang compatibility
authorBrett Holman <bpholman5@gmail.com>
Fri, 21 May 2021 22:45:38 +0000 (16:45 -0600)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:04 +0000 (17:09 -0400)
Signed-off-by: Brett Holman <bpholman5@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bset.c

index e569d9a9b906f8174855b21c32afb1ee187b135d..84c4664c9912744ba90edec187e6c8b9a3514c76 100644 (file)
@@ -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