Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp7105341rdb; Fri, 15 Dec 2023 19:33:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmZuwIOE2aK5wbo0B2Jutas7v6Ft6wsjVwGFhK9JjgCUXRYFUT6z/LZiPoZSAlYAcpVv29 X-Received: by 2002:a17:902:b197:b0:1d1:ce10:d703 with SMTP id s23-20020a170902b19700b001d1ce10d703mr12971293plr.91.1702697590062; Fri, 15 Dec 2023 19:33:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697590; cv=none; d=google.com; s=arc-20160816; b=l6Uuf8GAKP3xVdoHlm8SXTtj48Xi/xIYU5IsumdYZ5mWnRi18E547ErFrcqJG7DUpz TAckPfvfrerGOcWcO3QA+7dG9cosS46yjz2kBbg2Wi6VD6r1p1UqA9yHQii111f7gbso N8cP4ljECv/SjvIeki8f5B2aa6tZk7lEusEBOCk+MheyXAaf42GGSCLvVoRl2u+Oj0QQ ZFT44zFN7v8BCNq7VRKa5JtdArGPYeCBz2UOlAa66Ua9f3l5V5g9fqy8vtOQ5fII7nGT wtu6AcaBgoeUAOogRpGIUEHjSPKKlYxetCu2cDSxFBXXejbX0YWA6+czJ3Z9/qoWnhUu ueIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=e3tHutfa1QYCHwlZxSH9tW2HuBfPypl6d7654MXKb2g=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=p/sjfXTWuxysGsG3dxQBW4eyv14vZRXar3oNfcms0xuVQJBgNp2FN/rVlnU22hG+Zb ssXSEUpHLBM8x4AGPUsMGZFUcfwsuT98QcJx2bRq1jDxOhxGWg8bJKnuXSvZY/TaZDeU Zus+g0HThGdmAS0s18i4tEuYTTT6FDNPKiIVz4P3n2TxyMMKyySfTqjWf4MC/fTNJrDp e4ShNqJf9iywKfydw4oKdQa2Lqvs0pWzGBdfN2QqI2X9wSZNiZe37eD7YgQEtxpUPzD8 UwdDhEvoaZkJbn7i/QwsDSyAUTmUe2s52gxfHLBptgvRXChpjGsHggkF9IC/0lPqEU54 QRGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DIBy7Flv; spf=pass (google.com: domain of linux-kernel+bounces-2008-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d6-20020a170902cec600b001d00a92b9d4si14642159plg.575.2023.12.15.19.33.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:33:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2008-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=DIBy7Flv; spf=pass (google.com: domain of linux-kernel+bounces-2008-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B5AF4287AEF for ; Sat, 16 Dec 2023 03:33:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4523D328B5; Sat, 16 Dec 2023 03:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="DIBy7Flv" X-Original-To: linux-kernel@vger.kernel.org Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46E9B1E4BD for ; Sat, 16 Dec 2023 03:30:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1702697421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e3tHutfa1QYCHwlZxSH9tW2HuBfPypl6d7654MXKb2g=; b=DIBy7FlvM36CDQz6G9CvyRS/y6yB/RIfDL9XUiKR3uJjZeJyzz0po37EicZLkGQZfyOCk/ RZy/4d9+FjbJjPZlHN6cLBuDNbK6LrXNJiOSa7D9LnxUMWDGdIexD4mbwZS63uAzP1Z+7V /MlED5Q/UU9DEmdTz8RuXczptTDFTdU= From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Kent Overstreet , tglx@linutronix.de, x86@kernel.org, tj@kernel.org, peterz@infradead.org, mathieu.desnoyers@efficios.com, paulmck@kernel.org, keescook@chromium.org, dave.hansen@linux.intel.com, mingo@redhat.com, will@kernel.org, longman@redhat.com, boqun.feng@gmail.com, brauner@kernel.org Subject: [PATCH 30/50] workqueue: Split out workqueue_types.h Date: Fri, 15 Dec 2023 22:29:36 -0500 Message-ID: <20231216032957.3553313-9-kent.overstreet@linux.dev> In-Reply-To: <20231216032957.3553313-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032957.3553313-1-kent.overstreet@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT More sched.h dependency culling - this lets us kill a rhashtable-types.h dependency on workqueue.h. Signed-off-by: Kent Overstreet --- include/linux/dma-fence.h | 1 + include/linux/rhashtable-types.h | 2 +- include/linux/timekeeping.h | 1 + include/linux/workqueue.h | 16 +--------------- include/linux/workqueue_types.h | 25 +++++++++++++++++++++++++ 5 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 include/linux/workqueue_types.h diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index b3772edca2e6..e06bad467f55 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h @@ -21,6 +21,7 @@ #include #include #include +#include struct dma_fence; struct dma_fence_ops; diff --git a/include/linux/rhashtable-types.h b/include/linux/rhashtable-types.h index 57467cbf4c5b..b6f3797277ff 100644 --- a/include/linux/rhashtable-types.h +++ b/include/linux/rhashtable-types.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include struct rhash_head { struct rhash_head __rcu *next; diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index fe1e467ba046..7c43e98cf211 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -4,6 +4,7 @@ #include #include +#include /* Included from linux/ktime.h */ diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 24b1e5070f4d..f1bb2e35301f 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h @@ -14,12 +14,7 @@ #include #include #include - -struct workqueue_struct; - -struct work_struct; -typedef void (*work_func_t)(struct work_struct *work); -void delayed_work_timer_fn(struct timer_list *t); +#include /* * The first word is the work queue pointer and the flags rolled into @@ -95,15 +90,6 @@ enum { #define WORK_STRUCT_FLAG_MASK ((1ul << WORK_STRUCT_FLAG_BITS) - 1) #define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) -struct work_struct { - atomic_long_t data; - struct list_head entry; - work_func_t func; -#ifdef CONFIG_LOCKDEP - struct lockdep_map lockdep_map; -#endif -}; - #define WORK_DATA_INIT() ATOMIC_LONG_INIT((unsigned long)WORK_STRUCT_NO_POOL) #define WORK_DATA_STATIC_INIT() \ ATOMIC_LONG_INIT((unsigned long)(WORK_STRUCT_NO_POOL | WORK_STRUCT_STATIC)) diff --git a/include/linux/workqueue_types.h b/include/linux/workqueue_types.h new file mode 100644 index 000000000000..4c38824f3ab4 --- /dev/null +++ b/include/linux/workqueue_types.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_WORKQUEUE_TYPES_H +#define _LINUX_WORKQUEUE_TYPES_H + +#include +#include +#include +#include + +struct workqueue_struct; + +struct work_struct; +typedef void (*work_func_t)(struct work_struct *work); +void delayed_work_timer_fn(struct timer_list *t); + +struct work_struct { + atomic_long_t data; + struct list_head entry; + work_func_t func; +#ifdef CONFIG_LOCKDEP + struct lockdep_map lockdep_map; +#endif +}; + +#endif /* _LINUX_WORKQUEUE_TYPES_H */ -- 2.43.0