From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62655C4338F for ; Thu, 5 Aug 2021 15:44:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49F4B61151 for ; Thu, 5 Aug 2021 15:44:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242623AbhHEPoK (ORCPT ); Thu, 5 Aug 2021 11:44:10 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:43940 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242435AbhHEPmL (ORCPT ); Thu, 5 Aug 2021 11:42:11 -0400 Message-ID: <20210805153954.793531767@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=aycLtfy8gfdPLlQgpHv6K2/4Mae2a+Ak76YMWhVZx6M=; b=LBqrAeOBpEE0cKnGTfrPNE9weYVEgkgoFl4Ojak29dQeaRVslZ329JNsQYi1ar7HLnXplF 4OuqWM3XKqdoVH4ZX8TWwBHXp2dl+5+FkwemB088m/p5DN5rqF1IUXwsdu75Rlz7GO9Ehp YpzFRbU4MwngXwgp23c51v18j6hwoqW0SSHhsnrpuO+mCmHDUMkrcFc/rq7iHNsgEHud/s m0AXrA9Tolx5mXURwjk4+JZVnw1ndpgXeGzav9aFK+HadRc7GxvTqKwqcj5QIiBAru4bMG /WTZtMeLWcPUsME379BIKHkqv3PFR2cwf2L0zKVnVSB86XLsCf7W8eJQFRwqYA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628178116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=aycLtfy8gfdPLlQgpHv6K2/4Mae2a+Ak76YMWhVZx6M=; b=r4nUmhZ8ql8NSbApii7rzia1jZ+WaB4/OqW/lNgchd1kyjL/SoiGpLYmgyiD4qDDjVaTo+ HdqYUD9y+LWbdQAg== Date: Thu, 05 Aug 2021 17:13:34 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Ingo Molnar , Juri Lelli , Steven Rostedt , Daniel Bristot de Oliveira , Will Deacon , Waiman Long , Boqun Feng , Sebastian Andrzej Siewior , Davidlohr Bueso , Mike Galbraith Subject: [patch V3 34/64] locking/mutex: Move waiter to core header References: <20210805151300.330412127@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thomas Gleixner Move the mutex waiter declaration from the global to the core local header. There is no reason to expose it outside of the core code. Signed-off-by: Thomas Gleixner --- include/linux/mutex.h | 13 ------------- kernel/locking/mutex.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) --- --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -74,19 +74,6 @@ struct ww_mutex { #endif }; -/* - * This is the control structure for tasks blocked on mutex, - * which resides on the blocked task's kernel stack: - */ -struct mutex_waiter { - struct list_head list; - struct task_struct *task; - struct ww_acquire_ctx *ww_ctx; -#ifdef CONFIG_DEBUG_MUTEXES - void *magic; -#endif -}; - #ifdef CONFIG_DEBUG_MUTEXES #define __DEBUG_MUTEX_INITIALIZER(lockname) \ --- a/kernel/locking/mutex.h +++ b/kernel/locking/mutex.h @@ -7,6 +7,19 @@ * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar */ +/* + * This is the control structure for tasks blocked on mutex, which resides + * on the blocked task's kernel stack: + */ +struct mutex_waiter { + struct list_head list; + struct task_struct *task; + struct ww_acquire_ctx *ww_ctx; +#ifdef CONFIG_DEBUG_MUTEXES + void *magic; +#endif +}; + #ifdef CONFIG_DEBUG_MUTEXES extern void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter);