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 2AC85C4338F for ; Wed, 11 Aug 2021 12:26:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F85060F22 for ; Wed, 11 Aug 2021 12:26:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238031AbhHKM1K (ORCPT ); Wed, 11 Aug 2021 08:27:10 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:50738 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238094AbhHKMXj (ORCPT ); Wed, 11 Aug 2021 08:23:39 -0400 Message-ID: <20210811121416.294033780@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628684595; 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=wqEUqv+RphsTuvMw8kU+H6ptt5k3u1F1Mg8Q6pYcvDU=; b=BYrV9lL5oWOxNwccXVjY7gq7FsqAmyU05nm04KpI6OZNLSJDdc7RMvmar3WOHNg7WMhcSI EzBJS8JMh8hL7SDYKSKiJQesU/1tEh9lzaLTJgVx2sbRh1Q1mSxW2WqeqLmCSLVXF4IZMs cmmaNb69BavbSVgF2rFpYes1xhJh/sgFDeX1pBS4Opr5cckWp3UCzNaoeTC2rAvdACVHSv HKSTlQSS1zr3CZ2ihpYhAhmB6FLzoh+dQ4YK2Rib8Bmxl7iqJ6gcyzmC6eYPzHk+c9C2NY LwiZejNnEPnTawG1IGDTL1jeBAmUb1YydW/qKZNrBqLYkEd01oVtXs0Nd9AvhA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628684595; 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=wqEUqv+RphsTuvMw8kU+H6ptt5k3u1F1Mg8Q6pYcvDU=; b=VgnuoVEbvd5GCRkSMVDdnHiDdoj8jRJlz09jpQpsPmNbZEVQ2VOMNHJ5V1YoAYJmmX2Hcw 2eEanFCgnlhDKPCw== 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 V4 36/68] locking/ww_mutex: Move ww_mutex declarations into ww_mutex.h References: <20210811120348.855823694@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-transfer-encoding: 8-bit Date: Wed, 11 Aug 2021 14:23:15 +0200 (CEST) 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. Preparatory 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;