Skip to content

Commit 92b90f7

Browse files
kkdwivediAlexei Starovoitov
authored andcommitted
bpf: Use architecture provided res_smp_cond_load_acquire
In v2 of rqspinlock [0], we fixed potential problems with WFE usage in arm64 to fallback to a version copied from Ankur's series [1]. This logic was moved into arch-specific headers in v3 [2]. However, we missed using the arch-provided res_smp_cond_load_acquire in commit ebababc ("rqspinlock: Hardcode cond_acquire loops for arm64") due to a rebasing mistake between v2 and v3 of the rqspinlock series. Fix the typo to fallback to the arm64 definition as we did in v2. [0]: https://lore.kernel.org/bpf/[email protected] [1]: https://lore.kernel.org/lkml/[email protected] [2]: https://lore.kernel.org/bpf/[email protected] Fixes: ebababc ("rqspinlock: Hardcode cond_acquire loops for arm64") Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 1ddb9ad commit 92b90f7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm64/include/asm/rqspinlock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
#endif
8888

89-
#define res_smp_cond_load_acquire_timewait(v, c) smp_cond_load_acquire_timewait(v, c, 0, 1)
89+
#define res_smp_cond_load_acquire(v, c) smp_cond_load_acquire_timewait(v, c, 0, 1)
9090

9191
#include <asm-generic/rqspinlock.h>
9292

kernel/bpf/rqspinlock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static noinline int check_timeout(rqspinlock_t *lock, u32 mask,
253253
})
254254
#else
255255
#define RES_CHECK_TIMEOUT(ts, ret, mask) \
256-
({ (ret) = check_timeout(&(ts)); })
256+
({ (ret) = check_timeout((lock), (mask), &(ts)); })
257257
#endif
258258

259259
/*

0 commit comments

Comments
 (0)