Skip to content

Commit 5297ccb

Browse files
Peter Zijlstraingomolnar
authored andcommitted
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
1 parent 2674bd1 commit 5297ccb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎kernel/locking/ww_mutex.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ ww_mutex_lock_acquired(struct ww_mutex *ww, struct ww_acquire_ctx *ww_ctx)
6262
* transaction than @b and depending on algorithm either needs to wait for
6363
* @b or die.
6464
*/
65-
static inline bool __sched
65+
static inline bool
6666
__ww_ctx_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b)
6767
{
6868

@@ -77,7 +77,7 @@ __ww_ctx_stamp_after(struct ww_acquire_ctx *a, struct ww_acquire_ctx *b)
7777
* already (ctx->acquired > 0), because __ww_mutex_add_waiter() and
7878
* __ww_mutex_check_kill() wake any but the earliest context.
7979
*/
80-
static bool __sched
80+
static bool
8181
__ww_mutex_die(struct mutex *lock, struct mutex_waiter *waiter,
8282
struct ww_acquire_ctx *ww_ctx)
8383
{
@@ -154,7 +154,7 @@ static bool __ww_mutex_wound(struct mutex *lock,
154154
*
155155
* The current task must not be on the wait list.
156156
*/
157-
static void __sched
157+
static void
158158
__ww_mutex_check_waiters(struct mutex *lock, struct ww_acquire_ctx *ww_ctx)
159159
{
160160
struct mutex_waiter *cur;
@@ -210,7 +210,7 @@ ww_mutex_set_context_fastpath(struct ww_mutex *lock, struct ww_acquire_ctx *ctx)
210210
raw_spin_unlock(&lock->base.wait_lock);
211211
}
212212

213-
static __always_inline int __sched
213+
static __always_inline int
214214
__ww_mutex_kill(struct mutex *lock, struct ww_acquire_ctx *ww_ctx)
215215
{
216216
if (ww_ctx->acquired > 0) {
@@ -238,7 +238,7 @@ __ww_mutex_kill(struct mutex *lock, struct ww_acquire_ctx *ww_ctx)
238238
* Since __ww_mutex_add_waiter() orders the wait-list on stamp, we only have to
239239
* look at waiters before us in the wait-list.
240240
*/
241-
static inline int __sched
241+
static inline int
242242
__ww_mutex_check_kill(struct mutex *lock, struct mutex_waiter *waiter,
243243
struct ww_acquire_ctx *ctx)
244244
{
@@ -285,7 +285,7 @@ __ww_mutex_check_kill(struct mutex *lock, struct mutex_waiter *waiter,
285285
* older contexts already waiting) to avoid unnecessary waiting and for
286286
* Wound-Wait ensure we wound the owning context when it is younger.
287287
*/
288-
static inline int __sched
288+
static inline int
289289
__ww_mutex_add_waiter(struct mutex_waiter *waiter,
290290
struct mutex *lock,
291291
struct ww_acquire_ctx *ww_ctx)

0 commit comments

Comments
 (0)