locking/ww_mutex: Remove the __sched annotation from ww_mutex APIs

None of these functions will be on the stack when blocking in
schedule(), hence __sched is not needed.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210815211304.453235952@linutronix.de
This commit is contained in:
Peter Zijlstra 2021-08-15 23:28:44 +02:00 коммит произвёл Ingo Molnar
Родитель 2674bd181f
Коммит 5297ccb2c5
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -62,7 +62,7 @@ ww_mutex_lock_acquired(struct ww_mutex *ww, struct ww_acquire_ctx *ww_ctx)
* transaction than @b and depending on algorithm either needs to wait for * transaction than @b and depending on algorithm either needs to wait for
* @b or die. * @b or die.
*/ */
static inline bool __sched static inline bool
__ww_ctx_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b) __ww_ctx_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b)
{ {
@ -77,7 +77,7 @@ __ww_ctx_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b)
* already (ctx->acquired > 0), because __ww_mutex_add_waiter() and * already (ctx->acquired > 0), because __ww_mutex_add_waiter() and
* __ww_mutex_check_kill() wake any but the earliest context. * __ww_mutex_check_kill() wake any but the earliest context.
*/ */
static bool __sched static bool
__ww_mutex_die(struct mutex *lock, struct mutex_waiter *waiter, __ww_mutex_die(struct mutex *lock, struct mutex_waiter *waiter,
struct ww_acquire_ctx *ww_ctx) struct ww_acquire_ctx *ww_ctx)
{ {
@ -154,7 +154,7 @@ static bool __ww_mutex_wound(struct mutex *lock,
* *
* The current task must not be on the wait list. * The current task must not be on the wait list.
*/ */
static void __sched static void
__ww_mutex_check_waiters(struct mutex *lock, struct ww_acquire_ctx *ww_ctx) __ww_mutex_check_waiters(struct mutex *lock, struct ww_acquire_ctx *ww_ctx)
{ {
struct mutex_waiter *cur; struct mutex_waiter *cur;
@ -210,7 +210,7 @@ ww_mutex_set_context_fastpath(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
raw_spin_unlock(&lock->base.wait_lock); raw_spin_unlock(&lock->base.wait_lock);
} }
static __always_inline int __sched static __always_inline int
__ww_mutex_kill(struct mutex *lock, struct ww_acquire_ctx *ww_ctx) __ww_mutex_kill(struct mutex *lock, struct ww_acquire_ctx *ww_ctx)
{ {
if (ww_ctx->acquired > 0) { if (ww_ctx->acquired > 0) {
@ -238,7 +238,7 @@ __ww_mutex_kill(struct mutex *lock, struct ww_acquire_ctx *ww_ctx)
* Since __ww_mutex_add_waiter() orders the wait-list on stamp, we only have to * Since __ww_mutex_add_waiter() orders the wait-list on stamp, we only have to
* look at waiters before us in the wait-list. * look at waiters before us in the wait-list.
*/ */
static inline int __sched static inline int
__ww_mutex_check_kill(struct mutex *lock, struct mutex_waiter *waiter, __ww_mutex_check_kill(struct mutex *lock, struct mutex_waiter *waiter,
struct ww_acquire_ctx *ctx) struct ww_acquire_ctx *ctx)
{ {
@ -285,7 +285,7 @@ __ww_mutex_check_kill(struct mutex *lock, struct mutex_waiter *waiter,
* older contexts already waiting) to avoid unnecessary waiting and for * older contexts already waiting) to avoid unnecessary waiting and for
* Wound-Wait ensure we wound the owning context when it is younger. * Wound-Wait ensure we wound the owning context when it is younger.
*/ */
static inline int __sched static inline int
__ww_mutex_add_waiter(struct mutex_waiter *waiter, __ww_mutex_add_waiter(struct mutex_waiter *waiter,
struct mutex *lock, struct mutex *lock,
struct ww_acquire_ctx *ww_ctx) struct ww_acquire_ctx *ww_ctx)