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 D6D01C4320E for ; Fri, 30 Jul 2021 14:21:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C07B660720 for ; Fri, 30 Jul 2021 14:21:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239323AbhG3OVj (ORCPT ); Fri, 30 Jul 2021 10:21:39 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:55584 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239210AbhG3ORt (ORCPT ); Fri, 30 Jul 2021 10:17:49 -0400 Message-ID: <20210730135207.091568049@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1627654663; 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=SCGuJjssLx5VrFwVIGcIOK758a2UqWWbbDEKzmgJPms=; b=qL8QCmjDtwmiI0xw6c727qHQue93v1Okv9vmknMHe1oxYLbBLnC1mB6y/f6qx5Jp2g/DmB NR4kMmlQTBMniaZbMGPeByKYLnyXyVTBKxrrDKqUVyfEu4mF4hm3hmgwOE1qkst3IpjIw/ MFzR+WkCvdTaAR86R0lp7dLPBx61cacEnExW31CnTenAp8KaAjg0t7eoH8szacR8pYq4sR kz9Ntow72/nb4DP85Sk+A33FZlU5eGYseySP9VPnbISD0CbtuMN9/sBBNBMqYGSyOtst/C oGtPEqTHM+kf4EuWjxVQ7C0fZrN+nzkrqguhzbqaLAN+qH3YS9OvmRoqLKLWUQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1627654663; 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=SCGuJjssLx5VrFwVIGcIOK758a2UqWWbbDEKzmgJPms=; b=2K032RzLVwt6+5uq3Eotj6Cud6kUBB+A+x0Ok6PnRDLz+CKxSrKPwmYtw6nfSgKxXalRn3 RZeLuTRTml+rhTAg== Date: Fri, 30 Jul 2021 15:50:41 +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 Subject: [patch 34/63] locking/ww_mutex: Move ww_mutex declarations into ww_mutex.h References: <20210730135007.155909613@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 ww_mutex declarations into the ww_mutex specific header where they belong. Preperatory change to allow compiling ww_mutex standalone. Signed-off-by: Thomas Gleixner --- include/linux/mutex.h | 11 ----------- include/linux/ww_mutex.h | 8 ++++++++ 2 files changed, 8 insertions(+), 11 deletions(-) --- --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -20,9 +20,6 @@ #include #include -struct ww_class; -struct ww_acquire_ctx; - /* * Simple, straightforward mutexes with strict semantics: * @@ -66,14 +63,6 @@ struct mutex { #endif }; -struct ww_mutex { - struct mutex base; - struct ww_acquire_ctx *ctx; -#ifdef CONFIG_DEBUG_MUTEXES - struct ww_class *ww_class; -#endif -}; - #ifdef CONFIG_DEBUG_MUTEXES #define __DEBUG_MUTEX_INITIALIZER(lockname) \ --- a/include/linux/ww_mutex.h +++ b/include/linux/ww_mutex.h @@ -28,6 +28,14 @@ struct ww_class { unsigned int is_wait_die; }; +struct ww_mutex { + struct mutex base; + struct ww_acquire_ctx *ctx; +#ifdef CONFIG_DEBUG_MUTEXES + struct ww_class *ww_class; +#endif +}; + struct ww_acquire_ctx { struct task_struct *task; unsigned long stamp;