From patchwork Sat Dec 16 02:47:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4102dyi; Fri, 15 Dec 2023 18:49:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9MspZ1U4Z2eqomz3Hv5AtkMTiCPI7Wt0Ll/GMBxb31ADyz3C/p2KaDN0h4hgs0TSIxHdt X-Received: by 2002:a05:6512:398a:b0:50d:fb24:1224 with SMTP id j10-20020a056512398a00b0050dfb241224mr6348983lfu.129.1702694971565; Fri, 15 Dec 2023 18:49:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702694971; cv=none; d=google.com; s=arc-20160816; b=NNra1sKN/EJAq1umBuafq8zE81c+wDUZ/fiTKk/qY+oaQ+IxXBlAkVRUeqSdrtTlvg dl9rUWOHoW/VponrNOpjwaR7aVKFKcKtuNdX0fTVa5iWJueqVuEEEgxMjmW2qYHSPI1j v1G2sHVN7+doxPd/5wzuziSXC0UISljU3hrldwNV9HIVH0/sZKLHdcQMsWocfq5fZehW zs69Ff3CmL8MLAdn/Mnd7cQrL20D7Jt8uJwsfGMdxPUH4HTZKzYrRJq3+b1bQnu5svwX sfDcP1MwHSQ1YPxbzME99j4erTdWjmnJRnYg4+0RG4qhJLjIfJkj6GOMH9idYMNUwDyi uU3A== 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=VODn5WVL/QM1g9I4uze47yYKYzg7GnQJBhOUGBuweLk=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=elSAxeZvWCcWiSw+XnR1jKhQt8p6FRxOtrFp6cs9W4FZc7MeYVstzvZB92ixxFZxWb DIqvT05feYoHcKuVhAKYCiiAoA/sowMfMpQ0tGSqhpnopnD3lSoVN7VqMc/ltBWD+yAc 6x9eOQ9B2fEx2hF9Ix3vTesMsHO+fXaeUDoEN1WomwRBUZNFvsNheLaORf4XG1xB6Q1W Z0qM9Vgo6RIiFhJV0sBsNtdantPTrYn+x5mBKZy8AIqtxauGsG3ptqXEqKWrEDh71L3H 7Sx7oOC62xaUTR5NfVVQwX0PQk1mcnpu9HgJYOIgTyOhI1c6zl7R6YFVPMqEL1SwXMBe cdLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="plCJO/Au"; spf=pass (google.com: domain of linux-kernel+bounces-1964-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1964-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q24-20020a1709060e5800b00a23271188a7si141684eji.200.2023.12.15.18.49.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:49:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1964-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="plCJO/Au"; spf=pass (google.com: domain of linux-kernel+bounces-1964-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1964-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2DAE01F253E6 for ; Sat, 16 Dec 2023 02:49:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5C9B6D22; Sat, 16 Dec 2023 02:48:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="plCJO/Au" X-Original-To: linux-kernel@vger.kernel.org Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 B4659185A for ; Sat, 16 Dec 2023 02:48:46 +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=1702694924; 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=VODn5WVL/QM1g9I4uze47yYKYzg7GnQJBhOUGBuweLk=; b=plCJO/Au/k4zBWiq1kfl3DEx4msB15mWbNXADii4zWXpC06IrsUBwfznvBUSVYuTUy6yTs Tf6Cv0koH4nz9RXTAqvGAiIAS0wclWaYdYy2VTOSZjHE/+B5gUpBd9kuYRXHKgjdkWljMJ wn2KTDH3LqVil2EPl+7+puwyfgbOW8M= 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 01/50] drivers/gpu/drm/i915/i915_memcpy.c: fix missing includes Date: Fri, 15 Dec 2023 21:47:42 -0500 Message-ID: <20231216024834.3510073-2-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405082829666570 X-GMAIL-MSGID: 1785405082829666570 Signed-off-by: Kent Overstreet --- drivers/gpu/drm/i915/i915_memcpy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_memcpy.c b/drivers/gpu/drm/i915/i915_memcpy.c index 1b021a4902de..40b288136841 100644 --- a/drivers/gpu/drm/i915/i915_memcpy.c +++ b/drivers/gpu/drm/i915/i915_memcpy.c @@ -23,6 +23,8 @@ */ #include +#include +#include #include #include "i915_memcpy.h" From patchwork Sat Dec 16 02:47:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179741 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4173dyi; Fri, 15 Dec 2023 18:49:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IGd2uO25f73I7PzW7xqiyqQcCkjLNnk1YiD6DdbHdf4dvtPOnuP+ZXktredmbSFKxPDypNC X-Received: by 2002:adf:e343:0:b0:333:39d4:ff80 with SMTP id n3-20020adfe343000000b0033339d4ff80mr6590431wrj.90.1702694988473; Fri, 15 Dec 2023 18:49:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702694988; cv=none; d=google.com; s=arc-20160816; b=Gkj/+qtpAhnaCgA8PHhT0mybf0G2UN7TIzlcui0M7shSq6yt/JLqLaMVzBP5i7OsfL wGn9cM38kanYZx5bOkgC3p/WIK7b+64HIYpMCb3UY77GjXiOskDnIELnFQlsadE+ymUE uGL64YGcuXdXa8kUZ9aa6oD/JVyrNStH/5IgEGmwTVunNfKttFAy56PUmRi6ItuuxnRh tlPrJRHabi+ijizBINIegXJZdvJvVpJH7pcdBAvrnzwqhQKH76kaDaESrQsjebIbSZUn qwqOebb6+4ANnqLBO07jQ0Oi0zTZUJ23P6NwzhVbUPsC7i+fiv6HEj5yDB99D44O1nCB oa/A== 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=N4QTR2/N8809UNpiUk1nEmTQb/VXiPK1VfzHpWfE4AE=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=RC+Izhn7ZGD2S5RLDjH6V73vh5hF/NP2eawh6CJrlhToBXjFVCEUVz0JHiVyXBNJMG Ij/ArCP/kM1xaunUmo8w/EC4WjP2jkZG6F/60Gbge5PIpS2awruITqtWkETculyMC1wc CR/b0ZQ4echdIGUbrlXdxPAASNQbD3zAqipFuhkrtCkMU3rOSbEgcYZnu/OjDjs9CsNX WZdKZDloafBDVagnANPDqR6r4WzMXL9YVdDBj9krLuu4Lj2BnH27MTAyZuqOTw0CYxqW RC2/zuUSlBXp2wGoGNok3UpFR3tiCVtq/SYj5yGIp6p/r1XX/asuXNBwgkJuWDCFBzrX RqVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kjH1mX2r; spf=pass (google.com: domain of linux-kernel+bounces-1965-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1965-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e11-20020a50a68b000000b00552fc419d61si217372edc.506.2023.12.15.18.49.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:49:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1965-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=kjH1mX2r; spf=pass (google.com: domain of linux-kernel+bounces-1965-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1965-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 186061F25404 for ; Sat, 16 Dec 2023 02:49:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8497DF4C; Sat, 16 Dec 2023 02:48:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="kjH1mX2r" X-Original-To: linux-kernel@vger.kernel.org Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (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 93BBE4A31 for ; Sat, 16 Dec 2023 02:48:48 +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=1702694926; 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=N4QTR2/N8809UNpiUk1nEmTQb/VXiPK1VfzHpWfE4AE=; b=kjH1mX2r1sSnQGMez9MPglMnwKgNBiVdKnHgbMusC0unwxLJ98cnwh2/RvFv5rU4t9RGjp zZIYYU7XV6YACVErvZP3Pd4wVOaZpQbkO138BuemBgLJZfYNrjyJk7HQm1N0hr1a9NXe8n aBTw5c+L9g7thNIddUk1niUgyphXAOQ= 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 02/50] x86/kernel/fpu/bugs.c: fix missing include Date: Fri, 15 Dec 2023 21:47:43 -0500 Message-ID: <20231216024834.3510073-3-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405100123129091 X-GMAIL-MSGID: 1785405100123129091 Signed-off-by: Kent Overstreet --- arch/x86/kernel/fpu/bugs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/fpu/bugs.c b/arch/x86/kernel/fpu/bugs.c index 794e70151203..a06b876bbf2d 100644 --- a/arch/x86/kernel/fpu/bugs.c +++ b/arch/x86/kernel/fpu/bugs.c @@ -2,6 +2,7 @@ /* * x86 FPU bug checks: */ +#include #include /* From patchwork Sat Dec 16 02:47:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179747 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4772dyi; Fri, 15 Dec 2023 18:52:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH1tOZaNB/LnCI66sJM3HvEI7H3G8Q+4gH2uXN3mVVjIYbA3FZXB5fqdVOGCdLpFrdJzWHW X-Received: by 2002:a17:902:e789:b0:1d0:6ffe:9f5 with SMTP id cp9-20020a170902e78900b001d06ffe09f5mr14575951plb.83.1702695124343; Fri, 15 Dec 2023 18:52:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695124; cv=none; d=google.com; s=arc-20160816; b=QQDW4aigvfIiwcD8br3bWx5miAOpqdMwEOjVHfrZby/jBl3OfUGbVjM0tmMuqnNIbq UOTqkwmtWe3h7g56CrusFUBmv8Xvje0c81bgWEmtCZLCJso+IFgAJfKcjTXOny7merFA qQ2Cf8D9CTbE2QlAudIsLNmUAhOQrVXI9D38K8/1fs1vd2LmwVIa61eKXM9Xit/ctloY PepOTXWbX7O0PcD8cpQ792BuYHQX2YtrlPlaDBcF4cMvcJFDhKcfbNxPOytQAbwbSWH6 85RyEfBXO2Ian1lnRUcMVfsD73f2dpk4pyFEfr/P7Z99b+nOOIj6hxxWbxw5sFCz3ygI HQPA== 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=adc0sNIM7gQ4trdre1K6cbqGQoob6WcBiJ3dUIPudMk=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=M8jqMzs7EbM6ljrw5nmLQGhq7cHIlVHHwtzq9dbZXfrPEcAN5qHX/HYWxHdz6O8oe0 Fwy7Jbll2gVqzVvnCnrEUvOeZc9gEigN5AIgewHr6jNZDGg1ahS/BsReMTbtFxlewTrj s1YuOIT5ArwJxN6td5DjcLTsR1lQbIClfsayTwnCKWJaAtlU/W5LeAu/2lxfpb7Gfe1d 3m5NlElVcD5UIZ1eICiAYTVMlc/ubTZE2zu956xBiR2Mvdvg24urjJJdeBmTaAzS0DVK Uj/3NfC9991li6Bo/1FkhSO1Csk/cKo4uaSq4tkqtgPaGAc94i80HRqNSONruQWejitr V9mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uOPZ6KP7; spf=pass (google.com: domain of linux-kernel+bounces-1966-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1966-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id mu3-20020a17090b388300b0028adf4a8694si5921459pjb.2.2023.12.15.18.52.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:52:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1966-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=uOPZ6KP7; spf=pass (google.com: domain of linux-kernel+bounces-1966-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1966-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 94C71B24A17 for ; Sat, 16 Dec 2023 02:50:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 850F110A1B; Sat, 16 Dec 2023 02:48:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uOPZ6KP7" X-Original-To: linux-kernel@vger.kernel.org Received: from out-175.mta1.migadu.com (out-175.mta1.migadu.com [95.215.58.175]) (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 5988E63B0 for ; Sat, 16 Dec 2023 02:48:50 +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=1702694928; 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=adc0sNIM7gQ4trdre1K6cbqGQoob6WcBiJ3dUIPudMk=; b=uOPZ6KP7ychMoKw8qtR/0qfWiQ8j9jkHkMD1SK35PVi+vFoj3X/OLCoqJUaIcYeIqu41/q ou7avzvpSAIlOW44jhZr4JYW24u6/QLdr8koxyghwIIaZLIQknvEo1WSBT50/ruKuYe0qj egaJK3764sLrvSCuHsyr5L9g/D8dUOU= 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 03/50] x86/lib/cache-smp.c: fix missing include Date: Fri, 15 Dec 2023 21:47:44 -0500 Message-ID: <20231216024834.3510073-4-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405242423068556 X-GMAIL-MSGID: 1785405242423068556 Signed-off-by: Kent Overstreet --- arch/x86/lib/cache-smp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/lib/cache-smp.c b/arch/x86/lib/cache-smp.c index 7c48ff4ae8d1..7af743bd3b13 100644 --- a/arch/x86/lib/cache-smp.c +++ b/arch/x86/lib/cache-smp.c @@ -1,4 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 +#include #include #include From patchwork Sat Dec 16 02:47:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4862dyi; Fri, 15 Dec 2023 18:52:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+BMiusoKBP/rN8utjxcNnGxzfs+sNgeneC/Z8WdVWg+zO9m8GmsZTRVXq7LUP1WHBXZzK X-Received: by 2002:a17:902:fc48:b0:1d0:6ffd:610b with SMTP id me8-20020a170902fc4800b001d06ffd610bmr16303869plb.45.1702695148165; Fri, 15 Dec 2023 18:52:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695148; cv=none; d=google.com; s=arc-20160816; b=LsCYcTZP/+ziuxady1IsfLqEQYweCrNP3LBTt/yRnL5HWn6i6fDPxhbLHRWmi+wr+K gTTzV6/NR+osPaXuDgoVGq7ZDxRZOq3OacOGC5MmNzeyXoXhixvubCuejtOrHz0U/NvB 5ZCvSZzuzLWKLE/AZbKaFfTjW3gUAtcvmaEw3WXCuNdyVXnfgYqR2K0DFD4kGkqVGsSV 3+RUkAZah8Bme8X7pWfMvkH3CfCD/8nvdWLPtxouyib3GLSCRtNzDrDh3bc9s73MLriQ fcZN/yXHtp3iKr7+r5sutvY+ntHbmKFYLiuRryXxcULS3uB6U5SztMyh5SXXEqQYbCLJ Rq0Q== 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=LdDylsPcIT4HoD7Qna+reqt9CJN5l5eWxgcFG+gKkmM=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=BfBVq94sV75Tp/TEjZYT969MmvvQpXAaVCO9ikXCjMM50DSAKjsF/YjA96S+xubFdj f93yGE42Z9BpnwjZ9E/vmsP0X0kJfuXArVuEs8NQLPT53OXuifBZmOyySxP8srXEKDri 5GHRnGu+hNHq/WcY7UVZI0JZW6mciRHG1NA5lhw2LKK5k+wS4wKRm+h6q7i1rs4ZWr2y A2fshpuazwQcLSCx9n1pAknL7J2lQmxF2zY2/eEd+WJjPg9gIZemsYJCjDgYDWbFUzXO wRYTOF6WHNDBtwC6PWGojVjm/z7GXWqRlPp+B8Sx1iwmXAaPsMMLj1nNPyoN2Ao8CFCT spKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iOUsKoZI; spf=pass (google.com: domain of linux-kernel+bounces-1967-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1967-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q16-20020a17090311d000b001d0750f2942si14280917plh.253.2023.12.15.18.52.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:52:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1967-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iOUsKoZI; spf=pass (google.com: domain of linux-kernel+bounces-1967-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1967-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 29CA5B24C33 for ; Sat, 16 Dec 2023 02:50:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5862A12B68; Sat, 16 Dec 2023 02:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="iOUsKoZI" X-Original-To: linux-kernel@vger.kernel.org Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 52AA8D511; Sat, 16 Dec 2023 02:48:52 +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=1702694930; 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=LdDylsPcIT4HoD7Qna+reqt9CJN5l5eWxgcFG+gKkmM=; b=iOUsKoZIueZJ8+8ZL4KpBkzEMwDWbeGvCFK4YLRgACbWAFXWzCLrOtQJ224j4aPhBoGVWU yT10/tJ37Y3nOP+jpRzhoqbkOKK0akO68H5DR9pdBPFziiD7uOM+jtsDyEYlXMuvhzB+7O 4+CjakPO56/xHYFePOBjd/xezHzjdqc= 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 04/50] x86/include/asm/debugreg.h: fix missing include Date: Fri, 15 Dec 2023 21:47:45 -0500 Message-ID: <20231216024834.3510073-5-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405267889362886 X-GMAIL-MSGID: 1785405267889362886 Signed-off-by: Kent Overstreet --- arch/x86/include/asm/debugreg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h index 66eb5e1ac4fb..0cec92c430cc 100644 --- a/arch/x86/include/asm/debugreg.h +++ b/arch/x86/include/asm/debugreg.h @@ -5,6 +5,7 @@ #include #include #include +#include DECLARE_PER_CPU(unsigned long, cpu_dr7); From patchwork Sat Dec 16 02:47:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179742 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4404dyi; Fri, 15 Dec 2023 18:50:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyc/18o/ThCnyN3lvkP+3CYKlb4cGMtfqSkzNfryXH09Dx+ogKD5YQ0/+0GSlNE176n31U X-Received: by 2002:a05:600c:358e:b0:40c:3277:d6ec with SMTP id p14-20020a05600c358e00b0040c3277d6ecmr6113824wmq.101.1702695038904; Fri, 15 Dec 2023 18:50:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695038; cv=none; d=google.com; s=arc-20160816; b=WIxT7lkcvx/NlT9dWxIPdqzDUUnfdE7NBzcls9TbttcHq9nyG2idtxf1S1XCHxXwIw GVRKGNoBTyST08E+FYFfJNEoiYgiyXVGRm83ChqNZ2nzsBHFEPDBQ0d3CZMfCu9298yC wVjB/jxVmasVEtmI+Q+sA/knwXdEEUjyVu3qM7zbhlNwMihCUZ2TNkQP4MYgPmmbldkx UBQ7QT+wPVk5V8CYD7hMjT78n3ITGhQ6BQlh11BgFi/ag3/NhaFGi5cY0q3N7Cz4FPPd OXXw5mmxfiOz2As9WltcorhsgQn3bdhVa1g8EVWGPh0jsgzxR4wFQMYyAb2B1/ncQm8S aQBw== 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=hn8CgzEBvGrODzIhyk4DxistahM/2O886gCo7SPf5oA=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=f7nbXbz75NY1WgV0eGlZfnkZorP553JS2ag4WCBywBshsnwdfq3I+e606Lrr6Z9lX/ +7KVr7Rz8+Vq99R6n12kseYQqAGk+cqE7tbV/cGFRd3fckm2RlmCVFpP0whI1yvs1isV 39NYu8JuxAzCiipiSXsdxTnjIWDL1mzS36NQ3sUylVMxiGSeNWQoXIHD1YPzT9ynuiei eHs6GuKMAq7dsWHwxBmHXyLMyO+MWuTd31WmZ/8vbbFxHpzRGxfGah5sELcstDrBfBkX Pp0xj63Nyw6sXyO/LdJseb5lvqU1nO/dUACMylDCQpWwlZ+KomlrIYIlLD6wLfaqEEYR su3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=S4wma9jM; spf=pass (google.com: domain of linux-kernel+bounces-1968-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1968-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z26-20020a170906241a00b009ddb89a9967si7972376eja.139.2023.12.15.18.50.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:50:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1968-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=S4wma9jM; spf=pass (google.com: domain of linux-kernel+bounces-1968-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1968-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 842EC1F2549B for ; Sat, 16 Dec 2023 02:50:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5275313FF1; Sat, 16 Dec 2023 02:48:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="S4wma9jM" X-Original-To: linux-kernel@vger.kernel.org Received: from out-176.mta1.migadu.com (out-176.mta1.migadu.com [95.215.58.176]) (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 534F910A02 for ; Sat, 16 Dec 2023 02:48:54 +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=1702694932; 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=hn8CgzEBvGrODzIhyk4DxistahM/2O886gCo7SPf5oA=; b=S4wma9jMnPuCBA2BSGYB1FGOlOS+xQ9MEuaFIh/mHtX5NQgIdh7WEe7r87Z00oysIJ+Sv/ q3Qk40h2wTaIUS2L4eZcYQOPjR+76qbPPBc+vo4zL3C2rToHR+mvHMjiuJwzxnAUnyAxe0 zMBaqwyyIPXirXUqKU4X4kidM+olhFM= 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 05/50] x86/include/asm/paravirt_types.h: fix missing include Date: Fri, 15 Dec 2023 21:47:46 -0500 Message-ID: <20231216024834.3510073-6-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405152893554150 X-GMAIL-MSGID: 1785405152893554150 Signed-off-by: Kent Overstreet --- arch/x86/include/asm/paravirt_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 772d03487520..3cfcd5db083b 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_types.h @@ -3,6 +3,8 @@ #define _ASM_X86_PARAVIRT_TYPES_H #ifndef __ASSEMBLY__ +#include + /* These all sit in the .parainstructions section to tell us what to patch. */ struct paravirt_patch_site { u8 *instr; /* original instructions */ From patchwork Sat Dec 16 02:47:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179743 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4472dyi; Fri, 15 Dec 2023 18:50:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHt0x4ejMYhAYb3JPcMm1w5S+Gll5WqAeptQpDtkirscqEnKhFFLQxSJv+hO0zQUab3gxl9 X-Received: by 2002:a0c:c48b:0:b0:67a:a721:82f1 with SMTP id u11-20020a0cc48b000000b0067aa72182f1mr11789225qvi.75.1702695056457; Fri, 15 Dec 2023 18:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695056; cv=none; d=google.com; s=arc-20160816; b=PuHj3r2I3Hqd9FqZQE/IaXYWxUqXSOqdoIYLMyjMQ10+SBg/fQOpwVqxnCkvjtOphO lBEZyF3fn3ZB+mTZUA2A8/gexhx+K7IKp3NtFuhjEosVf/lvVt3FKzSwFDBp3aJCvTE0 ADKY8mVJbKbbXyWB/eh82/HXy9RaWxZA5XwxjED0I3k3hRcajrOBP74kbsg7fk6ffYvP rBd3HN1ZwHZHG8okO1kTGJle/5DTLx4/BJ1ydd3oVYiYONh0XA7S4T9x0FPXfhLS9u/i VjnM9G6LjvFT8wMr6T/INWqxjLmPPdPq3B4fnXeTJ3kn5u59OTq3dXV0yQkEL6AXkexq m3kA== 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=dirJbIBYBbwICI4HG2MDe2+uXbYG1jRUJZWkMhaKse4=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=yYTvhvZVWp4wJjnaZIDCKO+kWnP/9FBGJHhe3tWB9bQ6dwQ4skfs6RO/bxRi2bW5Sa 1sIC7Y5TTB7LaSwaibakGKcRZ+iu0Cul1l30jOjfj3p/ptOHayIxzqqrsZrCY5qW5WeD qARG4S0RcCpDM09THi8ioVylznaQuucnzdvkPEVeBA6eupcbtUqPGWcF0Ut2TaiiDew8 crp/BxolXjPnZVH3BDeuapElpTJHb2lvBa7KKT8nhgu78u2LtenaGRCcWMtYFgfbE62e sm1mE6YaXuk2HMe3FD9cRGI5etMPBIZk/fJ7glHUNKSsm+sM6aEqbEeWpTCdTpvcAu2h Pwng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="C/t1fpiB"; spf=pass (google.com: domain of linux-kernel+bounces-1969-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1969-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h13-20020a0cf20d000000b0067f0761cbfesi5428890qvk.496.2023.12.15.18.50.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:50:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1969-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="C/t1fpiB"; spf=pass (google.com: domain of linux-kernel+bounces-1969-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1969-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 432511C23045 for ; Sat, 16 Dec 2023 02:50:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55CED156FB; Sat, 16 Dec 2023 02:49:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="C/t1fpiB" X-Original-To: linux-kernel@vger.kernel.org Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (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 25F8D125B4 for ; Sat, 16 Dec 2023 02:48:55 +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=1702694934; 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=dirJbIBYBbwICI4HG2MDe2+uXbYG1jRUJZWkMhaKse4=; b=C/t1fpiBdM4bKT/cXDHIACveKwqIAMw7X1VW35xI28bBG0JOo60HYOoaWgMkz+Q0hKlDIc Vi4CuIr9fuiX0y5hio/M75U2WWQzOCioAyle3CdTe/xTt+GJxcykSwlv7rtzSZI3kDC4zW z3drT2Q2XabyOKUS78U6CCb+PfxmA8s= 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 06/50] task_stack.h: add missing include Date: Fri, 15 Dec 2023 21:47:47 -0500 Message-ID: <20231216024834.3510073-7-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405171621629859 X-GMAIL-MSGID: 1785405171621629859 Signed-off-by: Kent Overstreet --- include/linux/sched/task_stack.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/sched/task_stack.h b/include/linux/sched/task_stack.h index f158b025c175..ccd72b978e1f 100644 --- a/include/linux/sched/task_stack.h +++ b/include/linux/sched/task_stack.h @@ -8,6 +8,7 @@ #include #include +#include #ifdef CONFIG_THREAD_INFO_IN_TASK From patchwork Sat Dec 16 02:47:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179749 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp5130dyi; Fri, 15 Dec 2023 18:53:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEPVuyrzVwp5614usAjD0fnyO6TzLf+W+LHO6QiAzOz5eHQ8ptXUYPFsWn5Q2U6y5MRrZHm X-Received: by 2002:a05:6870:41ca:b0:1fb:648:520f with SMTP id z10-20020a05687041ca00b001fb0648520fmr14017749oac.1.1702695219865; Fri, 15 Dec 2023 18:53:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695219; cv=none; d=google.com; s=arc-20160816; b=AuTluD42egHPlksZQgp7yHWpKQWYvHlEk5gZZjxPKfEtyQnjPXJ0wtNTfylTHyvXTh pkVLn7eVDHzZNftVly/CpAJ1chKmZAXpAlwlWW77iuEVhpq30V4SxPmguiriLYuuQlm/ RhISU7GSgc49sL9QmVmbZxgTfSB/lQozicaP+BK3ux5dRVIBN/HeALSct2wT8Gx4tJ8d 21Pe41q0hJEn3NImPATl5Kk/U7HMpQDCBdBs+jap50NuPg3uU4OxK1d15CI2yRhF4lVq Rpjg8wNJO5/2B1qMdfhJN2z85PIKRsl/pvcWKRljMaFP2GuGu0JSfxlklyroXY4yUdwp P8EQ== 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=JFJDIdtuotmIE37QAtPpvf0GFZ4wui0KRlxF/kj4A8Y=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=UW1KDEA0m2fzyZgaFx9xfs90WOr664QLK7LUREdjAB0jiBmzYseilewPATe2+XSrvw zmxfkkfITb11ZRA5HQW6CcXhgRJde9bfwSqPRSib2+ytgy2HyrsmgkZS+febGmCtvE9L XZvtD9f10y5Vz68EAyHYib2RRzbdAp7Kz53as4i6VNvu7ruiLadRae1BoDlJA879//Za TJ5PGVl4W8uN7fHvF8WRTjvGf10Y+35SlTY0SAvCPe5iV5+iWeXdJB9lzXgXvse+yEZu Pzt9Nx7Y0Z/2Up9hm56y+IRZdbh9c1ewyxQdGM3OrSUR8JLrPQF8F9eTOmobcXruGSEw G3mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=E5TOS+zz; spf=pass (google.com: domain of linux-kernel+bounces-1970-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1970-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l16-20020a635b50000000b005cd6df936a9si1186885pgm.601.2023.12.15.18.53.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:53:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1970-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=E5TOS+zz; spf=pass (google.com: domain of linux-kernel+bounces-1970-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1970-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 85E32B233C1 for ; Sat, 16 Dec 2023 02:51:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2108163B0; Sat, 16 Dec 2023 02:49:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="E5TOS+zz" X-Original-To: linux-kernel@vger.kernel.org Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 1819C13AD6 for ; Sat, 16 Dec 2023 02:48:57 +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=1702694936; 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=JFJDIdtuotmIE37QAtPpvf0GFZ4wui0KRlxF/kj4A8Y=; b=E5TOS+zzwHxDMZr0qGILzsmsu2z5sXZ+KynrihtXY9WWFP97rdVx1Wa6+XQm9X/VJ7z5+R ztYZL3TcmTXvxqoFwA/JQcbXzPAGaEaXj6H0mketIq+hqbvN4x13KO+J55w7f74vvP79eu GNSTXpff1Z0o9Uw3fIy+k9LxiNzCnAc= 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 07/50] nsproxy.h: add missing include Date: Fri, 15 Dec 2023 21:47:48 -0500 Message-ID: <20231216024834.3510073-8-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405342887338691 X-GMAIL-MSGID: 1785405342887338691 Signed-off-by: Kent Overstreet --- include/linux/nsproxy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index 771cb0285872..5601d14e2886 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h @@ -2,6 +2,7 @@ #ifndef _LINUX_NSPROXY_H #define _LINUX_NSPROXY_H +#include #include #include From patchwork Sat Dec 16 02:47:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179744 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4643dyi; Fri, 15 Dec 2023 18:51:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEaewsVTghL2oF7F45lJAM+dNhvLnDPVhI0As1ZfjUUEDAZYVvaQWHzsRPoltMZ6m5fzk1Y X-Received: by 2002:a05:6402:1e87:b0:54d:9782:c3db with SMTP id f7-20020a0564021e8700b0054d9782c3dbmr6373735edf.84.1702695090231; Fri, 15 Dec 2023 18:51:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695090; cv=none; d=google.com; s=arc-20160816; b=bIGf1I7/y4QAQjMgjbiaAOIH0INTRpuvnW3z/gPamzcJBWXKfaegX8uHi2qztrc5zh Nco0+6mIcJLpPTmx1lVDs5N5Zv/Nq4xP6DdNdcYWWaZjiGaVdgJ/49Uv4LmZkttZgrRa Ll5tIweWOx9Qljt2AoOMWBwLmtB6lGXMOKkhLLU4Kkq8CVu82HEHZ1Qx9k3IAgTtwFDd 7kg88NK4pebLcrPg3bd/kWIBLEuK6Nl1Mdo7IVQmGyrOscTDBYx27xoGWcGurg0hz102 vgbqJ8W37hIQ6ulO6ea4YINM5VV58bBXw9abnAvhuP7vt62I+Hoj8uesmHHcHi5T1Ddq bzOw== 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=9EFmOyXk3truVIn0SSWZ4cc9kvqJ/ykNAgWR9ge7mnc=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=bZaoe95mq649rWylawUJh77oAqCubAJ0+ud7P8F52pTl5go5FSD+UeUhrBDPvMEL/N 2jxCoQ2FaS7OXtuuFxda8bhk3nd0BEJRwfG13OkcO3rKWGbXq6h53KJyI1Gf2sOxeQtc 8b/UD/kFPOzPmFCznEu7rIXWbEQYeesuGNgtBYHe5aTZ6i5HvILsUALgDZ7Ddhv/p8Gp exTipNp78rWzipVeowIgQnuODoJ4lWUgmJLYRep8F5fdnF57C3Z9NiifdUftsOjluJGp wKFHyezKymVtUewZmopvUhtflkDYUosQZyWeadO12LVHbAyWG8M4DxMgtvO+WW+mcuid SDfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dJfFOWnu; spf=pass (google.com: domain of linux-kernel+bounces-1971-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1971-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id b15-20020a509f0f000000b00552df5700e8si773386edf.276.2023.12.15.18.51.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:51:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1971-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=dJfFOWnu; spf=pass (google.com: domain of linux-kernel+bounces-1971-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1971-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id D8B061F25445 for ; Sat, 16 Dec 2023 02:51:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2B8018E03; Sat, 16 Dec 2023 02:49:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="dJfFOWnu" X-Original-To: linux-kernel@vger.kernel.org Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 E1FB214AAE for ; Sat, 16 Dec 2023 02:48:59 +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=1702694938; 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=9EFmOyXk3truVIn0SSWZ4cc9kvqJ/ykNAgWR9ge7mnc=; b=dJfFOWnuTMPLbFxhvXAvw3peecXAVwE0hO8//NmIMYwpmpbtkCCwXiY0vx/QM68+EvJ+H5 CIbNuabBcu6kt+JNkDAxNXePrrJB+3tbKZvnsxh76L17MwHJgNWtwOuTok0lWHt3DGM2er /C9565y/ZA387MRGhIvzNDjDWy4k1QY= 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 08/50] kernel/fork.c: add missing include Date: Fri, 15 Dec 2023 21:47:49 -0500 Message-ID: <20231216024834.3510073-9-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405206907820213 X-GMAIL-MSGID: 1785405206907820213 Signed-off-by: Kent Overstreet --- kernel/fork.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/fork.c b/kernel/fork.c index 10917c3e1f03..319e61297bfb 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include From patchwork Sat Dec 16 02:47:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4694dyi; Fri, 15 Dec 2023 18:51:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGd2y/aXOhXpuv9f4vvg58MtOcEt0ThVRhG1EjC87VOXOFI/VI1PioC/tOGC06GN7eUxaeG X-Received: by 2002:a05:6a20:43a9:b0:18f:9c4:d348 with SMTP id i41-20020a056a2043a900b0018f09c4d348mr20763679pzl.56.1702695105611; Fri, 15 Dec 2023 18:51:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695105; cv=none; d=google.com; s=arc-20160816; b=mRVq2FXkgiNZeKieJwSyZUwni8oL5p75nsuEKun/62vS3rhOjuXVClVuZ6DCUV5TEX 9x4Juwm8PYD0Ql7Wkpf/xXx4e0lUcx+yIe87FiLdjb8qxq1H7ZOeE5kWpyCcwgBCXtQK dz+Z+YnWXyTUTJkeGBtWkH42Jc0ytp0pLwymY8p+Vo2DAouvAwYVRjqkSXVdJOlwst/m LBPfVtqTkjX2JoygV2triOMGVDQIkBvswzdE1YXhCaunf+Ncnh1/OaJz8q/ZsqJqX36O /m5Wqop1E3sHGqSt/0108J2EmAAGtakArFBP3JqusTyLG0X0JJizx9c15yQ0cDg2k2yK 08Xw== 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=HxH+H0107hjibgkywFp3x+1IHPwHRqbNS2KeHk+xfq0=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=xhW5i/edbBJhqkpwnsuAFnAnSM0BKmEczVYyT1JgPBnD51DNzAQUFr0IldlA4n5jo9 Jl5vNyafjq1DSfGVv8W0vYq4erm5djYCly+Z0PmfdtoBTN1Yi/55/0pR17XbQczAAvKp i5HYoan0S99l9L+uqAcfQEP6X4lrW6BgkcBafCbX6tigCtMWsQQFqhsb2Ab8+i09jQnA e4ReMEvOgVzYomdkjsWMpsAE5rfHvmpNfWkm29ZP9ih85jvRI9V+N0Mza4Ma5rTtRAtF aXsESoup1OVsQ7xUmvpmpkI6ChkPcAU1ambhvL+NLlZlphpAWN6Jd3Hqp7l+J7wqL0Gx oWMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wEE5wt9H; spf=pass (google.com: domain of linux-kernel+bounces-1972-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1972-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id j11-20020a056a00174b00b006cd84368e8dsi13800330pfc.190.2023.12.15.18.51.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:51:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1972-ouuuleilei=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=wEE5wt9H; spf=pass (google.com: domain of linux-kernel+bounces-1972-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1972-ouuuleilei=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 69379284F7B for ; Sat, 16 Dec 2023 02:51:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBE0019BA6; Sat, 16 Dec 2023 02:49:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wEE5wt9H" X-Original-To: linux-kernel@vger.kernel.org Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 B8C031C38 for ; Sat, 16 Dec 2023 02:49:01 +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=1702694940; 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=HxH+H0107hjibgkywFp3x+1IHPwHRqbNS2KeHk+xfq0=; b=wEE5wt9HNszQnayjEwAnODC7KU6iCfZWFIu5NBB0pVDY59pdBF3YgAwk7oRGjwDgtXXH6q 41MYSqRHHvopTKCgEQ6jFgXItfVsfRAhiz/j/A0NqoQmdvteeBT1DmfxZCvu+yWW2IRBWB X5zGRl6pLcslH1kpeG0opt3GZ8/9q5M= 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 09/50] kmsan: add missing types.h dependency Date: Fri, 15 Dec 2023 21:47:50 -0500 Message-ID: <20231216024834.3510073-10-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405223456127733 X-GMAIL-MSGID: 1785405223456127733 more header dependency pruning/fixing Signed-off-by: Kent Overstreet --- include/linux/kmsan_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/kmsan_types.h b/include/linux/kmsan_types.h index 8bfa6c98176d..929287981afe 100644 --- a/include/linux/kmsan_types.h +++ b/include/linux/kmsan_types.h @@ -9,6 +9,8 @@ #ifndef _LINUX_KMSAN_TYPES_H #define _LINUX_KMSAN_TYPES_H +#include + /* These constants are defined in the MSan LLVM instrumentation pass. */ #define KMSAN_RETVAL_SIZE 800 #define KMSAN_PARAM_SIZE 800 From patchwork Sat Dec 16 02:47:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp4735dyi; Fri, 15 Dec 2023 18:51:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IH8mwOC8DkNRYN6r+ctPACyMFizxsZ1gNzqXVEInzs9K3rSKLJ+V6mZJV0AacARG8BMVDB8 X-Received: by 2002:a05:6870:a70c:b0:203:a7f:f91a with SMTP id g12-20020a056870a70c00b002030a7ff91amr7529102oam.46.1702695115783; Fri, 15 Dec 2023 18:51:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702695115; cv=none; d=google.com; s=arc-20160816; b=Mg8pVgS66vvXIfGkTje/Xp9cFlvmpgoZDBoRYowdqJ+AmVGAh/Kgb0P4E43Xt4b79G Fb6DigMPTxFb3paPj+FbWmk2QPu3cWBcASDarlxVQy/qucQyuxzQTL630TQ4R5dlpg6q q1Z2lQ1JmEebPU1zNNemoM84mJk+n76V+cKpczXPMoYcHvLDZfg3mvjpiZXZMcfdZo/Z 7DPSIhCRh5eUFs0kONYbx8d5Vp7oamQ5HRDKoTVfMOaeDHYt9goF4VgY9oQa/Xcqs6J0 y+AO+dNYJJ8RhasVkr1gZAeWoRMR8hItqPy9CKOupMg/xZHohRuERwsFxOkWjccKD4PG Wbqg== 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=Rzbscw4SjBD7ZmHTc/t5DfuqtQ1cfZWoRd1y9g+u0AA=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=QPfCXMCyu7qwlMnk6qzLbzWNVkO0Ni/QAN1atr4RLILCj+ZASxA2UU7qrKH4uCEcuT 7q+thlxNzfFIJMIp7gWBoJ2jFC5v2HyluEY5TaJUv7XE3ahwcDCTCLSZv4epKmiFc1w+ m+Ar5uFsBDzhs2cs15lmTKtGiJJVc8hRNyVCtOCPxDARpe7/pkOl1ZfXaXZOM2Zy6IMZ ohXNhhRCDusmenOYAJLWHLbVj3KLE+rt6xAvyLWhWjkDBK4uIcJ+P7l+sTR8reEL+s/K wkdrhiQAmMYbXYu8quzVrIcYGO78TCHf1Nqy1nP3dx0mdlIgrCBr7KOTHylRkHaAjvmT zKtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=BLwqIfRA; spf=pass (google.com: domain of linux-kernel+bounces-1973-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1973-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bk5-20020a056a02028500b005c67398f70fsi14628873pgb.379.2023.12.15.18.51.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 18:51:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1973-ouuuleilei=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=BLwqIfRA; spf=pass (google.com: domain of linux-kernel+bounces-1973-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1973-ouuuleilei=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 82D172857D9 for ; Sat, 16 Dec 2023 02:51:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A51951DA35; Sat, 16 Dec 2023 02:49:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="BLwqIfRA" X-Original-To: linux-kernel@vger.kernel.org Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 941F9182A3 for ; Sat, 16 Dec 2023 02:49:03 +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=1702694942; 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=Rzbscw4SjBD7ZmHTc/t5DfuqtQ1cfZWoRd1y9g+u0AA=; b=BLwqIfRADkN2dj5GxMxK7pEsoQEnYVvxGx1wx5dzhc1ybVrS6Iv5ntHu0PHZZWRL9nuW8S kWIhXZJAze5nHRI/a5C96dyI/wnzyIbEREtlA0LSZqhObWqkH97KJEa88dvALyp7vHUoNm h70yki8k6xBP9x1SGlP6Eu/Ulq1IjaA= 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 10/50] time_namespace.h: fix missing include Date: Fri, 15 Dec 2023 21:47:51 -0500 Message-ID: <20231216024834.3510073-11-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785405233684246928 X-GMAIL-MSGID: 1785405233684246928 Signed-off-by: Kent Overstreet --- include/linux/time_namespace.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h index 03d9c5ac01d1..5258d81cef17 100644 --- a/include/linux/time_namespace.h +++ b/include/linux/time_namespace.h @@ -7,6 +7,7 @@ #include #include #include +#include struct user_namespace; extern struct user_namespace init_user_ns; From patchwork Sat Dec 16 03:26:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179752 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15154dyi; Fri, 15 Dec 2023 19:27:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyCIvaPJBNLyVncLZkRF82RZJNuJX0OVZfFux9Ra0fWnuvor8pDFpy4iQlB1iUhhjomFa3 X-Received: by 2002:a17:902:6b08:b0:1d3:481e:4fe0 with SMTP id o8-20020a1709026b0800b001d3481e4fe0mr6756522plk.10.1702697250300; Fri, 15 Dec 2023 19:27:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697250; cv=none; d=google.com; s=arc-20160816; b=xYARro2OkH6yKWeTXg6xCoJWF3Wcp5K11At34E4bg6Np8DAzfH2ShiKsS0H9Gb3Ado MBpF04X8LwsKuInVnvu21NNHywW3+/a1HMZFhdsew/svHpUAtg7KSfvmUes1s1tF1WB9 8sBLYRbMAr1LX9BKfglNTwHagp8DMpP/K3rlXs0H1wTcL67J2qWz8dTTFYJc89zh/Lb7 +TGUsn6KLdVErIvDm2p3m0CL6INYHyhhvnHHR9Dwmc4pzSb0uTyt9dlPJC+tt9oF1DLx dYhyXrw88sSfu08t1xc5fmoxNaqEL/Z+xtvMx8AUYIRY+W5l7vYEdBNgjDu6MrXJGbfw 4EdQ== 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=RMwo6myaXRyuD1n4NvzHCIXzldbeB8yBA+xdZ14Nwyc=; fh=UHNV9TZK4dO3ZOCeSzLqPpHLc+1b0gW9vBA4UD4scoU=; b=f1KIkj2x6SRROTuXDi/LBVkqJSE4UTurZyLM+9SUmzcwo3qsjZJtSU0KcZkqfIlocl VUYBYtak0MKTaX1EVZRF+4Y64Xr+P7YLdFRQwgox1FVh95ua9duyZSKwIa0EiLds9UHQ TbNqKHGBQKvmc7BZppAMNOT+fsrLMBxR6Nw3P1Tv9E3iR4fMoPCIfIDlT4NaisYzClxg CVavxfFCbgZCATa5r8UrCHOCzptCDvfIgquVaAwnES/eaGPTZ6e1ZNnsBsmR11OhI8jQ wIBatePLOg/apqHME3VniPovf0RasRDo0FvMDTwq0CqbTcefRsjIsZEl4OqoKbWmI80U cz9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ovqC1DSv; spf=pass (google.com: domain of linux-kernel+bounces-1986-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1986-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q22-20020a656256000000b005ca1286f8f6si9628596pgv.808.2023.12.15.19.27.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:27:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1986-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ovqC1DSv; spf=pass (google.com: domain of linux-kernel+bounces-1986-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1986-ouuuleilei=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 07C842863CC for ; Sat, 16 Dec 2023 03:27:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AAB6107B6; Sat, 16 Dec 2023 03:27:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ovqC1DSv" X-Original-To: linux-kernel@vger.kernel.org Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 A73AA6FA0 for ; Sat, 16 Dec 2023 03:27:03 +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=1702697221; 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=RMwo6myaXRyuD1n4NvzHCIXzldbeB8yBA+xdZ14Nwyc=; b=ovqC1DSvbgM/1s5GkmtuCtJNGdL8TPYFUK5YmVn4jRfFeWqCuJL5Acyws9kIwpkxNgCn+d x+Mdp8cvc+d+WyofC+s1CNtzGDpTiDqHaHce17A9JvvP+9kisqtULP5xGiHpVGFEbCCxDX PLjzDLBu7InjnmFzG5vMi+jv2WO3KEo= 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, Suren Baghdasaryan Subject: [PATCH 11/50] nodemask: Split out include/linux/nodemask_types.h Date: Fri, 15 Dec 2023 22:26:10 -0500 Message-ID: <20231216032651.3553101-1-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407471603182637 X-GMAIL-MSGID: 1785407471603182637 sched.h, which defines task_struct, needs nodemask_t - but sched.h is a frequently used header and ideally shouldn't be pulling in any more code that it needs to. This splits out nodemask_types.h which has the definition sched.h needs, which will avoid a circular header dependency in the alloc tagging patch series, and as a bonus should speed up kernel build times. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan Cc: Ingo Molnar Cc: Peter Zijlstra --- include/linux/nodemask.h | 2 +- include/linux/nodemask_types.h | 10 ++++++++++ include/linux/sched.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 include/linux/nodemask_types.h diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h index 8d07116caaf1..b61438313a73 100644 --- a/include/linux/nodemask.h +++ b/include/linux/nodemask.h @@ -93,10 +93,10 @@ #include #include #include +#include #include #include -typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; extern nodemask_t _unused_nodemask_arg_; /** diff --git a/include/linux/nodemask_types.h b/include/linux/nodemask_types.h new file mode 100644 index 000000000000..6b28d97ea6ed --- /dev/null +++ b/include/linux/nodemask_types.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_NODEMASK_TYPES_H +#define __LINUX_NODEMASK_TYPES_H + +#include +#include + +typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t; + +#endif /* __LINUX_NODEMASK_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 292c31697248..5a5b7b122682 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Sat Dec 16 03:26:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179753 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15219dyi; Fri, 15 Dec 2023 19:27:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPj5PqEKQn2H49YIa50Qd7/ByvW3MHwuzgPFS//SxJAJY/LvGC99zek2BCO52SaYJHldYV X-Received: by 2002:a05:6214:16f:b0:67a:db6e:cf5b with SMTP id y15-20020a056214016f00b0067adb6ecf5bmr13309687qvs.19.1702697264829; Fri, 15 Dec 2023 19:27:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697264; cv=none; d=google.com; s=arc-20160816; b=g4htpeg2Had+8mDSOCoj8ad5DAUwwFzVbHI3+80u/lWt6w4DzTBaeOV77XUQM0ZuTI A653tgdy/p2dATvXDjJXGWJgS5N+ABAu3oCwrO+waWTGC0VUOEKGUw2vWXkeMZ1YqMNw 7jtAQzqbV9OQfNEA8oN3Vm0yRyvbQgSr/yiMy+NjoPCZlG36sxN45xu6yFmQBbrzU080 rvU8ZxrGPtS7vSYMVD6zDrIy6B2FDMc+OpRPi8twCWOCDcePhzn9rNxSMCSW7VUH3J+m fRkLe5Jab8TY22oz8Yi/xR2nsSy6T0vWxtPdQ9/OAh5xtdpmiqV7tOt86SkEhVgQJL4A 7OYw== 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=QDPDnE/n3acaAH2Hi2C6UZBa9A2W+MdxbP8jgc4Vp4w=; fh=UHNV9TZK4dO3ZOCeSzLqPpHLc+1b0gW9vBA4UD4scoU=; b=pq9dG7DFGTFNSbmoBgLpacPr6Y70Jnt7EbSr1gt/w0E69d/BbVZngJT0+dzkdsr1hJ BXnU4Cfcvt+uIPqxgSKcEuOShcgwh3vlV2NaxQi4W3VOoNNxVTdACuAXeNXcTOtqdGz+ BDhs6IFKlFpC/DN1k3SUDGTLzisS8yTc/vFTM9cGN5180XHa3sQ+YKshXz5Lmkd28kOU lCSnkAQc0Br8CxnV35LVLaTcza4B5jXaZHnW+t+N4HzmbjhqYI/Ue5Cxn0H5jHppFHlD vrcz9qeWudn1WBXeSeK2bYfGRVRkoguNaEbUy4PYW1TFeyCAh9NNvZp5htVqm5o0Bwvj dWhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Kh8Zz0zS; spf=pass (google.com: domain of linux-kernel+bounces-1987-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1987-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g5-20020a0ce4c5000000b0067f2a09a20csi169963qvm.487.2023.12.15.19.27.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:27:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1987-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Kh8Zz0zS; spf=pass (google.com: domain of linux-kernel+bounces-1987-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1987-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9E8A81C24725 for ; Sat, 16 Dec 2023 03:27:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDB8E111AD; Sat, 16 Dec 2023 03:27:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Kh8Zz0zS" X-Original-To: linux-kernel@vger.kernel.org Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 6D7396FCD for ; Sat, 16 Dec 2023 03:27:05 +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=1702697223; 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=QDPDnE/n3acaAH2Hi2C6UZBa9A2W+MdxbP8jgc4Vp4w=; b=Kh8Zz0zSVSO6t3QRCM0Q+ZaREhBd11qlcyiMp/lXjtRiQu4MVjyohcgZqxqXgj0W4CT/J3 yNBqYQCMBQcoijIjfcKzBmgz1djKE0nU/b08jNyfpEWKZErgI1Z3evP4+7bZl10wWaWjZV V3xUaZN3wreslTrvrNMw/8CQ5BOB+XY= 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, Suren Baghdasaryan Subject: [PATCH 12/50] prandom: Remove unused include Date: Fri, 15 Dec 2023 22:26:11 -0500 Message-ID: <20231216032651.3553101-2-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407487012997962 X-GMAIL-MSGID: 1785407487012997962 prandom.h doesn't use percpu.h - this fixes some circular header issues. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan --- include/linux/prandom.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/prandom.h b/include/linux/prandom.h index f2ed5b72b3d6..f7f1e5251c67 100644 --- a/include/linux/prandom.h +++ b/include/linux/prandom.h @@ -10,7 +10,6 @@ #include #include -#include #include struct rnd_state { From patchwork Sat Dec 16 03:26:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179754 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15272dyi; Fri, 15 Dec 2023 19:27:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyen+Rmi5/Zh32rLlHHSjMmE78JkvplRD4LrVgYeMzQJy4N/FIv386zCv7vMobe3hz3Wuv X-Received: by 2002:a05:600c:4591:b0:40c:6c80:c229 with SMTP id r17-20020a05600c459100b0040c6c80c229mr880801wmo.19.1702697279277; Fri, 15 Dec 2023 19:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697279; cv=none; d=google.com; s=arc-20160816; b=IjmgffIEOxQkQvNH61UnenxTY5/OdSxc/O3T20bz+bKucEN1gSOtf3d6I2qTYrbQd5 glr+4gKEavBuM2IjdiB3ehXX7uvlJDcbVx04CICgbqnI89MEayeEvrxNS2PGuQFqGqsv 3eV2MfVyhPqop0Ofo4/mRPqn2hEUkIK+F9hQARznSDeoqJH2SS9w33IwqutjD7IV/We0 ayAl5kzyqDKeJhdrVx9un9mJ35d3QMzwdTHAIPPf/xu+xLRGT9FQODOIgV9c0yqS1+mh Ctxafr9mF87wCsotb3HJbMGLQQs6dZ2mcxXNsDqieEr59qfC7AltuDsRtGcrTdoucqPt 4Y7w== 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=+Zwt6cEz94Tvha2iFlfdO0VycCniggIMuLqZgtvPOAE=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=KJkYZrXrPyOkPooUVOQAl8ED/92YIkXgruRQpl+uC0S7YNUc1vd0xonbvVGcOn8J41 TAQdH4XZzI/8E5QBDuMYHzJxWksn83apeuZr2SMOyVRV/hXB5LlCTnadrvbmWnykkU0+ 3RUGlCyCWSdm3C827iKZwZ8wYs+mpHGZkILqw0khsvij5YsZTbHrnmqvxA24QHJi51qA Xn5k6JkoHv/6cVUzZr5kQqEvbRID+/p5zY3lxLKyFjP1nNW8JgHs+tjGoZ3n+VHJxmhG h1m2HRJbcCDQQMYRjS8xJ91829X8QuvGsfhax51yezlF+yYTYUnO9ibKGleRcB9zgHxO AdFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=up1ib+SV; spf=pass (google.com: domain of linux-kernel+bounces-1988-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1988-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ec12-20020a170906b6cc00b00a1fad9ea39asi4980982ejb.530.2023.12.15.19.27.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:27:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1988-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=up1ib+SV; spf=pass (google.com: domain of linux-kernel+bounces-1988-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1988-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id DE5651F25845 for ; Sat, 16 Dec 2023 03:27:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 85AF212E5C; Sat, 16 Dec 2023 03:27:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="up1ib+SV" X-Original-To: linux-kernel@vger.kernel.org Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 494BFD532 for ; Sat, 16 Dec 2023 03:27:07 +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=1702697225; 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=+Zwt6cEz94Tvha2iFlfdO0VycCniggIMuLqZgtvPOAE=; b=up1ib+SVIj6lwWvIF/lfxUeLm5s0Rjmj6+0NWpwR3ynTX164ZbEM30SjhTePskf+DoGhxC 2TfdnK+dBZiduWXPVEqOaaSQmY36LM3kkY1q7rVSGHjMdW9UawKyPYuM/QZ/eyRlfjzvoE mFjqIWawpfnhrayBjF6BKnHh7qM0BkM= 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 13/50] timekeeping: Kill percpu.h dependency Date: Fri, 15 Dec 2023 22:26:12 -0500 Message-ID: <20231216032651.3553101-3-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407502232700497 X-GMAIL-MSGID: 1785407502232700497 Slimming down recursive header includes. Signed-off-by: Kent Overstreet Cc: Thomas Gleixner --- include/linux/hrtimer.h | 2 +- include/linux/time_namespace.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index f2044d5a652b..02d264ca9dce 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/time_namespace.h b/include/linux/time_namespace.h index 5258d81cef17..876e31b4461d 100644 --- a/include/linux/time_namespace.h +++ b/include/linux/time_namespace.h @@ -12,6 +12,8 @@ struct user_namespace; extern struct user_namespace init_user_ns; +struct vm_area_struct; + struct timens_offsets { struct timespec64 monotonic; struct timespec64 boottime; From patchwork Sat Dec 16 03:26:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179755 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15327dyi; Fri, 15 Dec 2023 19:28:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJJhu6dSSFDeOb/v2BbahYx5pLwXWebIEY0WwBFCeT7xjr2Dhm+EutT6jtQnWnG53HDLiO X-Received: by 2002:a0c:fb09:0:b0:67e:fa34:42db with SMTP id c9-20020a0cfb09000000b0067efa3442dbmr5849507qvp.85.1702697295129; Fri, 15 Dec 2023 19:28:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697295; cv=none; d=google.com; s=arc-20160816; b=DoAiWYN/qWXDlui3WEvtIzvb0wEXc89stP0fjRHhI7zlozh909D5vupXRLPjswSkzd xnDx0163rAwy+raPOslCUrDWBgd2e5DjHZr3O0yTqpEldaatCJhGa2mfxocTK9x4wRcq 99u0VNGHSAKImz3IHJpzDCsgtJLtX6MtG3LQLd0kcUFezHFVQxvE0+iDewcyvh0yNbLd Ji+Fek+pnCZ0hOjd5rhL1clEyHpgnUGshe/vPjmOGBMpj/ngB9RKqkXQpn3NogCPlpUu ZKXu//MIc3ZnqRwjVJGMBued5sjRdmLMOK5d6LAW0mBbbeSBXLnvlv8ITvlsqdBBSH1R 1JbA== 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=zpoxfZnH1zvydvdDW1QJhiT7zX694y7B1QC5S7LSZOk=; fh=UHNV9TZK4dO3ZOCeSzLqPpHLc+1b0gW9vBA4UD4scoU=; b=HK3GceHCVLQyDqwuRcIu5zqA6sCINsKc1M3tbOVDx/461VO19kdwjIljZHvW7IJdgO xFA6hWn0glxNri5FNR2Y9WAe+AOrBwC2CZrBHOjeu4AFL0DMboyt8GkU+y7RF9LFtqYx T/WLYd6U0/s4NO5H6lVyA1/nDuQCOpUIag4uHSVinHcgWga5Klfos/AzU2gIglNoVYRm igWiaorVgFbgfg4Gp2R6qcs6BBi3KhOEoAbug8pJESScqYVbW+naua13+K/kxeSXx1j6 tRwadPTiOyakuQmC9NOjIrMGxNg7PgFlbjRRogybZz62w1FgHmkt+Z1aYxekKkh5Ecuc cz9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SdRdz3jj; spf=pass (google.com: domain of linux-kernel+bounces-1989-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1989-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a14-20020a0cca8e000000b0067f0ea940f3si4497456qvk.94.2023.12.15.19.28.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:28:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1989-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=SdRdz3jj; spf=pass (google.com: domain of linux-kernel+bounces-1989-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1989-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BBD0A1C248B5 for ; Sat, 16 Dec 2023 03:28:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D4451428D; Sat, 16 Dec 2023 03:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SdRdz3jj" X-Original-To: linux-kernel@vger.kernel.org Received: from out-176.mta0.migadu.com (out-176.mta0.migadu.com [91.218.175.176]) (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 4839210A2B for ; Sat, 16 Dec 2023 03:27:09 +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=1702697227; 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=zpoxfZnH1zvydvdDW1QJhiT7zX694y7B1QC5S7LSZOk=; b=SdRdz3jjkXfPhyrOL4LTnWj3BXcRnESTUqNViRckkPo0dKx2FGG8Di0nnUTne/EgA7snyN rXzCLOum8bG54vUER7uqNiuZf6Aak/aa6SLQvVoLppW95Ih0nuio5r+RgJCry3AmxdnF1Q AqOvePtZOxsJY9Z3fmb/zpfCkmixM30= 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, Suren Baghdasaryan Subject: [PATCH 14/50] arm64: Fix circular header dependency Date: Fri, 15 Dec 2023 22:26:13 -0500 Message-ID: <20231216032651.3553101-4-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407518932720324 X-GMAIL-MSGID: 1785407518932720324 Replace linux/percpu.h include with asm/percpu.h to avoid circular dependency. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan --- arch/arm64/include/asm/spectre.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/include/asm/spectre.h b/arch/arm64/include/asm/spectre.h index 06c357d83b13..0c4d9045c31f 100644 --- a/arch/arm64/include/asm/spectre.h +++ b/arch/arm64/include/asm/spectre.h @@ -13,8 +13,8 @@ #define __BP_HARDEN_HYP_VECS_SZ ((BP_HARDEN_EL2_SLOTS - 1) * SZ_2K) #ifndef __ASSEMBLY__ - -#include +#include +#include #include #include From patchwork Sat Dec 16 03:26:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15426dyi; Fri, 15 Dec 2023 19:28:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfCzLzX0g0+uiJkMEhJe5W/d/li8EFHxHdz06O/9ibZJWeNwfUi4werJ2cs6mOT/Sq1EEq X-Received: by 2002:a05:620a:2290:b0:77f:3126:c010 with SMTP id o16-20020a05620a229000b0077f3126c010mr12960315qkh.129.1702697312152; Fri, 15 Dec 2023 19:28:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697312; cv=none; d=google.com; s=arc-20160816; b=YmYFf7hbmARUnqegBFKfl9PQz2v0gHKnDxs0n2beFh8bqED2JL//fTGKSi6dGd2Rlt 2d1epZPDsd5fO8YNYcDBrvyyGodhx8JIVdogVd0gw/tK2Y39dhi/ZcsuKeTHe5T/+9Fw BT6LGHiC2UgJRpEO5t11Y/h6219xD4ugfFnt3tCDnyT7UwGt+3mZK3mu3ZWfQcuTHBVB Np0laiCRKo+KtlQZK7AHgBHg1iA76UMsbflszSadL5+k+vGSqmNr0Fg88Scr5QZS5PCi kUmLLLeNadcTD489Qsd/yAIpCicQivmEqDzM6zg6wpI7QcWmsY05+sST8fQVJdaj7wBY WdZQ== 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=lSEfcPVLSVdGjudbUJ8Sggq3p7WbAaRsO8gXu0Omim0=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=coZBevZN8OvEaK+jL1r2KEH8EUvHOQjyrZGHydCZxhHUiN82njSWMmzR4A+Ly4+mUx BSZGx46B+XlYB93K9Vy8X9zkmm9A1Hi5j1Q8mm3sPDupHpyjVaLgmy9ICGNgnXJTBe2E JvTt8oqhA3sllFmSUZVAMw/MOxfvZsbLydPTSPdu/W6QTqoDEbSGqZVQpPCbP0zj87T+ qTzcc0bYMQwjWfSIhZklhSqqsa6xHTn8GdIvdZUr9BS6FDSlcdzjiDLQPcs8rqSef8h2 ajUmoOey/eEkUzprRkNvu/dTa+CAEw9jDzyIlu53q+bcL1e64W6ZyRAongmwrm+0SvZb KNNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wEL1M8P7; spf=pass (google.com: domain of linux-kernel+bounces-1990-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1990-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f9-20020a05620a280900b0077fab003c69si3815992qkp.563.2023.12.15.19.28.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:28:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1990-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wEL1M8P7; spf=pass (google.com: domain of linux-kernel+bounces-1990-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1990-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id ED6DA1C248B3 for ; Sat, 16 Dec 2023 03:28:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EB5A171B9; Sat, 16 Dec 2023 03:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wEL1M8P7" X-Original-To: linux-kernel@vger.kernel.org Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (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 4EEF012B95 for ; Sat, 16 Dec 2023 03:27:11 +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=1702697229; 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=lSEfcPVLSVdGjudbUJ8Sggq3p7WbAaRsO8gXu0Omim0=; b=wEL1M8P7dGXDYkqa7TZ0623+1nRbflZcjURNMTTrfHumsxxvoj66ZAcvpFCSzlBCmznGOS ShvM+xfySrI3hUK03bi1hMOQo88TQq4lz2lpKcqo9kn0Iqn4roIrmWzq8nWh/E7pzm5vVj gHdLwG+8+qW+yBjQLDhmmlyg1zl3eKY= 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 15/50] kernel/numa.c: Move logging out of numa.h Date: Fri, 15 Dec 2023 22:26:14 -0500 Message-ID: <20231216032651.3553101-5-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407536416750383 X-GMAIL-MSGID: 1785407536416750383 Moving these stub functions to a .c file means we can kill a sched.h dependency on printk.h. Signed-off-by: Kent Overstreet --- include/linux/numa.h | 18 +++++------------- kernel/Makefile | 1 + kernel/numa.c | 24 ++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 kernel/numa.c diff --git a/include/linux/numa.h b/include/linux/numa.h index a904861de800..aeab3d9f57ae 100644 --- a/include/linux/numa.h +++ b/include/linux/numa.h @@ -22,34 +22,26 @@ #endif #ifdef CONFIG_NUMA -#include #include /* Generic implementation available */ int numa_nearest_node(int node, unsigned int state); #ifndef memory_add_physaddr_to_nid -static inline int memory_add_physaddr_to_nid(u64 start) -{ - pr_info_once("Unknown online node for memory at 0x%llx, assuming node 0\n", - start); - return 0; -} +int memory_add_physaddr_to_nid(u64 start); #endif + #ifndef phys_to_target_node -static inline int phys_to_target_node(u64 start) -{ - pr_info_once("Unknown target node for memory at 0x%llx, assuming node 0\n", - start); - return 0; -} +int phys_to_target_node(u64 start); #endif + #ifndef numa_fill_memblks static inline int __init numa_fill_memblks(u64 start, u64 end) { return NUMA_NO_MEMBLK; } #endif + #else /* !CONFIG_NUMA */ static inline int numa_nearest_node(int node, unsigned int state) { diff --git a/kernel/Makefile b/kernel/Makefile index 3947122d618b..ce105a5558fc 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -114,6 +114,7 @@ obj-$(CONFIG_SHADOW_CALL_STACK) += scs.o obj-$(CONFIG_HAVE_STATIC_CALL) += static_call.o obj-$(CONFIG_HAVE_STATIC_CALL_INLINE) += static_call_inline.o obj-$(CONFIG_CFI_CLANG) += cfi.o +obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_PERF_EVENTS) += events/ diff --git a/kernel/numa.c b/kernel/numa.c new file mode 100644 index 000000000000..c24c72f45989 --- /dev/null +++ b/kernel/numa.c @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include +#include + +/* Stub functions: */ + +#ifndef memory_add_physaddr_to_nid +int memory_add_physaddr_to_nid(u64 start) +{ + pr_info_once("Unknown online node for memory at 0x%llx, assuming node 0\n", + start); + return 0; +} +#endif + +#ifndef phys_to_target_node +int phys_to_target_node(u64 start) +{ + pr_info_once("Unknown target node for memory at 0x%llx, assuming node 0\n", + start); + return 0; +} +#endif From patchwork Sat Dec 16 03:26:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179757 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15493dyi; Fri, 15 Dec 2023 19:28:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxFwhAOh5jpM2wmZ5caEz4gJfOYu4FBBX3yf9TagIBDpgCIa69jZLb2axo+KxzxGD7y8uK X-Received: by 2002:a05:6214:130e:b0:67a:b419:530f with SMTP id pn14-20020a056214130e00b0067ab419530fmr18318710qvb.9.1702697331908; Fri, 15 Dec 2023 19:28:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697331; cv=none; d=google.com; s=arc-20160816; b=c5CYA6PBrQoK/fekBoOK5yU4c/KHdr8H0/TY6MirRroLyaKUj26Rci4zBziE+XdGH4 CWZhIA7Rav/plgiTgGfGbaBO/1mQqsnloCmjP3rtUl0yFK4eysnaP6ZjBckXnCnxgdJD 0sJjorea2OasU5/WmL3yhsg+MoaskgRvmRLWATbZ6UAoqtRQsXlNGoZz/IsaVIvK8ytI Sc8p2ynkg/cd7oLI95Gr6v2TsJD/JN+XICP8/qIe7+xw7PPb/oayCPDvLMZTFtJ8lMz2 JLOAPBlDwQbbs2DD9VHjkQgD1KndgoFNLptRv7rCJgT/M0DYr3wXeeSNYRIv9v7xrEXB wXHA== 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=2XkiID2+CLzOQYD7Bz1wsynJpFZEAYT3tSVjrTRZ4z8=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=dxOwTLlIfpvjKvSp/driPH+8K+X1dTsIP3RlO+EtRI7PsfKlJNZXOG3IFwa9Fsrxgx VREelctLPeSiokxlsrsifFtCQYPZMrqX2Es9qqluSJqoNUYIYZDNyVVri9pzZdy2Cgex LdsSpXqJYmQGJa0eAkDTOBXpeI0ijLixttJqWt9P42X44YwZLPb85PmrfqgL2iBuGu0w /szyhi2aPg8+7ImrUqLgRLvJMmxXGdMmE3lUPKKBFCwhmGV7UJh2IaZ2wlbU9B0IIKk9 4jVOOFXh8cZnqjVdBRlUcG+zLio/q8F9jPx4m0NZ9mV+MWFKxryMIHt+7x2+SvbIjaX8 iLmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Lj55Mo0L; spf=pass (google.com: domain of linux-kernel+bounces-1991-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1991-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p13-20020a0cfd8d000000b0067eff8c7f47si6555595qvr.224.2023.12.15.19.28.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:28:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1991-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Lj55Mo0L; spf=pass (google.com: domain of linux-kernel+bounces-1991-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1991-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9C4901C248B3 for ; Sat, 16 Dec 2023 03:28:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A5B719450; Sat, 16 Dec 2023 03:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Lj55Mo0L" X-Original-To: linux-kernel@vger.kernel.org Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (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 15A7B14016 for ; Sat, 16 Dec 2023 03:27:12 +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=1702697231; 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=2XkiID2+CLzOQYD7Bz1wsynJpFZEAYT3tSVjrTRZ4z8=; b=Lj55Mo0LMcD929wkauv0VAl43vVATsnzWM+J3oGUI/ar0ExbibBATJI9Ex1s17yuwcQsEq z1vlDGtmUVc6CIIBXy7jDvdn59nvo3wlVAKYmzivDHXAQEtV4qXJrU/UMbfyh12jJZMo78 pWac8uDIn1XU0PF37u7zF7u+nQIdi+U= 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 16/50] sched.h: Move (spin|rwlock)_needbreak() to spinlock.h Date: Fri, 15 Dec 2023 22:26:15 -0500 Message-ID: <20231216032651.3553101-6-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407557816262812 X-GMAIL-MSGID: 1785407557816262812 This lets us kill the dependency on spinlock.h. Signed-off-by: Kent Overstreet --- include/linux/sched.h | 31 ------------------------------- include/linux/spinlock.h | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 5a5b7b122682..7501a3451a20 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2227,37 +2227,6 @@ static inline bool preempt_model_preemptible(void) return preempt_model_full() || preempt_model_rt(); } -/* - * Does a critical section need to be broken due to another - * task waiting?: (technically does not depend on CONFIG_PREEMPTION, - * but a general need for low latency) - */ -static inline int spin_needbreak(spinlock_t *lock) -{ -#ifdef CONFIG_PREEMPTION - return spin_is_contended(lock); -#else - return 0; -#endif -} - -/* - * Check if a rwlock is contended. - * Returns non-zero if there is another task waiting on the rwlock. - * Returns zero if the lock is not contended or the system / underlying - * rwlock implementation does not support contention detection. - * Technically does not depend on CONFIG_PREEMPTION, but a general need - * for low latency. - */ -static inline int rwlock_needbreak(rwlock_t *lock) -{ -#ifdef CONFIG_PREEMPTION - return rwlock_is_contended(lock); -#else - return 0; -#endif -} - static __always_inline bool need_resched(void) { return unlikely(tif_need_resched()); diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 31d3d747a9db..0c71f06454d9 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -449,6 +449,37 @@ static __always_inline int spin_is_contended(spinlock_t *lock) return raw_spin_is_contended(&lock->rlock); } +/* + * Does a critical section need to be broken due to another + * task waiting?: (technically does not depend on CONFIG_PREEMPTION, + * but a general need for low latency) + */ +static inline int spin_needbreak(spinlock_t *lock) +{ +#ifdef CONFIG_PREEMPTION + return spin_is_contended(lock); +#else + return 0; +#endif +} + +/* + * Check if a rwlock is contended. + * Returns non-zero if there is another task waiting on the rwlock. + * Returns zero if the lock is not contended or the system / underlying + * rwlock implementation does not support contention detection. + * Technically does not depend on CONFIG_PREEMPTION, but a general need + * for low latency. + */ +static inline int rwlock_needbreak(rwlock_t *lock) +{ +#ifdef CONFIG_PREEMPTION + return rwlock_is_contended(lock); +#else + return 0; +#endif +} + #define assert_spin_locked(lock) assert_raw_spin_locked(&(lock)->rlock) #else /* !CONFIG_PREEMPT_RT */ From patchwork Sat Dec 16 03:26:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179758 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15562dyi; Fri, 15 Dec 2023 19:29:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQvaH6GJYS6i0PNuzeXa0ZHN9I1HKpzaSSfJlDzq7nUzwbfTIWATAJORqmdgnnaAUny7vs X-Received: by 2002:a50:d001:0:b0:552:32da:9c24 with SMTP id j1-20020a50d001000000b0055232da9c24mr2416792edf.65.1702697347182; Fri, 15 Dec 2023 19:29:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697347; cv=none; d=google.com; s=arc-20160816; b=foq1juzP39dgWFsC1FnD9To6JcfeZ70EfPNJ8aUKpYF/LAEhZH4fCvq51s467usxX5 1esPxzQpVsZ48aZyccxZ3dQP6CBtvcSGA2idwXeP8KmaGglZniMm8dnmY7jJXgEKkSIk AuRABudFuwm0v0Qe+KGF7sPkc9TDRyh52PpSXcyBuZkN4O4aS551+fXyYJR4QssC+fK5 ydevWxr2LSywJ/BN8nS+XJA3YYfLdBonDOXp/0/uxMJMSbCS9fkQPz2qFamOQq4Wahaj 9iCDZ1rGrEAK4rbPiyCVrvPVzQH6CkBf50R9wnG4cbnhmIdRlAPphb+0v/i0xnD6r0bI Cvng== 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=bVQvq92zNWowFmQB2GI0mP9AbBZYVi5uCFShyHJBgic=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=rGjixprVQQhzY54oORU3ZTQtGJslcAKkF+lBfjwOya0v/ljzKR9GsygL1xmmgKCUON FNqDTsawPICXdtKjA/0O69nndT+2oLDSwlQ0HEhXc5CvW3OB33mDFVZ7E5ZX72No8X98 9DGM5/gdmFnA1SpAr9h5uyXWASdBszmUWhPtVKBnGB8jGshkgZsG7e/tFlHRRpUaFYC8 4zYMKkr2qOmBYQTMaJ20KP9s4CLugUksmTmTQOdTTdT3cWY298NqCPtE+l9W4r1oKniZ QfI42i3VIcb7fmpBqETm/TSmrJ+d2LLPLT4MB5bO26TYqJJ6qu1b3CYedAJg7+GBjpol uBww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=j6ZPXCGP; spf=pass (google.com: domain of linux-kernel+bounces-1992-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1992-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gy4-20020a0564025bc400b005528db29d85si1560934edb.142.2023.12.15.19.29.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:29:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1992-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=j6ZPXCGP; spf=pass (google.com: domain of linux-kernel+bounces-1992-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1992-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id C66DF1F25A76 for ; Sat, 16 Dec 2023 03:29:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 014D01BDD4; Sat, 16 Dec 2023 03:27:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="j6ZPXCGP" X-Original-To: linux-kernel@vger.kernel.org Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 0AA1316408 for ; Sat, 16 Dec 2023 03:27:14 +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=1702697233; 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=bVQvq92zNWowFmQB2GI0mP9AbBZYVi5uCFShyHJBgic=; b=j6ZPXCGPupzUUJnhIsAwv8oHEvVc0w9O/utpKK+o4imk+jWaN9F7GYOuw7A+c6hdx8YpfO ybPZO30FOXihZJAgJBazpezKLNlpNFEY/AQPKJoKuAZQqhJlLB5adz6B/XlpDGSd/OBPOF bxtKvHGv6L54wlPtCN/TCdYe9/ZAJNE= 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 17/50] ktime.h: move ktime_t to types.h Date: Fri, 15 Dec 2023 22:26:16 -0500 Message-ID: <20231216032651.3553101-7-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407573856063689 X-GMAIL-MSGID: 1785407573856063689 ktime.h pulls in quite a few headers recursively (including printk.h) - this is going to help with trimming sched.h dependencies. Signed-off-by: Kent Overstreet --- include/linux/ktime.h | 8 +++----- include/linux/types.h | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 73f20deb497d..3a4e723eae0f 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -21,12 +21,10 @@ #ifndef _LINUX_KTIME_H #define _LINUX_KTIME_H -#include -#include #include - -/* Nanosecond scalar representation for kernel time values */ -typedef s64 ktime_t; +#include +#include +#include /** * ktime_set - Set a ktime_t variable from a seconds/nanoseconds value diff --git a/include/linux/types.h b/include/linux/types.h index 253168bb3fe1..2bc8766ba20c 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -120,6 +120,9 @@ typedef s64 int64_t; #define aligned_be64 __aligned_be64 #define aligned_le64 __aligned_le64 +/* Nanosecond scalar representation for kernel time values */ +typedef s64 ktime_t; + /** * The type used for indexing onto a disc or disc partition. * From patchwork Sat Dec 16 03:26:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179759 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15646dyi; Fri, 15 Dec 2023 19:29:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IF//Q5fbwPQJtrPKzbBk1mdON7l0A5thg6+0NiBM6I+BlgbBcuvnscUQOKj4FlOAdo+Ru3V X-Received: by 2002:a05:6a00:1ac7:b0:6cb:bb92:1ce6 with SMTP id f7-20020a056a001ac700b006cbbb921ce6mr14101770pfv.18.1702697371726; Fri, 15 Dec 2023 19:29:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697371; cv=none; d=google.com; s=arc-20160816; b=J4WQQoWTczpGDrBMreY/TrC2aUYmK1qkfxhR+EmjN1E1I2c1dm0+mKEok3ccrR6Jtl vqDRkhtHAKrTTOG9dj0ZWtiaMvyQBe6uX4Dpebrs9Z0AhP7tiHegA3TiLBVmRke4vs3o K9GKVaUpjcje9txxZalcYDxghTeUn6hfv0ACyXLKefKeMYXd42pQRkA0URsM49GM64+z b/v3oG6yHJDxfNeo9Lt+RUj7Gs/xpA98glzDaqx6QuKAKmcRzccnSzFrkiQPJUH81tgV ZsUAg5JhjbGER2eCkSzkQLXC7sSCOJ0yEHhwqTqvsIltEMUS9FKVXh5NIkHHTiFB8zKk K1vQ== 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=LYpe5VKbI0uY+woOivYCAFG3kwewGieeeX3lG0j4fOU=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=nDWICOOhB7nFkZ0V0us1bxcoAkEonH7KwOtyCrth5vkVfyAnBpAVNLp4Gwvwsn6V/g bbj81IIvaIBjgxOQ+7mls2jBqpQM5A2FHMW3S3PigctjqngSLJ8IPiP1dVyf/fpxMm6L d4CMW0NKIEYFiDiaeHxEVES/tcsZrmB9uiBtU/xCr+ktrrCv84AYeWOJ/iBzG12KgIp0 R6HeDVRCFE+78bYOV5EviK9c9vrwow9nELvtwqv6UukuGWwUb13lAVdwd///F3jCtE4A /TUJmcNt71bFr/JjqowsxhTlJhwaIkr4RQLL1pPNhUJGVL4PvVhh7ZYl1HhFH1lk6Osk 3Nnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=sCzIMwM2; spf=pass (google.com: domain of linux-kernel+bounces-1993-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1993-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b10-20020a056a00114a00b006ce9cb273c6si14034408pfm.136.2023.12.15.19.29.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:29:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1993-ouuuleilei=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=sCzIMwM2; spf=pass (google.com: domain of linux-kernel+bounces-1993-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1993-ouuuleilei=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 EF7F628681F for ; Sat, 16 Dec 2023 03:29:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 464131E4AF; Sat, 16 Dec 2023 03:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="sCzIMwM2" X-Original-To: linux-kernel@vger.kernel.org Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [91.218.175.181]) (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 000D118ECA for ; Sat, 16 Dec 2023 03:27:16 +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=1702697235; 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=LYpe5VKbI0uY+woOivYCAFG3kwewGieeeX3lG0j4fOU=; b=sCzIMwM2LXm7dg4joaoWyKEZ+f7mK4v8IWa0/1tqUO/odZhVKSP3iFUBWcXkcCzggkUcBA MgclZ5q0jgBG54q6SkQPGNkYuON4IZiYlXXHtFVEI8uH8v4wBfBNj7/uLqETu4JfhGOAl3 InhjvBSHWLsOm8Ju67WXZv0nZ3OLl5E= 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 18/50] hrtimers: Split out hrtimer_types.h Date: Fri, 15 Dec 2023 22:26:17 -0500 Message-ID: <20231216032651.3553101-8-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407599361240522 X-GMAIL-MSGID: 1785407599361240522 We need to reduce the scope of what's included in sched.h: task_struct includes a hrtimer, so split out the core types into their own header. Signed-off-by: Kent Overstreet Cc: Thomas Gleixner --- include/linux/hrtimer.h | 44 ++---------------------------- include/linux/hrtimer_types.h | 50 +++++++++++++++++++++++++++++++++++ include/linux/sched.h | 2 +- 3 files changed, 53 insertions(+), 43 deletions(-) create mode 100644 include/linux/hrtimer_types.h diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 02d264ca9dce..87e3bedf8eb0 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -13,13 +13,13 @@ #define _LINUX_HRTIMER_H #include -#include +#include #include #include #include +#include #include #include -#include struct hrtimer_clock_base; struct hrtimer_cpu_base; @@ -59,14 +59,6 @@ enum hrtimer_mode { HRTIMER_MODE_REL_PINNED_HARD = HRTIMER_MODE_REL_PINNED | HRTIMER_MODE_HARD, }; -/* - * Return values for the callback function - */ -enum hrtimer_restart { - HRTIMER_NORESTART, /* Timer is not restarted */ - HRTIMER_RESTART, /* Timer must be restarted */ -}; - /* * Values to track state of the timer * @@ -94,38 +86,6 @@ enum hrtimer_restart { #define HRTIMER_STATE_INACTIVE 0x00 #define HRTIMER_STATE_ENQUEUED 0x01 -/** - * struct hrtimer - the basic hrtimer structure - * @node: timerqueue node, which also manages node.expires, - * the absolute expiry time in the hrtimers internal - * representation. The time is related to the clock on - * which the timer is based. Is setup by adding - * slack to the _softexpires value. For non range timers - * identical to _softexpires. - * @_softexpires: the absolute earliest expiry time of the hrtimer. - * The time which was given as expiry time when the timer - * was armed. - * @function: timer expiry callback function - * @base: pointer to the timer base (per cpu and per clock) - * @state: state information (See bit values above) - * @is_rel: Set if the timer was armed relative - * @is_soft: Set if hrtimer will be expired in soft interrupt context. - * @is_hard: Set if hrtimer will be expired in hard interrupt context - * even on RT. - * - * The hrtimer structure must be initialized by hrtimer_init() - */ -struct hrtimer { - struct timerqueue_node node; - ktime_t _softexpires; - enum hrtimer_restart (*function)(struct hrtimer *); - struct hrtimer_clock_base *base; - u8 state; - u8 is_rel; - u8 is_soft; - u8 is_hard; -}; - /** * struct hrtimer_sleeper - simple sleeper structure * @timer: embedded timer structure diff --git a/include/linux/hrtimer_types.h b/include/linux/hrtimer_types.h new file mode 100644 index 000000000000..f4ef391b96a7 --- /dev/null +++ b/include/linux/hrtimer_types.h @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_HRTIMER_TYPES_H +#define _LINUX_HRTIMER_TYPES_H + +#include +#include + +struct hrtimer_clock_base; + +/* + * Return values for the callback function + */ +enum hrtimer_restart { + HRTIMER_NORESTART, /* Timer is not restarted */ + HRTIMER_RESTART, /* Timer must be restarted */ +}; + +/** + * struct hrtimer - the basic hrtimer structure + * @node: timerqueue node, which also manages node.expires, + * the absolute expiry time in the hrtimers internal + * representation. The time is related to the clock on + * which the timer is based. Is setup by adding + * slack to the _softexpires value. For non range timers + * identical to _softexpires. + * @_softexpires: the absolute earliest expiry time of the hrtimer. + * The time which was given as expiry time when the timer + * was armed. + * @function: timer expiry callback function + * @base: pointer to the timer base (per cpu and per clock) + * @state: state information (See bit values above) + * @is_rel: Set if the timer was armed relative + * @is_soft: Set if hrtimer will be expired in soft interrupt context. + * @is_hard: Set if hrtimer will be expired in hard interrupt context + * even on RT. + * + * The hrtimer structure must be initialized by hrtimer_init() + */ +struct hrtimer { + struct timerqueue_node node; + ktime_t _softexpires; + enum hrtimer_restart (*function)(struct hrtimer *); + struct hrtimer_clock_base *base; + u8 state; + u8 is_rel; + u8 is_soft; + u8 is_hard; +}; + +#endif /* _LINUX_HRTIMER_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 7501a3451a20..3762809652da 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Sat Dec 16 03:26:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179760 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15703dyi; Fri, 15 Dec 2023 19:29:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHuxlvzDVpYsKviV44H4DJB1WaFkijwRoQhhyfQqulevrmwB/SDin4JovzVKFNQmP41YGJ9 X-Received: by 2002:a05:6a00:21ca:b0:6cd:cd77:afae with SMTP id t10-20020a056a0021ca00b006cdcd77afaemr15944552pfj.3.1702697385354; Fri, 15 Dec 2023 19:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697385; cv=none; d=google.com; s=arc-20160816; b=KBwuE+02duDqnVF6CoC1Pn2Iza7CKILEhzecBo+o+VL3z53ZXz+5bq63qE4wL78xkV SuCXDWkwf0MePcXvWrQ7eiO5QKSQLbjP4bOy80uHQjV9s0G7akkU4OxdE5cU6ngbSRuy w5y3U8XbmSA0dM3/PWDfw9DSjdsMvswJCqTcf8DIHgeV7KbWRGOMU/2FovvW9pkAdq8k V5TD1w1wms8tVfc+Zs48hd1noO8QTUahCFTIzwAt7XpYJJP1+si9Az1aiHHlMfkwDXbp 6twhtnhP73us2vTR7BLOO0TTgCHppXaxD3MoAeIr0UHjC42c+vrHUvSit0Vpr+8Eb9W3 OPVA== 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=SXxCqM/e1FB55uLwmZS35mh8NG7r88Szct15Gk8BhFo=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=UYlgTNSpeRopUD5/qCfkF5RJvPQwcGqZzcktOSPN8jl3YplGlijjntpF+OvbkpT9Q/ k0Czkjy1V09+2StjC5i357XDO11y84N64NNBvuXttLR266WE/acWUwTLI34Nzdg89NBB fTRNUjpV9Be9gpLkUTgXVFDGiUImGCoSRk+xBpCIVfLnKIxRB2QAzyFYcM3PMyem9cVF P0xNmM1Tw3ReYK0xZGjsy2I7SKp4tp9bftMBmqBGuwY119tgg+evnbEP3CLX1dv7b6+3 pji8OvY/t/4nARSyv8KygMXu8zWwpZBu7rGqE1iUOb8ciAL3rRMmFgkwA3IjIbzbmmIK JbIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=CWnhaoch; spf=pass (google.com: domain of linux-kernel+bounces-1994-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1994-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d6-20020aa78686000000b006d26b5e5e6csi3116134pfo.245.2023.12.15.19.29.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:29:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1994-ouuuleilei=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=CWnhaoch; spf=pass (google.com: domain of linux-kernel+bounces-1994-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1994-ouuuleilei=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 8BDE128306C for ; Sat, 16 Dec 2023 03:29:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F01491875; Sat, 16 Dec 2023 03:27:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CWnhaoch" X-Original-To: linux-kernel@vger.kernel.org Received: from out-176.mta0.migadu.com (out-176.mta0.migadu.com [91.218.175.176]) (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 8FE7F1A27A for ; Sat, 16 Dec 2023 03:27:18 +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=1702697237; 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=SXxCqM/e1FB55uLwmZS35mh8NG7r88Szct15Gk8BhFo=; b=CWnhaochAsy6lJqiTdhs4ALt36jqcdkjrNNJLlyCebEcFi77MIzyYchlT3ZKJp1qkdUw+a g0rIYF+ygVVf8ox5ZVu6ZtsSjccEjMWnuC+TuJrABdg1a1z78QjuI4/k+JkyWcRCwukZQH B+GcssvUHU4Q2y2LmE/gokgKLEfZqPU= 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 19/50] locking/mutex: split out mutex_types.h Date: Fri, 15 Dec 2023 22:26:18 -0500 Message-ID: <20231216032651.3553101-9-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407613498925569 X-GMAIL-MSGID: 1785407613498925569 Trimming down sched.h dependencies: we don't want to include more than the base types. Signed-off-by: Kent Overstreet Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Signed-off-by: Kent Overstreet --- include/linux/mutex.h | 52 +-------------------------- include/linux/mutex_types.h | 71 +++++++++++++++++++++++++++++++++++++ include/linux/sched.h | 2 +- 3 files changed, 73 insertions(+), 52 deletions(-) create mode 100644 include/linux/mutex_types.h diff --git a/include/linux/mutex.h b/include/linux/mutex.h index a33aa9eb9fc3..0dfba5df6524 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef CONFIG_DEBUG_LOCK_ALLOC # define __DEP_MAP_MUTEX_INITIALIZER(lockname) \ @@ -33,49 +34,6 @@ #ifndef CONFIG_PREEMPT_RT -/* - * Simple, straightforward mutexes with strict semantics: - * - * - only one task can hold the mutex at a time - * - only the owner can unlock the mutex - * - multiple unlocks are not permitted - * - recursive locking is not permitted - * - a mutex object must be initialized via the API - * - a mutex object must not be initialized via memset or copying - * - task may not exit with mutex held - * - memory areas where held locks reside must not be freed - * - held mutexes must not be reinitialized - * - mutexes may not be used in hardware or software interrupt - * contexts such as tasklets and timers - * - * These semantics are fully enforced when DEBUG_MUTEXES is - * enabled. Furthermore, besides enforcing the above rules, the mutex - * debugging code also implements a number of additional features - * that make lock debugging easier and faster: - * - * - uses symbolic names of mutexes, whenever they are printed in debug output - * - point-of-acquire tracking, symbolic lookup of function names - * - list of all locks held in the system, printout of them - * - owner tracking - * - detects self-recursing locks and prints out all relevant info - * - detects multi-task circular deadlocks and prints out all affected - * locks and tasks (and only those tasks) - */ -struct mutex { - atomic_long_t owner; - raw_spinlock_t wait_lock; -#ifdef CONFIG_MUTEX_SPIN_ON_OWNER - struct optimistic_spin_queue osq; /* Spinner MCS lock */ -#endif - struct list_head wait_list; -#ifdef CONFIG_DEBUG_MUTEXES - void *magic; -#endif -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif -}; - #ifdef CONFIG_DEBUG_MUTEXES #define __DEBUG_MUTEX_INITIALIZER(lockname) \ @@ -131,14 +89,6 @@ extern bool mutex_is_locked(struct mutex *lock); /* * Preempt-RT variant based on rtmutexes. */ -#include - -struct mutex { - struct rt_mutex_base rtmutex; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif -}; #define __MUTEX_INITIALIZER(mutexname) \ { \ diff --git a/include/linux/mutex_types.h b/include/linux/mutex_types.h new file mode 100644 index 000000000000..fdf7f515fde8 --- /dev/null +++ b/include/linux/mutex_types.h @@ -0,0 +1,71 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_MUTEX_TYPES_H +#define __LINUX_MUTEX_TYPES_H + +#include +#include +#include +#include +#include + +#ifndef CONFIG_PREEMPT_RT + +/* + * Simple, straightforward mutexes with strict semantics: + * + * - only one task can hold the mutex at a time + * - only the owner can unlock the mutex + * - multiple unlocks are not permitted + * - recursive locking is not permitted + * - a mutex object must be initialized via the API + * - a mutex object must not be initialized via memset or copying + * - task may not exit with mutex held + * - memory areas where held locks reside must not be freed + * - held mutexes must not be reinitialized + * - mutexes may not be used in hardware or software interrupt + * contexts such as tasklets and timers + * + * These semantics are fully enforced when DEBUG_MUTEXES is + * enabled. Furthermore, besides enforcing the above rules, the mutex + * debugging code also implements a number of additional features + * that make lock debugging easier and faster: + * + * - uses symbolic names of mutexes, whenever they are printed in debug output + * - point-of-acquire tracking, symbolic lookup of function names + * - list of all locks held in the system, printout of them + * - owner tracking + * - detects self-recursing locks and prints out all relevant info + * - detects multi-task circular deadlocks and prints out all affected + * locks and tasks (and only those tasks) + */ +struct mutex { + atomic_long_t owner; + raw_spinlock_t wait_lock; +#ifdef CONFIG_MUTEX_SPIN_ON_OWNER + struct optimistic_spin_queue osq; /* Spinner MCS lock */ +#endif + struct list_head wait_list; +#ifdef CONFIG_DEBUG_MUTEXES + void *magic; +#endif +#ifdef CONFIG_DEBUG_LOCK_ALLOC + struct lockdep_map dep_map; +#endif +}; + +#else /* !CONFIG_PREEMPT_RT */ +/* + * Preempt-RT variant based on rtmutexes. + */ +#include + +struct mutex { + struct rt_mutex_base rtmutex; +#ifdef CONFIG_DEBUG_LOCK_ALLOC + struct lockdep_map dep_map; +#endif +}; + +#endif /* CONFIG_PREEMPT_RT */ + +#endif /* __LINUX_MUTEX_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 3762809652da..e8892789969b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Sat Dec 16 03:26:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179761 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15763dyi; Fri, 15 Dec 2023 19:29:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGIYUd3X1PUANI6drdfeKsSHvN4wZ39aRoUiBbQkBEfvsAzTF4I5AtPPYyynayDql6w7LbC X-Received: by 2002:a17:906:5349:b0:a23:f82:985f with SMTP id j9-20020a170906534900b00a230f82985fmr1283829ejo.142.1702697399073; Fri, 15 Dec 2023 19:29:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697399; cv=none; d=google.com; s=arc-20160816; b=FIBMpnRhhgE6y2a5d64WG+ehpxhEYMCn31qR3eJplGi0HyKk0MoB6PItXfDw9zMlC9 pQgHzqYKDMjvZj3Av/D5nSDcbiVPYT3rJJjX9/oLhoEf76MNCBlj/N09BDe0SRTP7R/D O76XmKE39+y9gOwjsHptph7K9niRi8YtvDLiwndalqERoxKs/QOnHjyvpcGz0k1GjIkG pTtzun1FyRhhwWiCXctU0OKR9KPxykOYBRmaV9b8OsIm9REvoWOWugK/fFew3JgH62pe 7v3+iOZscNTsL+SHIUiPbrABXcu7om8dVFsqZqF0280SkH35nFjSPWaQrty/SyyPUUST FNrw== 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=l/AdYiLA1KltWXM4Dxc7KA8BrnvhZi0rzVoxoyzH4FI=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=ICPqUcAvUX1VATCZoj9+QF7WWl9xYHFbNSJMSzkLxvXmObwkONbGE5gZsKcScLahc7 Nn0KAxjpAItlH9SmUclSBqf+MAgX6TVjgQvuJpqXh0Dq8cBQ7yMZJAU7jDqcfZp0gDYS 9eDl9XuNUee1zOWGZJHQCukj5WtNsqy5tp5unZev2EEHU3DDTZvSpLw8LBIzqpYsN7B0 Y90QcZbtgE89dsqB/daYZPY6jDHKb8jK/W4oGi14fB0SG7i5yeOQ+K4v5HycqRmk/MP6 UMbhM/oQWEK22XDiLaLqeFZsVRVq5Z4f/lIjkAJeW3jtyH0gWb28cg99aSlVfEJdxOtY faHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WjeFrxkX; spf=pass (google.com: domain of linux-kernel+bounces-1995-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1995-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t8-20020a170906268800b00a1cda6326b0si7797074ejc.179.2023.12.15.19.29.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:29:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1995-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=WjeFrxkX; spf=pass (google.com: domain of linux-kernel+bounces-1995-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1995-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 84D061F25AD8 for ; Sat, 16 Dec 2023 03:29:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0A0122FC5F; Sat, 16 Dec 2023 03:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="WjeFrxkX" X-Original-To: linux-kernel@vger.kernel.org Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [91.218.175.185]) (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 ABA301E486 for ; Sat, 16 Dec 2023 03:27:20 +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=1702697239; 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=l/AdYiLA1KltWXM4Dxc7KA8BrnvhZi0rzVoxoyzH4FI=; b=WjeFrxkXi1mg3nVsknIKn9D4C1XdNFTO0PyYeLNXygJ7fW9bGO8/r5DFvTSy/o7YAO3aDL CwryBhsCe7GWkRdm8opahT7ZQF/7VLDL592uUhZBpKntwuo8AOi4BQytpQ+Wtwy0Y1vswk QI4WciWS+qDGbdeKSjNd2uhUDmIkm/o= 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 20/50] posix-cpu-timers: Split out posix-timers_types.h Date: Fri, 15 Dec 2023 22:26:19 -0500 Message-ID: <20231216032651.3553101-10-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407628064028948 X-GMAIL-MSGID: 1785407628064028948 Trimming down sched.h dependencies: we don't want to include more than the base types. Cc: Thomas Gleixner Signed-off-by: Kent Overstreet --- include/linux/posix-timers.h | 68 ++-------------------------- include/linux/posix-timers_types.h | 72 ++++++++++++++++++++++++++++++ include/linux/sched.h | 2 +- 3 files changed, 76 insertions(+), 66 deletions(-) create mode 100644 include/linux/posix-timers_types.h diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index d607f51404fc..750b0647258d 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -2,40 +2,16 @@ #ifndef _linux_POSIX_TIMERS_H #define _linux_POSIX_TIMERS_H -#include +#include #include #include -#include +#include +#include #include struct kernel_siginfo; struct task_struct; -/* - * Bit fields within a clockid: - * - * The most significant 29 bits hold either a pid or a file descriptor. - * - * Bit 2 indicates whether a cpu clock refers to a thread or a process. - * - * Bits 1 and 0 give the type: PROF=0, VIRT=1, SCHED=2, or FD=3. - * - * A clockid is invalid if bits 2, 1, and 0 are all set. - */ -#define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3)) -#define CPUCLOCK_PERTHREAD(clock) \ - (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0) - -#define CPUCLOCK_PERTHREAD_MASK 4 -#define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK) -#define CPUCLOCK_CLOCK_MASK 3 -#define CPUCLOCK_PROF 0 -#define CPUCLOCK_VIRT 1 -#define CPUCLOCK_SCHED 2 -#define CPUCLOCK_MAX 3 -#define CLOCKFD CPUCLOCK_MAX -#define CLOCKFD_MASK (CPUCLOCK_PERTHREAD_MASK|CPUCLOCK_CLOCK_MASK) - static inline clockid_t make_process_cpuclock(const unsigned int pid, const clockid_t clock) { @@ -109,44 +85,6 @@ static inline void cpu_timer_setexpires(struct cpu_timer *ctmr, u64 exp) ctmr->node.expires = exp; } -/** - * posix_cputimer_base - Container per posix CPU clock - * @nextevt: Earliest-expiration cache - * @tqhead: timerqueue head for cpu_timers - */ -struct posix_cputimer_base { - u64 nextevt; - struct timerqueue_head tqhead; -}; - -/** - * posix_cputimers - Container for posix CPU timer related data - * @bases: Base container for posix CPU clocks - * @timers_active: Timers are queued. - * @expiry_active: Timer expiry is active. Used for - * process wide timers to avoid multiple - * task trying to handle expiry concurrently - * - * Used in task_struct and signal_struct - */ -struct posix_cputimers { - struct posix_cputimer_base bases[CPUCLOCK_MAX]; - unsigned int timers_active; - unsigned int expiry_active; -}; - -/** - * posix_cputimers_work - Container for task work based posix CPU timer expiry - * @work: The task work to be scheduled - * @mutex: Mutex held around expiry in context of this task work - * @scheduled: @work has been scheduled already, no further processing - */ -struct posix_cputimers_work { - struct callback_head work; - struct mutex mutex; - unsigned int scheduled; -}; - static inline void posix_cputimers_init(struct posix_cputimers *pct) { memset(pct, 0, sizeof(*pct)); diff --git a/include/linux/posix-timers_types.h b/include/linux/posix-timers_types.h new file mode 100644 index 000000000000..57fec639a9bb --- /dev/null +++ b/include/linux/posix-timers_types.h @@ -0,0 +1,72 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _linux_POSIX_TIMERS_TYPES_H +#define _linux_POSIX_TIMERS_TYPES_H + +#include +#include +#include + +/* + * Bit fields within a clockid: + * + * The most significant 29 bits hold either a pid or a file descriptor. + * + * Bit 2 indicates whether a cpu clock refers to a thread or a process. + * + * Bits 1 and 0 give the type: PROF=0, VIRT=1, SCHED=2, or FD=3. + * + * A clockid is invalid if bits 2, 1, and 0 are all set. + */ +#define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3)) +#define CPUCLOCK_PERTHREAD(clock) \ + (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0) + +#define CPUCLOCK_PERTHREAD_MASK 4 +#define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK) +#define CPUCLOCK_CLOCK_MASK 3 +#define CPUCLOCK_PROF 0 +#define CPUCLOCK_VIRT 1 +#define CPUCLOCK_SCHED 2 +#define CPUCLOCK_MAX 3 +#define CLOCKFD CPUCLOCK_MAX +#define CLOCKFD_MASK (CPUCLOCK_PERTHREAD_MASK|CPUCLOCK_CLOCK_MASK) + +/** + * posix_cputimer_base - Container per posix CPU clock + * @nextevt: Earliest-expiration cache + * @tqhead: timerqueue head for cpu_timers + */ +struct posix_cputimer_base { + u64 nextevt; + struct timerqueue_head tqhead; +}; + +/** + * posix_cputimers - Container for posix CPU timer related data + * @bases: Base container for posix CPU clocks + * @timers_active: Timers are queued. + * @expiry_active: Timer expiry is active. Used for + * process wide timers to avoid multiple + * task trying to handle expiry concurrently + * + * Used in task_struct and signal_struct + */ +struct posix_cputimers { + struct posix_cputimer_base bases[CPUCLOCK_MAX]; + unsigned int timers_active; + unsigned int expiry_active; +}; + +/** + * posix_cputimers_work - Container for task work based posix CPU timer expiry + * @work: The task work to be scheduled + * @mutex: Mutex held around expiry in context of this task work + * @scheduled: @work has been scheduled already, no further processing + */ +struct posix_cputimers_work { + struct callback_head work; + struct mutex mutex; + unsigned int scheduled; +}; + +#endif /* _linux_POSIX_TIMERS_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index e8892789969b..6d803d0904d9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Sat Dec 16 03:26:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179762 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp15844dyi; Fri, 15 Dec 2023 19:30:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IENGJS/vozt0CKx4BqNmI0WD/HZjaQ1jRLF0LbBNzTIpeYNDtBroOAC7Ptm3j33cR/RmdHX X-Received: by 2002:a05:6871:4697:b0:1fb:75a:de65 with SMTP id ni23-20020a056871469700b001fb075ade65mr16669324oab.83.1702697411922; Fri, 15 Dec 2023 19:30:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697411; cv=none; d=google.com; s=arc-20160816; b=eIpgmcjoW2O/VcjHKafY4Ir06xDaj7Q4vuxgwx1jl01M/SU3iMpKgTW+DTE/BFZxc9 2a1UTLkpsLiJfcEHS3VSKucgyxn3zexDo+XdJwqyrG6BXQmlJUutyh7aPfyJyCdb1iLS kJzL824Uo+YrLM2ocKMfS5yRNH67BYzJZa2Iu/TEFXAE4UgxZsGsTMNSHgdbNvR7MTQL 5ACPkUcOCN3TpTiW3drFohGjFdirZFNE6W0jpZtMT13ucpiuJgvS/6plF+ch3v2O84R3 yF4sRBN3ObWncwjPdPQ4s+wNzVEbyOKHPLUTK/3o7BPpGHv75iO1IRIFDCXifD9cuats 5ipw== 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=ERZYSmZBhuvvvnoYNYpkA3Vl+n3Jximiv1YGZ7OitLQ=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=Q50FnX4EMoFyFLJoecdqDK3O72fGwds4MEiWRTMaEmlvhP+TLUicE29YIR42I1Z65U xOb44mMGTyQ6PAIaKEb8yCYmsp7lFwbLE3rafG9zuCjo2Oxi105OyaB+/KbXemkYAJnY e3z3di47UYOwZ4jWmJf2V1WLRDOVKzO5k/DKZZVdNFAra0gFVugdPmOo/UhAX4OepXBA 72F9JNRSk7f3iHDiG7lo5tq985bjxL6Nmxx8Tvwrm3a4mfIGtsMRzApHU427jriEYxoW iuqkN5C/gXpKxVYQa2G8Ha0XZM10PjXAF0s3gvfzfBMzLt/rixa9Vf6PBy4RiBW4e4d7 CBAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aaiz38pz; spf=pass (google.com: domain of linux-kernel+bounces-1996-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1996-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y123-20020a636481000000b005ca4d23fac4si5385752pgb.859.2023.12.15.19.30.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:30:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-1996-ouuuleilei=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=aaiz38pz; spf=pass (google.com: domain of linux-kernel+bounces-1996-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-1996-ouuuleilei=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 A4F70281C41 for ; Sat, 16 Dec 2023 03:30:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 08349328C8; Sat, 16 Dec 2023 03:27:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="aaiz38pz" X-Original-To: linux-kernel@vger.kernel.org Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (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 92D9521A1A for ; Sat, 16 Dec 2023 03:27:22 +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=1702697240; 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=ERZYSmZBhuvvvnoYNYpkA3Vl+n3Jximiv1YGZ7OitLQ=; b=aaiz38pzKiugC7Tlg40b87BRR7qNJ7SLJQXvUkpdJM+Lutdum8RxgQdiWqRBF8d9+kXBci 8dAv7dkfFinK2AYiUgdDki2xwVSVyOnDuDr6pLssATxbY1vRtr0MkZvomYziXMZRlSCGfx xau0WAmrv1ShMUk4AXdY6FF6ZxeArLk= 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 21/50] locking/seqlock: Split out seqlock_types.h Date: Fri, 15 Dec 2023 22:26:20 -0500 Message-ID: <20231216032651.3553101-11-kent.overstreet@linux.dev> In-Reply-To: <20231216032651.3553101-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216032651.3553101-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407641500323059 X-GMAIL-MSGID: 1785407641500323059 Trimming down sched.h dependencies: we don't want to include more than the base types. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Signed-off-by: Kent Overstreet Acked-by: Waiman Long --- include/linux/sched.h | 2 +- include/linux/seqlock.h | 79 +---------------------------- include/linux/seqlock_types.h | 93 +++++++++++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 78 deletions(-) create mode 100644 include/linux/seqlock_types.h diff --git a/include/linux/sched.h b/include/linux/sched.h index 6d803d0904d9..436f7ce1450a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index e92f9d5577ba..d90d8ee29d81 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -37,37 +38,6 @@ */ #define KCSAN_SEQLOCK_REGION_MAX 1000 -/* - * Sequence counters (seqcount_t) - * - * This is the raw counting mechanism, without any writer protection. - * - * Write side critical sections must be serialized and non-preemptible. - * - * If readers can be invoked from hardirq or softirq contexts, - * interrupts or bottom halves must also be respectively disabled before - * entering the write section. - * - * This mechanism can't be used if the protected data contains pointers, - * as the writer can invalidate a pointer that a reader is following. - * - * If the write serialization mechanism is one of the common kernel - * locking primitives, use a sequence counter with associated lock - * (seqcount_LOCKNAME_t) instead. - * - * If it's desired to automatically handle the sequence counter writer - * serialization and non-preemptibility requirements, use a sequential - * lock (seqlock_t) instead. - * - * See Documentation/locking/seqlock.rst - */ -typedef struct seqcount { - unsigned sequence; -#ifdef CONFIG_DEBUG_LOCK_ALLOC - struct lockdep_map dep_map; -#endif -} seqcount_t; - static inline void __seqcount_init(seqcount_t *s, const char *name, struct lock_class_key *key) { @@ -131,28 +101,6 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s) * See Documentation/locking/seqlock.rst */ -/* - * For PREEMPT_RT, seqcount_LOCKNAME_t write side critical sections cannot - * disable preemption. It can lead to higher latencies, and the write side - * sections will not be able to acquire locks which become sleeping locks - * (e.g. spinlock_t). - * - * To remain preemptible while avoiding a possible livelock caused by the - * reader preempting the writer, use a different technique: let the reader - * detect if a seqcount_LOCKNAME_t writer is in progress. If that is the - * case, acquire then release the associated LOCKNAME writer serialization - * lock. This will allow any possibly-preempted writer to make progress - * until the end of its writer serialization lock critical section. - * - * This lock-unlock technique must be implemented for all of PREEMPT_RT - * sleeping locks. See Documentation/locking/locktypes.rst - */ -#if defined(CONFIG_LOCKDEP) || defined(CONFIG_PREEMPT_RT) -#define __SEQ_LOCK(expr) expr -#else -#define __SEQ_LOCK(expr) -#endif - /* * typedef seqcount_LOCKNAME_t - sequence counter with LOCKNAME associated * @seqcount: The real sequence counter @@ -194,11 +142,6 @@ static inline void seqcount_lockdep_reader_access(const seqcount_t *s) * @lockbase: prefix for associated lock/unlock */ #define SEQCOUNT_LOCKNAME(lockname, locktype, preemptible, lockbase) \ -typedef struct seqcount_##lockname { \ - seqcount_t seqcount; \ - __SEQ_LOCK(locktype *lock); \ -} seqcount_##lockname##_t; \ - \ static __always_inline seqcount_t * \ __seqprop_##lockname##_ptr(seqcount_##lockname##_t *s) \ { \ @@ -284,6 +227,7 @@ SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t, false, raw_spin) SEQCOUNT_LOCKNAME(spinlock, spinlock_t, __SEQ_RT, spin) SEQCOUNT_LOCKNAME(rwlock, rwlock_t, __SEQ_RT, read) SEQCOUNT_LOCKNAME(mutex, struct mutex, true, mutex) +#undef SEQCOUNT_LOCKNAME /* * SEQCNT_LOCKNAME_ZERO - static initializer for seqcount_LOCKNAME_t @@ -794,25 +738,6 @@ static inline void raw_write_seqcount_latch(seqcount_latch_t *s) smp_wmb(); /* increment "sequence" before following stores */ } -/* - * Sequential locks (seqlock_t) - * - * Sequence counters with an embedded spinlock for writer serialization - * and non-preemptibility. - * - * For more info, see: - * - Comments on top of seqcount_t - * - Documentation/locking/seqlock.rst - */ -typedef struct { - /* - * Make sure that readers don't starve writers on PREEMPT_RT: use - * seqcount_spinlock_t instead of seqcount_t. Check __SEQ_LOCK(). - */ - seqcount_spinlock_t seqcount; - spinlock_t lock; -} seqlock_t; - #define __SEQLOCK_UNLOCKED(lockname) \ { \ .seqcount = SEQCNT_SPINLOCK_ZERO(lockname, &(lockname).lock), \ diff --git a/include/linux/seqlock_types.h b/include/linux/seqlock_types.h new file mode 100644 index 000000000000..dfdf43e3fa3d --- /dev/null +++ b/include/linux/seqlock_types.h @@ -0,0 +1,93 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_SEQLOCK_TYPES_H +#define __LINUX_SEQLOCK_TYPES_H + +#include +#include +#include + +/* + * Sequence counters (seqcount_t) + * + * This is the raw counting mechanism, without any writer protection. + * + * Write side critical sections must be serialized and non-preemptible. + * + * If readers can be invoked from hardirq or softirq contexts, + * interrupts or bottom halves must also be respectively disabled before + * entering the write section. + * + * This mechanism can't be used if the protected data contains pointers, + * as the writer can invalidate a pointer that a reader is following. + * + * If the write serialization mechanism is one of the common kernel + * locking primitives, use a sequence counter with associated lock + * (seqcount_LOCKNAME_t) instead. + * + * If it's desired to automatically handle the sequence counter writer + * serialization and non-preemptibility requirements, use a sequential + * lock (seqlock_t) instead. + * + * See Documentation/locking/seqlock.rst + */ +typedef struct seqcount { + unsigned sequence; +#ifdef CONFIG_DEBUG_LOCK_ALLOC + struct lockdep_map dep_map; +#endif +} seqcount_t; + +/* + * For PREEMPT_RT, seqcount_LOCKNAME_t write side critical sections cannot + * disable preemption. It can lead to higher latencies, and the write side + * sections will not be able to acquire locks which become sleeping locks + * (e.g. spinlock_t). + * + * To remain preemptible while avoiding a possible livelock caused by the + * reader preempting the writer, use a different technique: let the reader + * detect if a seqcount_LOCKNAME_t writer is in progress. If that is the + * case, acquire then release the associated LOCKNAME writer serialization + * lock. This will allow any possibly-preempted writer to make progress + * until the end of its writer serialization lock critical section. + * + * This lock-unlock technique must be implemented for all of PREEMPT_RT + * sleeping locks. See Documentation/locking/locktypes.rst + */ +#if defined(CONFIG_LOCKDEP) || defined(CONFIG_PREEMPT_RT) +#define __SEQ_LOCK(expr) expr +#else +#define __SEQ_LOCK(expr) +#endif + +#define SEQCOUNT_LOCKNAME(lockname, locktype, preemptible, lockbase) \ +typedef struct seqcount_##lockname { \ + seqcount_t seqcount; \ + __SEQ_LOCK(locktype *lock); \ +} seqcount_##lockname##_t; + +SEQCOUNT_LOCKNAME(raw_spinlock, raw_spinlock_t, false, raw_spin) +SEQCOUNT_LOCKNAME(spinlock, spinlock_t, __SEQ_RT, spin) +SEQCOUNT_LOCKNAME(rwlock, rwlock_t, __SEQ_RT, read) +SEQCOUNT_LOCKNAME(mutex, struct mutex, true, mutex) +#undef SEQCOUNT_LOCKNAME + +/* + * Sequential locks (seqlock_t) + * + * Sequence counters with an embedded spinlock for writer serialization + * and non-preemptibility. + * + * For more info, see: + * - Comments on top of seqcount_t + * - Documentation/locking/seqlock.rst + */ +typedef struct { + /* + * Make sure that readers don't starve writers on PREEMPT_RT: use + * seqcount_spinlock_t instead of seqcount_t. Check __SEQ_LOCK(). + */ + seqcount_spinlock_t seqcount; + spinlock_t lock; +} seqlock_t; + +#endif /* __LINUX_SEQLOCK_TYPES_H */ From patchwork Sat Dec 16 03:29:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16230dyi; Fri, 15 Dec 2023 19:31:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxZBD2KQGOlm8+wtYWj3+zUlKX3lyzKOtL+Sie2trumzOLTr+RkdyLn47gDckQLi4kIFda X-Received: by 2002:a05:620a:4891:b0:77d:cfff:3420 with SMTP id ea17-20020a05620a489100b0077dcfff3420mr17786007qkb.9.1702697481018; Fri, 15 Dec 2023 19:31:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697481; cv=none; d=google.com; s=arc-20160816; b=FYKYyQ0GIXbhgd/rGvffsmJK+7DwXac88yVx/7BXksJrarLZzONO2qLPsY9TnxAb4/ lDQinLEsY1vxt+Bk+Q2zMvPJt4Dt+XHNJ6J9riWziZl7XOO1NzhaGxlvp8HBjRgI5quG 6BcZw5d1hSRAkl46mJA5TqmimHCX2c0Cn7UjblMGbtSc/E1BEP8W5n+u5C01UsW9PDR+ +NJp+lu5r856Fc3Fau0YYQ/hJliICDtmXo4ayIbL/+D4edxQ6OjPCtri3SpcUksI4Wwx s8LXVe1REXYTC6+l9aS+3Ru+oBBC/dNFutEweMoxjNWChcTLsEIM0UB+rKF6OVeSf5TL G1pg== 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=ocPDVHoS7vEhw6tr2I6a+vqz6+CvzqYlQOZuWmaACjs=; fh=kVeC8csnnfNlBPSkJ6lZkeTw2oqL3mSVlIIfxwC6HTE=; b=yNjtogpaqMHEGqTsVJJAwaMoYk+fCba4AWH0MhHh8wV1DbCeJytk1rugs6IlwBRY49 YITATnQgk78z4zMvQOmuStx89MJ7Kqv06OMYOm+kZ1afOjbrrEEql9eMH6W4qs9fmC5t PNzylJZzD7UsosCRJe7VLP+4CUAbicOalr9KoSJ680Z0/BBbxHh5ADHa+c16+V/yB1yW mqYsjZAkjQ+rzRh/q1Q/odlxNq3YqgyTZAKIHYPG9qbOU6yhkrq7qWZbUjZZzXkws3OY k1CAoU71Wt31j5RIgC+dBwDW00fcukNE3fTx9Vn5NLG6n81avcRW2vX/A/Rxc/1LGqrK BjLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=MFvpTzAH; spf=pass (google.com: domain of linux-kernel+bounces-2000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2000-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h13-20020a05620a284d00b0077d6046fc74si10071957qkp.577.2023.12.15.19.31.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:31:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=MFvpTzAH; spf=pass (google.com: domain of linux-kernel+bounces-2000-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2000-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CB21B1C24933 for ; Sat, 16 Dec 2023 03:31:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D8CE4125B9; Sat, 16 Dec 2023 03:30:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="MFvpTzAH" X-Original-To: linux-kernel@vger.kernel.org Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (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 BDD48101F5 for ; Sat, 16 Dec 2023 03:30:08 +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=1702697406; 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=ocPDVHoS7vEhw6tr2I6a+vqz6+CvzqYlQOZuWmaACjs=; b=MFvpTzAHZrRy1GsWJgEbV5sUn3JBdOzPITqjc+x2YXTYOyRxMDxGyb0QcQlfWXCByyKVKk G0ZLeiQmLO2bKrCM457BFrpTL8dvQbBS8Dszx5Keykadem6YhSAfF3z/4a52vJrcMYILTh b/dEnYVIXWAmR5h3vpZWXvEStueaZm0= 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, Andy Lutomirski , Will Drewry Subject: [PATCH 22/50] pid: Split out pid_types.h Date: Fri, 15 Dec 2023 22:29:28 -0500 Message-ID: <20231216032957.3553313-1-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407713643186671 X-GMAIL-MSGID: 1785407713643186671 Trimming down sched.h dependencies: we dont't want to include more than the base types. Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Signed-off-by: Kent Overstreet --- drivers/target/target_core_xcopy.c | 1 + include/linux/pid.h | 15 ++------------- include/linux/pid_types.h | 16 ++++++++++++++++ include/linux/sched.h | 2 +- include/linux/seccomp.h | 2 ++ 5 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 include/linux/pid_types.h diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c index 91ed015b588c..4128631c9dfd 100644 --- a/drivers/target/target_core_xcopy.c +++ b/drivers/target/target_core_xcopy.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/pid.h b/include/linux/pid.h index 653a527574c4..f254c3a45b9b 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -2,18 +2,10 @@ #ifndef _LINUX_PID_H #define _LINUX_PID_H +#include #include -#include #include - -enum pid_type -{ - PIDTYPE_PID, - PIDTYPE_TGID, - PIDTYPE_PGID, - PIDTYPE_SID, - PIDTYPE_MAX, -}; +#include /* * What is struct pid? @@ -110,9 +102,6 @@ extern void exchange_tids(struct task_struct *task, struct task_struct *old); extern void transfer_pid(struct task_struct *old, struct task_struct *new, enum pid_type); -struct pid_namespace; -extern struct pid_namespace init_pid_ns; - extern int pid_max; extern int pid_max_min, pid_max_max; diff --git a/include/linux/pid_types.h b/include/linux/pid_types.h new file mode 100644 index 000000000000..c2aee1d91dcf --- /dev/null +++ b/include/linux/pid_types.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_PID_TYPES_H +#define _LINUX_PID_TYPES_H + +enum pid_type { + PIDTYPE_PID, + PIDTYPE_TGID, + PIDTYPE_PGID, + PIDTYPE_SID, + PIDTYPE_MAX, +}; + +struct pid_namespace; +extern struct pid_namespace init_pid_ns; + +#endif /* _LINUX_PID_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 436f7ce1450a..37cc9d257073 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -11,7 +11,7 @@ #include -#include +#include #include #include #include diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 175079552f68..1ec0d8dc4b69 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -126,6 +126,8 @@ static inline long seccomp_get_metadata(struct task_struct *task, #ifdef CONFIG_SECCOMP_CACHE_DEBUG struct seq_file; +struct pid_namespace; +struct pid; int proc_pid_seccomp_cache(struct seq_file *m, struct pid_namespace *ns, struct pid *pid, struct task_struct *task); From patchwork Sat Dec 16 03:29:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16294dyi; Fri, 15 Dec 2023 19:31:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHY3Lmj0PDxmSpAiookR/t5gTwt0XMwyfX6qBfMwDJe6iZEMBcmOk+nu18etKFrkXeKB6xI X-Received: by 2002:a05:6359:2c43:b0:170:2c52:2b4d with SMTP id qv3-20020a0563592c4300b001702c522b4dmr7276982rwb.19.1702697497097; Fri, 15 Dec 2023 19:31:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697497; cv=none; d=google.com; s=arc-20160816; b=pgQFKXyJTPz9DHZFbrjRFCeTzy86el4j2gkxH9Dn2J3UdgPJwvM5NgVwGq39qjui/n aoUNWsCxxITMcWiGpTf6f2qym6L9TRSQdRQJ+t1ewShj3SL6YK2DsZ8AxmROP7p94/2u 3KJgTaUxeYfVYsq5nfZpTNn9aTP2njjp/lya50DrH4XtJ5dkwRaxX5hrZW79WRlU7TIQ nBq8lHHK1OP4qOrSixYSgnTfuc4c6OjJAo5f7w41ZZ41XmgBgN6aV41mI8TZ/nERa9Gm iI8bNISUF7mbD6HOB9wisotZE1JHswREtZXUq5gbfbGvLi2hSBGrSaqM3L3n/dZ+NxkJ ytcQ== 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=1J6ZTRPGT7PpELf8O6mfGNQjPQNgqo1t5goRsr9dKXE=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=C1DcAXsTWIQ1LzOkd7WlKidNWp0vZcmy2kff+pqEfn87AFHTbDmnDsIEoUI2rD0l69 yi30NC8r+QLm/af3mPibMohGj1mLdrF/kI0w5/u/M1Z8NMEYzXRJW/3CdlIOrPyOF2JA TwVTgpOPY8sW0VwSn7ua+3yZDQ4/sAHcZrWAiv1ZSaRuTPvliLPDoxiznFwgOebrnbdj D6+5RPsrGKNDGS2Dea9CqWkO2JLt3iKY4URNFy3GV+N2MSb3j0m3w+6ksoyyfL4kBC84 eAb/ozO7vGv2eTSKJfOoaiEhRiQWDf0ufsOvnZaXkDkYCI05bAKwkY+rKZW3cpUZ/4uT /bNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Ub89eKfF; spf=pass (google.com: domain of linux-kernel+bounces-2001-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2001-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l12-20020a17090a660c00b0028add4281a1si4534914pjj.82.2023.12.15.19.31.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:31:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2001-ouuuleilei=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=Ub89eKfF; spf=pass (google.com: domain of linux-kernel+bounces-2001-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2001-ouuuleilei=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 CDA93285620 for ; Sat, 16 Dec 2023 03:31:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD58814000; Sat, 16 Dec 2023 03:30:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Ub89eKfF" X-Original-To: linux-kernel@vger.kernel.org Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (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 232EC101FC for ; Sat, 16 Dec 2023 03:30:10 +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=1702697408; 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=1J6ZTRPGT7PpELf8O6mfGNQjPQNgqo1t5goRsr9dKXE=; b=Ub89eKfF4KwlYPY3oicjXOZKpYuat1K555e6TGwRfSnQoXCnNUJbKIdPAyjk1b9XDbIPy7 x8yEi4bfsWn2Qg+9JNwwsx9W1iU7KF6BOD9GMX7AslVE9aBBEX+bF5/694hrP1Omg/IxTk WLfmh+zSwPDwMMjCqp42ArexI14ZMqM= 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 23/50] sched.h: move pid helpers to pid.h Date: Fri, 15 Dec 2023 22:29:29 -0500 Message-ID: <20231216032957.3553313-2-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407730688141524 X-GMAIL-MSGID: 1785407730688141524 This is needed for killing the sched.h dependency on rcupdate.h, and pid.h is a better place for this code anyways. Signed-off-by: Kent Overstreet --- include/linux/pid.h | 125 +++++++++++++++++++++++++++++++++++ include/linux/sched.h | 122 ---------------------------------- include/linux/sched/signal.h | 1 + 3 files changed, 126 insertions(+), 122 deletions(-) diff --git a/include/linux/pid.h b/include/linux/pid.h index f254c3a45b9b..395cacce1179 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -4,7 +4,9 @@ #include #include +#include #include +#include #include /* @@ -204,4 +206,127 @@ pid_t pid_vnr(struct pid *pid); } \ task = tg___; \ } while_each_pid_task(pid, type, task) + +static inline struct pid *task_pid(struct task_struct *task) +{ + return task->thread_pid; +} + +/* + * the helpers to get the task's different pids as they are seen + * from various namespaces + * + * task_xid_nr() : global id, i.e. the id seen from the init namespace; + * task_xid_vnr() : virtual id, i.e. the id seen from the pid namespace of + * current. + * task_xid_nr_ns() : id seen from the ns specified; + * + * see also pid_nr() etc in include/linux/pid.h + */ +pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, struct pid_namespace *ns); + +static inline pid_t task_pid_nr(struct task_struct *tsk) +{ + return tsk->pid; +} + +static inline pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns); +} + +static inline pid_t task_pid_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PID, NULL); +} + + +static inline pid_t task_tgid_nr(struct task_struct *tsk) +{ + return tsk->tgid; +} + +/** + * pid_alive - check that a task structure is not stale + * @p: Task structure to be checked. + * + * Test if a process is not yet dead (at most zombie state) + * If pid_alive fails, then pointers within the task structure + * can be stale and must not be dereferenced. + * + * Return: 1 if the process is alive. 0 otherwise. + */ +static inline int pid_alive(const struct task_struct *p) +{ + return p->thread_pid != NULL; +} + +static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns); +} + +static inline pid_t task_pgrp_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_PGID, NULL); +} + + +static inline pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns); +} + +static inline pid_t task_session_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); +} + +static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_TGID, ns); +} + +static inline pid_t task_tgid_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, PIDTYPE_TGID, NULL); +} + +static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns) +{ + pid_t pid = 0; + + rcu_read_lock(); + if (pid_alive(tsk)) + pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns); + rcu_read_unlock(); + + return pid; +} + +static inline pid_t task_ppid_nr(const struct task_struct *tsk) +{ + return task_ppid_nr_ns(tsk, &init_pid_ns); +} + +/* Obsolete, do not use: */ +static inline pid_t task_pgrp_nr(struct task_struct *tsk) +{ + return task_pgrp_nr_ns(tsk, &init_pid_ns); +} + +/** + * is_global_init - check if a task structure is init. Since init + * is free to have sub-threads we need to check tgid. + * @tsk: Task structure to be checked. + * + * Check if a task structure is the first user space task the kernel created. + * + * Return: 1 if the task structure is init. 0 otherwise. + */ +static inline int is_global_init(struct task_struct *tsk) +{ + return task_tgid_nr(tsk) == 1; +} + #endif /* _LINUX_PID_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 37cc9d257073..9e2708c2cfa6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1561,114 +1561,6 @@ struct task_struct { */ }; -static inline struct pid *task_pid(struct task_struct *task) -{ - return task->thread_pid; -} - -/* - * the helpers to get the task's different pids as they are seen - * from various namespaces - * - * task_xid_nr() : global id, i.e. the id seen from the init namespace; - * task_xid_vnr() : virtual id, i.e. the id seen from the pid namespace of - * current. - * task_xid_nr_ns() : id seen from the ns specified; - * - * see also pid_nr() etc in include/linux/pid.h - */ -pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, struct pid_namespace *ns); - -static inline pid_t task_pid_nr(struct task_struct *tsk) -{ - return tsk->pid; -} - -static inline pid_t task_pid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_PID, ns); -} - -static inline pid_t task_pid_vnr(struct task_struct *tsk) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_PID, NULL); -} - - -static inline pid_t task_tgid_nr(struct task_struct *tsk) -{ - return tsk->tgid; -} - -/** - * pid_alive - check that a task structure is not stale - * @p: Task structure to be checked. - * - * Test if a process is not yet dead (at most zombie state) - * If pid_alive fails, then pointers within the task structure - * can be stale and must not be dereferenced. - * - * Return: 1 if the process is alive. 0 otherwise. - */ -static inline int pid_alive(const struct task_struct *p) -{ - return p->thread_pid != NULL; -} - -static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns); -} - -static inline pid_t task_pgrp_vnr(struct task_struct *tsk) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_PGID, NULL); -} - - -static inline pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_SID, ns); -} - -static inline pid_t task_session_vnr(struct task_struct *tsk) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); -} - -static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_TGID, ns); -} - -static inline pid_t task_tgid_vnr(struct task_struct *tsk) -{ - return __task_pid_nr_ns(tsk, PIDTYPE_TGID, NULL); -} - -static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns) -{ - pid_t pid = 0; - - rcu_read_lock(); - if (pid_alive(tsk)) - pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns); - rcu_read_unlock(); - - return pid; -} - -static inline pid_t task_ppid_nr(const struct task_struct *tsk) -{ - return task_ppid_nr_ns(tsk, &init_pid_ns); -} - -/* Obsolete, do not use: */ -static inline pid_t task_pgrp_nr(struct task_struct *tsk) -{ - return task_pgrp_nr_ns(tsk, &init_pid_ns); -} - #define TASK_REPORT_IDLE (TASK_REPORT + 1) #define TASK_REPORT_MAX (TASK_REPORT_IDLE << 1) @@ -1712,20 +1604,6 @@ static inline char task_state_to_char(struct task_struct *tsk) return task_index_to_char(task_state_index(tsk)); } -/** - * is_global_init - check if a task structure is init. Since init - * is free to have sub-threads we need to check tgid. - * @tsk: Task structure to be checked. - * - * Check if a task structure is the first user space task the kernel created. - * - * Return: 1 if the task structure is init. 0 otherwise. - */ -static inline int is_global_init(struct task_struct *tsk) -{ - return task_tgid_nr(tsk) == 1; -} - extern struct pid *cad_pid; /* diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 3499c1a8b929..b847d8fa75a9 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include From patchwork Sat Dec 16 03:29:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16368dyi; Fri, 15 Dec 2023 19:31:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBErKxTxnnq5/3OzJJIqVkLX/llcd7hz4JqXoiBzfRKM1V+lX3Yswxi1ihetfowiDeNHHD X-Received: by 2002:a92:c24b:0:b0:35d:59a2:6461 with SMTP id k11-20020a92c24b000000b0035d59a26461mr15123311ilo.52.1702697514467; Fri, 15 Dec 2023 19:31:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697514; cv=none; d=google.com; s=arc-20160816; b=QVJjFVH1LGJHBTZnI7YA/F6j6orxF7UlWpme+kYsY9MIaqMjjhxTN1E5nfb1omTVGv DQVWQX1NiAyCUAoZipyhi0L9wGPPaJW2AfIADJR3p1QfXHAGpoAXkBiFwixL87nxN6N0 6Fd2gCbLCF8HmZbMOnCn4K/s11qIHlNL9Wo7SrD+e/WPJzgt5aqpiPtm1ZgsdQQkSXSe PJ2KfR0oabGTEGc5eKosu3qUDBFmjq3oYAArxN8/bekTXeLZsuHY1DXT3VqwJ7YhqQ6Z 9CYjMPuIbeLpwYWYarGzLbLtsl3Tz2Y3K1L15pydBKY38tKJTHO3ZSsdm0g8GLNCODMC Y2Xw== 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=perIwL4jXB4r21Fv4KTrzGxY/6sHRKJXYGHhpp/B6G0=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=hR869WeAyYYXPZACfCBO5ETEoJ8BRoLIBvBUiY3UNcswclKEh1sIgj+8FwxuAPD9Ix oDVuDa8A4qVO+rDDwCpd+trUanGnRfJYY31dMJ6iD/Pc/PICome097lhiPj3y/m36MMO vWE32reXcWWjKmroSjosn7oPvcuBbUZE+XYB6XYFfGh86W8Jn+uC5A7dayCZviBkMHgJ 674L71uLFEBr71Q7hZLVIFFZZ2d3gkgL30TsIcKpMXtODacTF4uwozRdiLJlY2X9A7S8 LqiPyZDXRACYf8XK0Do+scTpvmowm2qHsssLs0RzaoNISM0lZfcw+8se/ZwhRuizsZt8 re0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=ia9m6uyy; spf=pass (google.com: domain of linux-kernel+bounces-2002-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2002-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id e12-20020a65688c000000b005b96662f77asi13909275pgt.482.2023.12.15.19.31.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:31:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2002-ouuuleilei=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=ia9m6uyy; spf=pass (google.com: domain of linux-kernel+bounces-2002-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2002-ouuuleilei=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 F180D2855EF for ; Sat, 16 Dec 2023 03:31:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 933661640A; Sat, 16 Dec 2023 03:30:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ia9m6uyy" X-Original-To: linux-kernel@vger.kernel.org Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (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 0EFB011181 for ; Sat, 16 Dec 2023 03:30:11 +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=1702697410; 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=perIwL4jXB4r21Fv4KTrzGxY/6sHRKJXYGHhpp/B6G0=; b=ia9m6uyy5c8z4Ps150HZ3r7QU3i5xp5t9Ok4TTJbZ+ggRwRD8HP7dF+F8VTCxLqCfTsKpY iB6B2Xd6p3pxJa5tx18NHaq/cxURtJYyBDh1mnVsGaRDZ9zxBSuE/hBGIyzC0w5eEoaraU EHozuvKA9327XaEjZA+DfyBoxkWgHog= 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 24/50] plist: Split out plist_types.h Date: Fri, 15 Dec 2023 22:29:30 -0500 Message-ID: <20231216032957.3553313-3-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407748946900143 X-GMAIL-MSGID: 1785407748946900143 Trimming down sched.h dependencies: we don't want to include more than the base types. Signed-off-by: Kent Overstreet --- include/linux/plist.h | 12 +----------- include/linux/plist_types.h | 17 +++++++++++++++++ include/linux/sched.h | 2 +- init/init_task.c | 1 + kernel/futex/core.c | 1 + kernel/futex/requeue.c | 1 + kernel/futex/waitwake.c | 1 + mm/swapfile.c | 1 + 8 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 include/linux/plist_types.h diff --git a/include/linux/plist.h b/include/linux/plist.h index 0f352c1d3c80..8c1c8adf7fe9 100644 --- a/include/linux/plist.h +++ b/include/linux/plist.h @@ -75,20 +75,10 @@ #include #include -#include +#include #include -struct plist_head { - struct list_head node_list; -}; - -struct plist_node { - int prio; - struct list_head prio_list; - struct list_head node_list; -}; - /** * PLIST_HEAD_INIT - static struct plist_head initializer * @head: struct plist_head variable name diff --git a/include/linux/plist_types.h b/include/linux/plist_types.h new file mode 100644 index 000000000000..c37e784330af --- /dev/null +++ b/include/linux/plist_types.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef _LINUX_PLIST_TYPES_H +#define _LINUX_PLIST_TYPES_H + +#include + +struct plist_head { + struct list_head node_list; +}; + +struct plist_node { + int prio; + struct list_head prio_list; + struct list_head node_list; +}; + +#endif /* _LINUX_PLIST_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 9e2708c2cfa6..8c230f24688b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/init/init_task.c b/init/init_task.c index 5727d42149c3..56220898a256 100644 --- a/init/init_task.c +++ b/init/init_task.c @@ -12,6 +12,7 @@ #include #include #include +#include #include diff --git a/kernel/futex/core.c b/kernel/futex/core.c index dad981a865b8..e0e853412c15 100644 --- a/kernel/futex/core.c +++ b/kernel/futex/core.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include diff --git a/kernel/futex/requeue.c b/kernel/futex/requeue.c index eb21f065816b..b47bb764b352 100644 --- a/kernel/futex/requeue.c +++ b/kernel/futex/requeue.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include #include #include "futex.h" diff --git a/kernel/futex/waitwake.c b/kernel/futex/waitwake.c index 61b112897a84..3a10375d9521 100644 --- a/kernel/futex/waitwake.c +++ b/kernel/futex/waitwake.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later +#include #include #include #include diff --git a/mm/swapfile.c b/mm/swapfile.c index 4bc70f459164..25019af07181 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include From patchwork Sat Dec 16 03:29:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179767 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16423dyi; Fri, 15 Dec 2023 19:32:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2bJHaKfHj/yPO6PKksnU4QWiAoC3htsJECLAojMJBeiZ8TxPsYvpkez8Dxo9qhgkIgJY+ X-Received: by 2002:a50:aa96:0:b0:552:7473:101d with SMTP id q22-20020a50aa96000000b005527473101dmr2374097edc.32.1702697529124; Fri, 15 Dec 2023 19:32:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697529; cv=none; d=google.com; s=arc-20160816; b=KVwfzBwn7Zx5tu54mu8CPrfVaDYRds/prwNevEOrC0EdCcic/lFb07YVuzi1mUu0nF FNsIu7PabJwMrLeEd5AuunZtAeY5TGbC2EBjeQ6gD2uSeAIi3V2t+/JXPuCQC3C45ixn JBFsAKsCM7gzpxvStdk5+rRjmXcPTZXqEYCpnW4IGDQLOUMSj4FflJTHjNM23I8cOKPx gRJXasuT6se1BTs5MJ0/7LWSN0Zj4u1vXZAlxHWuifCgmFQEsagFIYrWwdy4OiwnOlGp M7znA2e8WjxUvv8pQsq4rmmNNX4gKHMa+LwT4tmFxSBvdl+wKSA1r8FvVAlR1LIsL+Cx R7rQ== 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=BWWbNWB6VpQ4v6HXE97z0y+8sBKzqDJYsJkDQq7GMzU=; fh=Y0S32WyXoK2afK1asdfTsejF7K45bibmBVh2KgKTKgw=; b=GGp4oVH50ZOUCnck8VjQdAbOotCcBJlhfOHHlm0Tc7YupGyWEUPOzwomU7Afad61Yz e2wDP/V0K8P6yXYRpkTs93FZd33OJEM260jE6Kum4tTULJ2DyzG0VHptyNceINec6czk dfykDKX6snVR+7CzLNicsX+2R1aDQamnjebGcNukHnR77xe7tutdq+6wPLVI4tN74+5e Ogw4zRLp9YcVQoOJPg2z8/Wbi/1D1lGPE+eaTCcvfTj5KnJJpU3BHFK+0UEw0bSn8zIB wCGtiXxful+Nn+dso//i7LfCnKCLYZN+f0Kr02Nf4QNXBvE9C6AIiOI4eMDxpDyDKfRL ERRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=BT9Ag6IZ; spf=pass (google.com: domain of linux-kernel+bounces-2003-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2003-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u30-20020a50951e000000b0054cfed181d5si8286772eda.595.2023.12.15.19.32.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:32:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2003-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=BT9Ag6IZ; spf=pass (google.com: domain of linux-kernel+bounces-2003-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2003-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B94DA1F25B44 for ; Sat, 16 Dec 2023 03:32:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A5A6119452; Sat, 16 Dec 2023 03:30:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="BT9Ag6IZ" X-Original-To: linux-kernel@vger.kernel.org Received: from out-174.mta0.migadu.com (out-174.mta0.migadu.com [91.218.175.174]) (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 340A8134D9 for ; Sat, 16 Dec 2023 03:30:13 +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=1702697412; 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=BWWbNWB6VpQ4v6HXE97z0y+8sBKzqDJYsJkDQq7GMzU=; b=BT9Ag6IZF8G1irnOMIJzzmo2Vm7P/PbA51fsRpCFyMHM7GkF/KyOo7s5nF5ZUtg9mtgohM MnPdk+4WGq9bmhVq5Z8iwMdIf+sOgRsg9c57jBEdlN65RQArj8/UnDj+5G7LOogiGRFx7P rWWZWziTLjPAuIQlwfGV05WGcaXEg4U= From: Kent Overstreet To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , 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, Kent Overstreet Subject: [PATCH 25/50] wait: Remove uapi header file from main header file Date: Fri, 15 Dec 2023 22:29:31 -0500 Message-ID: <20231216032957.3553313-4-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407763997374586 X-GMAIL-MSGID: 1785407763997374586 From: "Matthew Wilcox (Oracle)" There's really no overlap between uapi/linux/wait.h and linux/wait.h. There are two files which rely on the uapi file being implcitly included, so explicitly include it there and remove it from the main header file. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Kent Overstreet Reviewed-by: Christian Brauner --- include/linux/wait.h | 1 - kernel/exit.c | 4 +++- kernel/pid_namespace.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index 3473b663176f..8aa3372f21a0 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -9,7 +9,6 @@ #include #include -#include typedef struct wait_queue_entry wait_queue_entry_t; diff --git a/kernel/exit.c b/kernel/exit.c index ee9f43bed49a..2ef33047371b 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -69,8 +69,10 @@ #include #include #include - #include + +#include + #include #include diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 3028b2218aa4..7ade20e95232 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "pid_sysctl.h" static DEFINE_MUTEX(pid_caches_mutex); From patchwork Sat Dec 16 03:29:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179768 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16508dyi; Fri, 15 Dec 2023 19:32:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IFan2bWdu68o7IVircLiTPQE9CYaijC/SN2PE3FV4pLu93EhXBMcCpuCykmXEFJf4PT84Vd X-Received: by 2002:a05:620a:66c:b0:77f:367a:94b2 with SMTP id a12-20020a05620a066c00b0077f367a94b2mr11952535qkh.24.1702697550906; Fri, 15 Dec 2023 19:32:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697550; cv=none; d=google.com; s=arc-20160816; b=Zl8J81RqR0fIwCf8/yZ1SKevpl6D/3H3MPo+I+s4A2+pC38tYsv8J6qmoxlsnHdtPy ewUGwbyIwmDM23a6UkCC+dRhuG/HNlA3mjjXOmwzN3sp+3gsi0HwhN6rN2HKHA0u9jpU fZHkjMMLcHEPZ2WXO7whgDe7zOTlVKtT40FyCLL8lhQHSqOJjGs5u3oQIzsJ4fir2+Qf R+3XNqbNLMrRRgg+XkosbG22VYrfInfkfRdhPtkI5SWjqY7VTKMxK7NpBhrbKZxJizps 154ou7RZcAVSDFABG7m7Ysl05GvTpct0WroodA1aGAjq54OgtcgH8iSnz2dZk6Rhb/ub fJ2A== 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=rtDUoALwqI+g2qj/syyUKIfkTgVXczGUzidLREHShN8=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=ALCZyhvQUvvBQtTTU+iFVv2XVut0ERTNQc5Ad6srd2nRayobdomX7g/YZqhn67Dhg0 KS7t0CoNcxNMCt7PvVY/l//RCnlEpBKszx4ZTxmgi9iWpNVyD/vxjghZandzrzMdjf9+ sJrgl2L+CSqi44bi3kY2etfU1qRU+3FkOBDnj0TmtZvhaAg1aOWoJ3F/shcbmvieqf8Q QdCtYLi4upKnNjxu8pcS0EmJIA1DOo1RQ31MWonvAXFWWxvAUP57j8Gp+HInAHZFsReZ ibPcjM+Fg5OWHenUINO9cEECeaA/Q/jYmPoKFxcmMSwJUnaa7/PxRcRquQEZT/AIv2Cy +ihw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=HpkGGFTL; spf=pass (google.com: domain of linux-kernel+bounces-2004-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2004-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h13-20020a05620a284d00b0077d6046fc74si10071957qkp.577.2023.12.15.19.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:32:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2004-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=HpkGGFTL; spf=pass (google.com: domain of linux-kernel+bounces-2004-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2004-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A301E1C249B2 for ; Sat, 16 Dec 2023 03:32:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A308B1E49C; Sat, 16 Dec 2023 03:30:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="HpkGGFTL" X-Original-To: linux-kernel@vger.kernel.org Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 0D6E4154A9 for ; Sat, 16 Dec 2023 03:30:15 +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=1702697414; 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=rtDUoALwqI+g2qj/syyUKIfkTgVXczGUzidLREHShN8=; b=HpkGGFTLmnIEAldznXmIuzcl6WhaQmAB+S6Ghz59tnYFRB1sf6EOvUkriIWqguZMy9GIkA bJjNoFlkPecsXXAZMvgQnZ0JeCyu4NyhHnQyKv6CTFVDMv+U4IsvwJk+EAuBLO3Rxt8y/J MLPI5ObUrctIN0OaCmfNPnGXSA9Uhb8= 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 26/50] rslib: kill bogus dependency on list.h Date: Fri, 15 Dec 2023 22:29:32 -0500 Message-ID: <20231216032957.3553313-5-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407787460081853 X-GMAIL-MSGID: 1785407787460081853 list_head is defined in types.h, not list.h - this kills a sched.h dependency. Signed-off-by: Kent Overstreet --- include/linux/rslib.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/rslib.h b/include/linux/rslib.h index 238bb85243d3..a04dacbdc8ae 100644 --- a/include/linux/rslib.h +++ b/include/linux/rslib.h @@ -10,7 +10,6 @@ #ifndef _RSLIB_H_ #define _RSLIB_H_ -#include #include /* for gfp_t */ #include /* for GFP_KERNEL */ From patchwork Sat Dec 16 03:29:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179769 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16590dyi; Fri, 15 Dec 2023 19:32:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWgbmfrSiEVhLDUFNCpVxQUMLHzpNKXlsf33xVRM55o1tlq8zI0M6VqStqguuqJbJyL4Hf X-Received: by 2002:a05:622a:1a0d:b0:425:a7a6:8ca9 with SMTP id f13-20020a05622a1a0d00b00425a7a68ca9mr18535978qtb.55.1702697571523; Fri, 15 Dec 2023 19:32:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697571; cv=none; d=google.com; s=arc-20160816; b=j8YPeJoaN+nn63FlqDK2usdXn9SR177W3qq1jBQGLlpTRHIBFOsHfLOYPcXhdHx0Uv cfFR/Fx6YhQeQgugAX0unq9c1xrzNPeypaZqQRhv3+UTG6Sg0AiBdHaZymgap9fViK69 y4LP/+L3TXvqH93YQ8r0ZYgc39RnmyPqq2/gU+274U1IEn6N8tb1xAg9Tdj6maCEIJeO 3nKbCA298qFdzXn587jR4NFtNK/XZBVqQ8zoVoqVvl2zLgy5zpXGaXfBAjOfVRpoWmav +L6kbIs60UAR2iZhaBelrPFPAAyG93gGVnlR6PavdZxxeENaEtBZAyaWsms0mczCxLh8 8c2w== 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=UOn/Y15NsNzqgslo/DGUA4vnnDcPK/hObV7tmn0+yB0=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=CwPxWs38SMF1eFH/Qo3nVKvKHKwRS+cucSh5WBwkbUMU/umhTzp6wnxNfVABoWaXzD VkXn6tkQqpRIZG9HxOCO2wTFXA/K5DvMjWcjnCIxBDthKy67PlN16repuEFE+g96hvR7 awE/A7HQ8gKSe7+T4sNBUkth4aNhlEktprns+OexrrtlODK8YVTt1detPFFFp5j69bmW g1WdUwYmTJrMmDw+4EhA5pzqy+Zf3hKPNHiEh72t2AnDRbuUHLq5BqHPI3Nm3f/rG5Mp AXSMQZXKIfusiUAVUvt0ungsu0R3iiDWzSzQ4yRPLtuckKXp1+7eQqT+0Wbwys/9w36m gBkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=t9xGdVnf; spf=pass (google.com: domain of linux-kernel+bounces-2005-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2005-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v23-20020a05622a189700b00425532cad35si20117132qtc.413.2023.12.15.19.32.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:32:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2005-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=t9xGdVnf; spf=pass (google.com: domain of linux-kernel+bounces-2005-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2005-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 521291C24935 for ; Sat, 16 Dec 2023 03:32:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EACFB2C69D; Sat, 16 Dec 2023 03:30:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="t9xGdVnf" X-Original-To: linux-kernel@vger.kernel.org Received: from out-178.mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (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 D223C18B04 for ; Sat, 16 Dec 2023 03:30:17 +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=1702697416; 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=UOn/Y15NsNzqgslo/DGUA4vnnDcPK/hObV7tmn0+yB0=; b=t9xGdVnfoMSLTM9Td4x0n7yOYowwiWYquuWGItTI09FEmyYaq1F5zDGKbE6Z68kquCcZ4v QzWKPsB1k1p716MbbYUSL3g+gxUets/iissMmxK50hFXtT7+43ywuaUk/ZRITZoXnE5n/A qzJSrRGwWvwDYzhsS7l0YJyP71QnUks= 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 27/50] timerqueue: Split out timerqueue_types.h Date: Fri, 15 Dec 2023 22:29:33 -0500 Message-ID: <20231216032957.3553313-6-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407808904152829 X-GMAIL-MSGID: 1785407808904152829 Trimming down sched.h dependencies: timerqueue_types can include just rbtree_types.h instead of pulling in rbtree.h. Cc: Thomas Gleixner Signed-off-by: Kent Overstreet --- include/linux/hrtimer_types.h | 2 +- include/linux/posix-timers_types.h | 2 +- include/linux/timerqueue.h | 13 +------------ include/linux/timerqueue_types.h | 17 +++++++++++++++++ 4 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 include/linux/timerqueue_types.h diff --git a/include/linux/hrtimer_types.h b/include/linux/hrtimer_types.h index f4ef391b96a7..ad66a3081735 100644 --- a/include/linux/hrtimer_types.h +++ b/include/linux/hrtimer_types.h @@ -3,7 +3,7 @@ #define _LINUX_HRTIMER_TYPES_H #include -#include +#include struct hrtimer_clock_base; diff --git a/include/linux/posix-timers_types.h b/include/linux/posix-timers_types.h index 57fec639a9bb..2b1f30ee2db0 100644 --- a/include/linux/posix-timers_types.h +++ b/include/linux/posix-timers_types.h @@ -3,7 +3,7 @@ #define _linux_POSIX_TIMERS_TYPES_H #include -#include +#include #include /* diff --git a/include/linux/timerqueue.h b/include/linux/timerqueue.h index adc80e29168e..62973f7d4610 100644 --- a/include/linux/timerqueue.h +++ b/include/linux/timerqueue.h @@ -3,18 +3,7 @@ #define _LINUX_TIMERQUEUE_H #include -#include - - -struct timerqueue_node { - struct rb_node node; - ktime_t expires; -}; - -struct timerqueue_head { - struct rb_root_cached rb_root; -}; - +#include extern bool timerqueue_add(struct timerqueue_head *head, struct timerqueue_node *node); diff --git a/include/linux/timerqueue_types.h b/include/linux/timerqueue_types.h new file mode 100644 index 000000000000..dc298d0923e3 --- /dev/null +++ b/include/linux/timerqueue_types.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_TIMERQUEUE_TYPES_H +#define _LINUX_TIMERQUEUE_TYPES_H + +#include +#include + +struct timerqueue_node { + struct rb_node node; + ktime_t expires; +}; + +struct timerqueue_head { + struct rb_root_cached rb_root; +}; + +#endif /* _LINUX_TIMERQUEUE_TYPES_H */ From patchwork Sat Dec 16 03:29:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179770 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16658dyi; Fri, 15 Dec 2023 19:33:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHegViMgg+rnRBc7LlqA83fr4+HJtCrSti+5A3tye0PVvqoYwu/OwSzhPO3rbzi+uCt8zh X-Received: by 2002:a17:903:40c4:b0:1d3:7ee2:7e with SMTP id t4-20020a17090340c400b001d37ee2007emr3059701pld.26.1702697588525; Fri, 15 Dec 2023 19:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697588; cv=none; d=google.com; s=arc-20160816; b=El3FRnu09kPIYSfX8rb88Q5Mj/frL+4CtgWCwrkeF/pUcBVp0AIoeKtGjTP3Po0xbn IyeFFZhFlhHjtwzWwjtlUQ7vjRn5qmP3QBApWU0bAclipwF0jgw+O6J9krKzpTvRxPf1 a78xkYqGmWc/1ZcSmtum5367F0TKt0eOQWPTdpQhiwfI6pAVEigKyjivK5dqR76igrwG 3OQxxjWvifv5J59kWx/hsqG9tsvLqSr+MkBqqRDPEwEymc3OsroHJ3iETHCYZ1lsprfr +7+DiWbQBPUmfM4EXBp4Y5lTgJnDRd8/rFbMa5dWnmX8knzCeAtm3TLZnGa1W3B6lxyY m4lw== 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=oI0gL82RwetzQrsOnD2Q7yVz4Ukcn+iFt6/nG0yTLOM=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=LCPq04TSRrylefn1RKGQ9EV9V7cUJa3b6G30BQX8jPLcwg/8FsFUZo4VlVvT6H93HQ nHYB/wp2DdynaRgRBvWg8FDPpB6tywhl8goOToamsb/Uc2iUtRZ/q7IlePLiJLuMrkBq W8wncXsRRbPBJ6W1dOeA6cQXFQa65yuY+0RjRlJzvdqHGYHf8Givbm/1TTK40O0QF2AA YS5jC7ROZo3HiRCxs62jwDPF0tphZBNdatS607mEwIQVvbmW/5bA9L1JHtJSroIGBuVh PSYoFBOBpdN2331MN8Gt+1k1pvsdXdgK2iuvNmY1lGkkXRw9reVEBENgWOEVAbhPeZQd I0Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="sUg/6tnz"; spf=pass (google.com: domain of linux-kernel+bounces-2006-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2006-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:33:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2006-ouuuleilei=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="sUg/6tnz"; spf=pass (google.com: domain of linux-kernel+bounces-2006-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2006-ouuuleilei=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 527C3286727 for ; Sat, 16 Dec 2023 03:33:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 096C431A82; 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="sUg/6tnz" X-Original-To: linux-kernel@vger.kernel.org Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) (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 7D902199BC; Sat, 16 Dec 2023 03:30:19 +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=1702697417; 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=oI0gL82RwetzQrsOnD2Q7yVz4Ukcn+iFt6/nG0yTLOM=; b=sUg/6tnz1B6gJ/av17WrZwTZK2+EAPO23D3Ddws0I3GYt1HBByMrOOXokxXGS7UH1DM9oZ gxDGgQVJq7rQRWbglUfSffuO32ZjkSpfYVQvtKNPh/S2MjHg0mXPDJiYPZDPyAl/YfonBh 72er+KPbDqETxqo9G5qA05jrHdqkTBU= 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 28/50] signal: Kill bogus dependency on list.h Date: Fri, 15 Dec 2023 22:29:34 -0500 Message-ID: <20231216032957.3553313-7-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407826715979663 X-GMAIL-MSGID: 1785407826715979663 list_head is in types.h, not list.h. Signed-off-by: Kent Overstreet --- include/linux/signal.h | 1 + include/linux/signal_types.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/signal.h b/include/linux/signal.h index 3b98e7a28538..f19816832f05 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h @@ -3,6 +3,7 @@ #define _LINUX_SIGNAL_H #include +#include #include #include diff --git a/include/linux/signal_types.h b/include/linux/signal_types.h index a70b2bdbf4d9..caf4f7a59ab9 100644 --- a/include/linux/signal_types.h +++ b/include/linux/signal_types.h @@ -6,7 +6,7 @@ * Basic signal handling related data type definitions: */ -#include +#include #include typedef struct kernel_siginfo { From patchwork Sat Dec 16 03:29:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179771 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16741dyi; Fri, 15 Dec 2023 19:33:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJgAbWmXkBF1r0+mRjEP8dmNd2z1Hv3lYmiFEfIc1i8VFBrffJxowudWB87Q6vpyBjcvh9 X-Received: by 2002:a05:6a20:9497:b0:190:228e:4c25 with SMTP id hs23-20020a056a20949700b00190228e4c25mr12833995pzb.47.1702697605976; Fri, 15 Dec 2023 19:33:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697605; cv=none; d=google.com; s=arc-20160816; b=ArunKiGl5JgRU5Y2VNwtg9ZyamRhAQPODJpH7WFdq/tDMb243tyqbrLNLXyM5aU7Nv TBf8lgSH0XcAd9WP6NGKGlJqyQelltwO2jKI4ApsAP0i/jo1mFwg4I/mebEPqeXAE3C0 HkcJmI5XHpE7MJXvWTRVn/BGIi9rSGsW/g61+B5JiLbrs8uxVZwWAKN8HbhRyUKq+wfb yzb2ApIFHsDD+8zpGE9CCnjz5otzxkE6x2wqaAYhrYVDpe9OXRztrCrx1z8gW7sBrjz4 WXBzTLAptlpv4d+rY1Cr1hJWUU351Cihg9tC0q6EkF3W0S6D5zdIpJ7L/0LhEHnbXvOn d0cA== 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=PGwDe7U0LIiQOaGhDE/WHEXnlMSjy21mOvWClH81kqk=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=WZjHq2iKPzzpyRalVWtvye6PnJ33l2MHuP9oElSTBH7ZhpLvUOBKDv79DFDmpZEjUI +BKxQLSw9Rs7HSwGKWkKCQ892mhSt5bA+uxOpCO7QjqLnAPV8KebR23H7YPsVd5yU3Md ihIAGuBbs4ikkeR5uv8ceQDfINW2tuIWI5uLrLRBQfxTgLi65XYtK+2TD2LUYS60doLe 7ciPPG9sZxS8zVNIyjV0jeCXiDEw7pVJ/Afv2ewhjq8JfDug+LqkPS8RRyvNzd7AVG7t CM7K56xvYKP8QSqZXjpyS5YTWOkqwx12bJEX8CH0saq//xygBMuJ1naZPJRllEweBa6g MsUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LIleEnZF; spf=pass (google.com: domain of linux-kernel+bounces-2007-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2007-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h14-20020a170902f54e00b001d08a8c56d4si14294736plf.327.2023.12.15.19.33.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:33:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2007-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=LIleEnZF; spf=pass (google.com: domain of linux-kernel+bounces-2007-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2007-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 09E0AB21123 for ; Sat, 16 Dec 2023 03:33:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F34C032C8D; Sat, 16 Dec 2023 03:30:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LIleEnZF" X-Original-To: linux-kernel@vger.kernel.org Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179]) (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 DDF971DFF2 for ; Sat, 16 Dec 2023 03:30:21 +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=1702697419; 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=PGwDe7U0LIiQOaGhDE/WHEXnlMSjy21mOvWClH81kqk=; b=LIleEnZFItXHaaCrcMZrYWUko8U1aO3M5XoZxWS6ixnogw7QINK4bm//irG/js1dyhubo0 Vov1IDygO6SNz1ZusBKJlhy3t11N/2JerYK2h6CJIsocr8vT4MNihRRudwFvLRmv7utth2 9r8TMBCnfVU2qcZPdNrWfHDLgyT/z0E= 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 29/50] timers: Split out timer_types.h Date: Fri, 15 Dec 2023 22:29:35 -0500 Message-ID: <20231216032957.3553313-8-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407844705463289 X-GMAIL-MSGID: 1785407844705463289 Cutting down on sched.h dependencies: this is going to be used in workqueue_types.h in the next patch, so we can kill the sched.h dependency on workqueue.h. Signed-off-by: Kent Overstreet --- include/linux/timer.h | 16 +--------------- include/linux/timer_types.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 include/linux/timer_types.h diff --git a/include/linux/timer.h b/include/linux/timer.h index 26a545bb0153..f18a2f1eb79e 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -7,21 +7,7 @@ #include #include #include - -struct timer_list { - /* - * All fields that change during normal runtime grouped to the - * same cacheline - */ - struct hlist_node entry; - unsigned long expires; - void (*function)(struct timer_list *); - u32 flags; - -#ifdef CONFIG_LOCKDEP - struct lockdep_map lockdep_map; -#endif -}; +#include #ifdef CONFIG_LOCKDEP /* diff --git a/include/linux/timer_types.h b/include/linux/timer_types.h new file mode 100644 index 000000000000..fae5a388f914 --- /dev/null +++ b/include/linux/timer_types.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_TIMER_TYPES_H +#define _LINUX_TIMER_TYPES_H + +#include +#include + +struct timer_list { + /* + * All fields that change during normal runtime grouped to the + * same cacheline + */ + struct hlist_node entry; + unsigned long expires; + void (*function)(struct timer_list *); + u32 flags; + +#ifdef CONFIG_LOCKDEP + struct lockdep_map lockdep_map; +#endif +}; + +#endif /* _LINUX_TIMER_TYPES_H */ From patchwork Sat Dec 16 03:29:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179772 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16815dyi; Fri, 15 Dec 2023 19:33:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEB62wuqBELIbGw3FnaVF8gEXykZKGWHccS41+Xin3L+LyABLHD0Tx1gP29jO0n4lSIau+n X-Received: by 2002:a17:906:7392:b0:a00:773c:3f09 with SMTP id f18-20020a170906739200b00a00773c3f09mr7311244ejl.17.1702697622741; Fri, 15 Dec 2023 19:33:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697622; cv=none; d=google.com; s=arc-20160816; b=q4fMQEZXQpiu/bacXgN39NIugh/GbyOGzEWWYDDuGdM4jYS1j9mMK+9jXDObFf3Hk0 zhjCmmqTa8SoR6wf8Qo8NSEHWT4V3pRj34DppJ9heITZj8sEqak3NHmoGY7uaf3nzwEv dV15Q+ToQTvveMazLauCGXv8GIoqwuzLM/9nR7cnqwUTMYTRbqG9mfcy368muyO14zXY VetwJVA9VUgw4/sBfnPx9U2T5axcB5n/KCvnCpWAMaaUr2Ruj0WLDbUcd7bkGT4P3mi0 9SBo05W6UVAco20MgcP7Jl9OK6qA3tCYk665Vg4kCwRO5TLJogN3taeHh1TwQ+0Roz3q qOBA== 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2008-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s17-20020a170906bc5100b00a1c7ca5603asi8236980ejv.713.2023.12.15.19.33.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:33:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2008-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; 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-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2008-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 372181F25B2F for ; Sat, 16 Dec 2023 03:33:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14E5C2575; Sat, 16 Dec 2023 03:30:31 +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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407862658075274 X-GMAIL-MSGID: 1785407862658075274 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 */ From patchwork Sat Dec 16 03:29:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179773 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16844dyi; Fri, 15 Dec 2023 19:33:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqP1sNn2a1E0Mcju3u3uV48OrqkhHW10o8n5ak69Nim+7m0S9EUdkR/4WGXj3kUSnMYeFT X-Received: by 2002:a17:907:a093:b0:a1b:172a:f278 with SMTP id hu19-20020a170907a09300b00a1b172af278mr8330794ejc.139.1702697635246; Fri, 15 Dec 2023 19:33:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697635; cv=none; d=google.com; s=arc-20160816; b=xLmGWkI8UokS1vARL3YPCBp0UCT5q/DnYQFENNuaoaUXYI7dk0mZAIp12/iDsvkexq L4DlANXIX5QLsUSYDhyPJaz3n5LmTHRt/O3zWPLPt8UwXm1FcX/v5PfvTkbtjqiAp3dV GIGL91scVNAg+KnXbtkpTd60arwEhI6j65q0UGIplO14CIU8sgsucBtb8Rro0bRZ8KV3 Y+J85HYdCs7VSvsVNT4mBX9XVnF6jocmCyTuajqROclkmNOcXOXWzA3DjdD7ZJVcTrbN k4lIn/iu6Nr3RubQYvQVrhi4EmNuDUVghKj3aodD8Sj6Xaf301+n8qA5tiehNKgwQlIf q4Sw== 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=4LN+fvuL5eeNR/VPNkxK0aRm1LVsQsiIk1+jyA5Xy5c=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=1KIOawEGPbXDBBaSEMdlGnBuMCkEEFqWPuICTmX+rWVhokY0Uj75z1jn6OxFoBH+gH 0csvO1RHvA0Q3K/sgIYFr1MU8xzrK5c+5nJWFVQSDTb6otosas5vQzAq7vui6FKACooq wezic6zH0rnhdhxmIDyFfRgfKViGC7hkWiNEJbIzR9jpRMgk1wFg/BvrwC60vaw5iEt4 V8eD1U8MYh4D1Cnbc+gTqfAJ5cZDZCmFSEItemprofNFS5CZG16NrcOnATwBa2qeeI9n fZBZFFHgYUyfrTdKdSf97crg/4hdXQi1k8hpV2fCjkUEIL0dMjQ+kzw2AQDGIzp7FZfb GGwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Xy8STZZD; spf=pass (google.com: domain of linux-kernel+bounces-2009-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2009-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gf6-20020a170906e20600b00a232836690csi83619ejb.887.2023.12.15.19.33.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:33:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2009-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Xy8STZZD; spf=pass (google.com: domain of linux-kernel+bounces-2009-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2009-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id DA13D1F25B8B for ; Sat, 16 Dec 2023 03:33:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BBC0101E5; Sat, 16 Dec 2023 03:30:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Xy8STZZD" X-Original-To: linux-kernel@vger.kernel.org Received: from out-182.mta0.migadu.com (out-182.mta0.migadu.com [91.218.175.182]) (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 025A52C6BF for ; Sat, 16 Dec 2023 03:30:24 +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=1702697423; 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=4LN+fvuL5eeNR/VPNkxK0aRm1LVsQsiIk1+jyA5Xy5c=; b=Xy8STZZDVdZuXXrC81y0mDfKavQQ2OsvnlwBdfdk/NBXkbjQnS0aa+hU9xi+XbObTcpPSv QM/BrJstbhqYuJfsOFrrHDTzE/XtnsyxrBYi935HCxJo/kLSk4vECtaGsYgElYOBdmOjz4 S/mWnNfeu0pQbzKb7Sz+7MydM4f0wIM= 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 31/50] shm: Slim down dependencies Date: Fri, 15 Dec 2023 22:29:37 -0500 Message-ID: <20231216032957.3553313-10-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407875430309868 X-GMAIL-MSGID: 1785407875430309868 list_head is in types.h, not list.h., and the uapi header wasn't needed. Signed-off-by: Kent Overstreet --- include/linux/shm.h | 4 ++-- ipc/shm.c | 1 + security/selinux/hooks.c | 1 + security/smack/smack_lsm.c | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/linux/shm.h b/include/linux/shm.h index d8e69aed3d32..c55bef0538e5 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h @@ -2,12 +2,12 @@ #ifndef _LINUX_SHM_H_ #define _LINUX_SHM_H_ -#include +#include #include -#include #include struct file; +struct task_struct; #ifdef CONFIG_SYSVIPC struct sysv_shm { diff --git a/ipc/shm.c b/ipc/shm.c index 222aaf035afb..a89f001a8bf0 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index feda711c6b7b..b9ccc98421e9 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -85,6 +85,7 @@ #include #include #include +#include #include #include #include /* for hashlen_string() */ diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 65130a791f57..7a5600834f16 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include From patchwork Sat Dec 16 03:29:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179774 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp16868dyi; Fri, 15 Dec 2023 19:34:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IHO/+UGkOkKaMFqm55RML4gLetVL3Nj1b13MOC7s17urhj0dQn0MPF/WGZQTfL3xar9i/iP X-Received: by 2002:a05:620a:2544:b0:77f:7f49:5e4e with SMTP id s4-20020a05620a254400b0077f7f495e4emr13090876qko.10.1702697644211; Fri, 15 Dec 2023 19:34:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697644; cv=none; d=google.com; s=arc-20160816; b=X0wGiuDQ4CIBo+i03KMyffq5c3SZY6vDR9VSSFt4mHYsTCSplzdoPV2WCkLOBQzg3t cLg1kT3KtTGU9BUk/nB4Ys7sggFLc7kRLly0LE9OIhF0e1UnCz1E3m1bhfueqrPvYqRs a2A1QVhy+js3PgWiuiuE0T8J1/Mh0s/YdXnwDXEuYMmLRctZ42rpFS8g+NsvZPdPw9PW fGhyHlne9Mz/p9MIJtztkXPDJCgj/wlbBcbTVHybQ9ZBwNHepUsb7mwejJe5rbnrvwYF ZV+T+rAk5QUdVNxJXCkeV52kBvD85jFYYWvcy2evS+r9x5YMXZ3N0uJafT6EgY06zFBX je+Q== 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=rjGjj9NDld3cpQFTknyiaa4K8L6pikm/7YzJQsi2quo=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=Na99H/O2i4pszSs6fIr671Z6A/GCtYQqAWvHQ9oSGq3DVIMW1Jj/1Xrp9DWqqzEPNp Tq9/HwQmwplL2D9VWbrfrDZeC4SkNHSFc81lsxg/bNGyeBgKn6vmkxDIq2C55TKnKV8E OV6+dgNkYJ96FtqVCrIveLy6LXPxmfvfrAWdXye7jHaLD/WAZREMTc0B2e2N55z2bF19 gQZ9ViP9WYZ60w7zmZ5whwz0ypxSoCzd1eKd7V0FiRoeKD5OKYgZe6Z7ION2zlVAv4UK b7hd33WZzfbGltDWWKy2UtMc2D6GgFlsKu7GUbo6iCyjLiv611e6BqtPnu5ouqGE5qEo vSYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jkrCZyYY; spf=pass (google.com: domain of linux-kernel+bounces-2010-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2010-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id h13-20020a05620a284d00b0077d6046fc74si10071957qkp.577.2023.12.15.19.34.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:34:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2010-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=jkrCZyYY; spf=pass (google.com: domain of linux-kernel+bounces-2010-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2010-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0509E1C24A33 for ; Sat, 16 Dec 2023 03:34:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B855A14AA5; Sat, 16 Dec 2023 03:30:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="jkrCZyYY" X-Original-To: linux-kernel@vger.kernel.org Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (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 9AE2C30347 for ; Sat, 16 Dec 2023 03:30:26 +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=1702697425; 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=rjGjj9NDld3cpQFTknyiaa4K8L6pikm/7YzJQsi2quo=; b=jkrCZyYYqYX0PWqqeqIWBMaHBBPf0yFDGel5bxrrPs4u3HAXTF4hjPGU92N7SowauokwnZ JmdYlpe03/qOnMPAlJygeHEmX4G9QfKGkHMHWdQ2nSe7oyrBgmquqotmfQQ8BxXiNGVzCZ l9I0Gv1UNMUiTCJ/TwPpBBHBRTK2xZA= 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 32/50] ipc: Kill bogus dependency on spinlock.h Date: Fri, 15 Dec 2023 22:29:38 -0500 Message-ID: <20231216032957.3553313-11-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407885017519843 X-GMAIL-MSGID: 1785407885017519843 pruning sched.h dependencies, headers shouldn't pull in more than they need. Signed-off-by: Kent Overstreet --- include/linux/ipc.h | 2 +- include/linux/sched.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/ipc.h b/include/linux/ipc.h index e1c9eea6015b..9b1434247aab 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h @@ -2,7 +2,7 @@ #ifndef _LINUX_IPC_H #define _LINUX_IPC_H -#include +#include #include #include #include diff --git a/include/linux/sched.h b/include/linux/sched.h index 8c230f24688b..3a58d3d7d264 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2139,6 +2139,8 @@ extern bool sched_task_on_rq(struct task_struct *p); extern unsigned long get_wchan(struct task_struct *p); extern struct task_struct *cpu_curr_snapshot(int cpu); +#include + /* * In order to reduce various lock holder preemption latencies provide an * interface to see if a vCPU is currently running or not. From patchwork Sat Dec 16 03:32:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179775 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17109dyi; Fri, 15 Dec 2023 19:35:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfdAe7wGy3ABO/Y+C6crTp9NT3BSZySMo5G7FqsjZOuhBwH/w95RLuEVo9KXDf1odkxb8f X-Received: by 2002:a05:6214:1786:b0:67e:fb24:2915 with SMTP id ct6-20020a056214178600b0067efb242915mr4961831qvb.107.1702697713570; Fri, 15 Dec 2023 19:35:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697713; cv=none; d=google.com; s=arc-20160816; b=VVgZqNNtFcBhmES36hzJDik094Z8getQ1QDaDtKu61x0ZWBdzy0dL+bTEHKm+WC8VE ODQ9nP/KWDoYsh6ITeYE7R+plBinjC1RqkgHjmqpuwIUwlSVyrSymgG2EM21H6kRG5rV mVsd5kRDpSKuPPqblqviq/GisbjTJM/l11grGo0AM+/ndKVCKpfFCZuBgYeTNrcBpJIy OxpEqwR26bnH0fy5053raw2NcOquV3T5JCyUESI670Nm3pz7VWIzv/b8JK2ydkcRZLdO 4s3oBA87NMgXXDUuYKvBq93WcNtBTX1+HV9pJ2HbENAiJsh7c2kFnTzTUEJaPsKPQx0c O9eA== 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=xTwDaJYHWx55QkXgTra2ib4UbsEOMeDcjHLbHkSEmrE=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=JcUvV5z/vwZkfU113RQxB+E6taCtPBKk4T2YNabGu0mcqFzmyBhFar8PBg4ViQ9V4s diSJ/lQxbLLHPa/0UGvZ4JpIhIL2o5CJ5RtnT0FJ7JKnayr42TteV6Rp73yj59ue0kD3 rK6HfPel+CtjROd7tFCsZftVe4WWemEd03iSzs3Z/bg8uz7KB6xmlCGYhWIhFvaLxpb/ E1OwO3rnNSt/W1dlmUkD+6Jo/L86OEXF7OteKuAjMqNp7gt3NDf5XVYJ01avmo4+NHpv xBK4PeCWzJNs5BPr4MXzGOH9HORSNOqQXnhN8e/W6n0M8DVMvehJ15IxCTU4hwCm9aqd uJBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IZfbmtUM; spf=pass (google.com: domain of linux-kernel+bounces-2012-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2012-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n6-20020a056214008600b0067a233d8d71si18787454qvr.25.2023.12.15.19.35.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:35:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2012-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=IZfbmtUM; spf=pass (google.com: domain of linux-kernel+bounces-2012-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2012-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BB3DF1C24A9C for ; Sat, 16 Dec 2023 03:34:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B735358AC; Sat, 16 Dec 2023 03:33:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="IZfbmtUM" X-Original-To: linux-kernel@vger.kernel.org Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 AF4BC3526F for ; Sat, 16 Dec 2023 03:33:20 +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=1702697599; 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=xTwDaJYHWx55QkXgTra2ib4UbsEOMeDcjHLbHkSEmrE=; b=IZfbmtUM8O5g5gu/VsP7tzGv6JlW4156s5qkNkOjD1RGbov6viUG9M9wrr/JDfWSrQ+lSq JiTvNyF/ll2BgTUM76067uiCK62SyFD01NwqJLq2vzu5bbKSvoZrfICrxraiEZaBSoiAz3 eSsc1nOr8ojexcfYgaf53pjr2Mh3ALk= 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 33/50] Split out irqflags_types.h Date: Fri, 15 Dec 2023 22:32:39 -0500 Message-ID: <20231216033300.3553457-1-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407957379998911 X-GMAIL-MSGID: 1785407957379998911 We're working on only pulling in type definitions to sched.h whenever possible. Signed-off-by: Kent Overstreet --- include/linux/irqflags.h | 14 +------------- include/linux/irqflags_types.h | 22 ++++++++++++++++++++++ include/linux/sched.h | 2 +- 3 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 include/linux/irqflags_types.h diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h index 2b665c32f5fe..147feebd508c 100644 --- a/include/linux/irqflags.h +++ b/include/linux/irqflags.h @@ -12,6 +12,7 @@ #ifndef _LINUX_TRACE_IRQFLAGS_H #define _LINUX_TRACE_IRQFLAGS_H +#include #include #include #include @@ -34,19 +35,6 @@ #ifdef CONFIG_TRACE_IRQFLAGS -/* Per-task IRQ trace events information. */ -struct irqtrace_events { - unsigned int irq_events; - unsigned long hardirq_enable_ip; - unsigned long hardirq_disable_ip; - unsigned int hardirq_enable_event; - unsigned int hardirq_disable_event; - unsigned long softirq_disable_ip; - unsigned long softirq_enable_ip; - unsigned int softirq_disable_event; - unsigned int softirq_enable_event; -}; - DECLARE_PER_CPU(int, hardirqs_enabled); DECLARE_PER_CPU(int, hardirq_context); diff --git a/include/linux/irqflags_types.h b/include/linux/irqflags_types.h new file mode 100644 index 000000000000..c13f0d915097 --- /dev/null +++ b/include/linux/irqflags_types.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_IRQFLAGS_TYPES_H +#define _LINUX_IRQFLAGS_TYPES_H + +#ifdef CONFIG_TRACE_IRQFLAGS + +/* Per-task IRQ trace events information. */ +struct irqtrace_events { + unsigned int irq_events; + unsigned long hardirq_enable_ip; + unsigned long hardirq_disable_ip; + unsigned int hardirq_enable_event; + unsigned int hardirq_disable_event; + unsigned long softirq_disable_ip; + unsigned long softirq_enable_ip; + unsigned int softirq_disable_event; + unsigned int softirq_enable_event; +}; + +#endif + +#endif /* _LINUX_IRQFLAGS_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 3a58d3d7d264..d799427f6d1b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -11,6 +11,7 @@ #include +#include #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include #include #include #include From patchwork Sat Dec 16 03:32:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179776 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17154dyi; Fri, 15 Dec 2023 19:35:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHj8hGoV0gIFb+Is41ab2MfKJH1KlNV7NTgIODv4E3LibGfaaqPrdCWA7OQVDgVjOIPsI6f X-Received: by 2002:a0c:e74f:0:b0:67a:a002:70e6 with SMTP id g15-20020a0ce74f000000b0067aa00270e6mr13679391qvn.20.1702697724250; Fri, 15 Dec 2023 19:35:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697724; cv=none; d=google.com; s=arc-20160816; b=qI5sTcNolKlAocITdBfiHdjV5n8I2j9J7iWTc1xtHxh28RTaFkJrifxClWUq2ylGGg k8cXxWLKzgqm9nrbP3iwSNmdCPSM0360D7n7V0a02wlNBNYF0q1Pyqd2Y9BdImAqLgqL Pa1UXyg52V0bkBGeVjgBLOjOjb9PIdCcWbCpWjk/76MXZ/uYfzBNYpcD2OfX9tby/L3z OidwdDoYhAmz/gCBO5gh4DSpdizAzl0zrmdxFO+11YLxzrlM0pD40cmeMW2Na8wRlRTw 24TTuohm7043E9nSHuTMdI/rT6x/vpzpGkJhpzf5orv6yTvX/RGK8K+A9B+uGjvhhMTv ZlYA== 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=9yds9msKPQXrNBgqP1A765/hKAJrn8l4pd6dR6qihsk=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=VQGyppq4s5KURmx7w+ImvAvBUL+nFvWVTq/6AB0wPrPdacUhw6hiPYuXK+YZ+bLrid j8SoJo8nAXe605EGFcYy1efm+8gRGPlE8kRJSmS3SjA+40hYbOSkx6sb6iJCUuhRObNw QL9lJFJlw+k+M8bcqisuyFLW9Zl/povRVKLFU0ungwCWXd01knaGmAKdx6S8mIXR95cQ HqTUzlnXQT2YRUxelhu/1KFo2i4p2rJoQkX5XKhiHsQgJyddz2m+u5AQk9Q8h8wVkvDR nwYn4sOdasYr5B+wnxCF3xFwDdJfUvfw04umiHTZGWkGVKTrSfBrgKgtStfyWpRz/MmQ GHrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="P/vP7wM2"; spf=pass (google.com: domain of linux-kernel+bounces-2013-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2013-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c1-20020a0cf2c1000000b0067f1def2a7asi2179419qvm.228.2023.12.15.19.35.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:35:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2013-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="P/vP7wM2"; spf=pass (google.com: domain of linux-kernel+bounces-2013-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2013-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E33381C24D56 for ; Sat, 16 Dec 2023 03:35:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 348E637D34; Sat, 16 Dec 2023 03:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="P/vP7wM2" X-Original-To: linux-kernel@vger.kernel.org Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 B074C35280 for ; Sat, 16 Dec 2023 03:33: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=1702697601; 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=9yds9msKPQXrNBgqP1A765/hKAJrn8l4pd6dR6qihsk=; b=P/vP7wM2eOOWDjmrKsXkcidp9QYAwSxsqE8ajgD7Xmirwv0NikZzDG8hCpt/RpRx/Eau+Q iOPOyIgcAgWX9iAES67hwP3BH3WPrS6Zyzp0hSd4xGFrXDjwvo7oFv37d/ddblhdtdStlt aoL2AQ0g0RXBvj+ySnyxQigup18B6FI= 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 34/50] mm_types_task.h: Trim dependencies Date: Fri, 15 Dec 2023 22:32:40 -0500 Message-ID: <20231216033300.3553457-2-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407968996685626 X-GMAIL-MSGID: 1785407968996685626 more sched.h header dependency trimming Signed-off-by: Kent Overstreet --- include/linux/mm_types_task.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/linux/mm_types_task.h b/include/linux/mm_types_task.h index aa44fff8bb9d..724a731d5c2b 100644 --- a/include/linux/mm_types_task.h +++ b/include/linux/mm_types_task.h @@ -9,11 +9,6 @@ */ #include -#include -#include -#include - -#include #ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH #include @@ -36,6 +31,8 @@ enum { NR_MM_COUNTERS }; +struct page; + struct page_frag { struct page *page; #if (BITS_PER_LONG > 32) || (PAGE_SIZE >= 65536) From patchwork Sat Dec 16 03:32:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17352dyi; Fri, 15 Dec 2023 19:36:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+jB5SdKqjud1JDbdGlJMlvyzGkT/AlWXsfGo9VzqzC2liWlLa7wxAoJeKLUPLYBXn2OKo X-Received: by 2002:a05:6a00:1148:b0:6ce:515a:1dfb with SMTP id b8-20020a056a00114800b006ce515a1dfbmr15485221pfm.26.1702697768323; Fri, 15 Dec 2023 19:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697768; cv=none; d=google.com; s=arc-20160816; b=VFuhawSBMWBQBvNbDggh2+13vNSTFc2z0XNpku5UAktUl0xMF9R1UTuwLweycWW2cF +Shp+9VXtFxSPvMOWJaVDS3znITL+iPRJzMa7lDHm02pPEiKkEcyeO7k2qFOQj7Az7b2 ZX62TrmuV+ikDXT5u3xwpF4sUylYn2ee87Ydep81ZYk4L0VdWaWcT0hob6XBLNFqorpA gnuQYmNmrhK3CJLOqiMuBaOFHTekH22hyyOHBSJvw9zsVL74fKdE5b5eDHYxChG/qkBx ReemceL+R2rqeyQZxK/juKg+rRo1Rj3STYs/QZQSgYIyXgknbMbtHrbibdpezXPGShpA beFg== 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=VwnREAuVN4OPHPun4TeRCrssO9sPJ33n6iud3s07kG4=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=lJPPwmjJPTsRQrdgqUIsDltkgjmX5Cl9RcNcIhFmUrOkmNpg+WD0vBnJIYXvQJvvnE pRLaBpE9vafc7TxxbCz2eladef0zsg1SWR6vayk2psr8N7z6/2Umy0b7MMH5Sx7aqJmO 3fujMJm95DEzcUfwEk0yYUDmJJvxkZhfsi1TuMwKFBEI9Moc5gwbv5nnSapNxXGOcIZt Stj8vTJpzbRWViSTmZ3hTOr1/6f4q2NnyTN3t55NQWpP9ri+s6bPlxmuKL9RsTDvmJqn N4hAsSmtemF1ITGIGv2YSvqyJJkS+gUZv5AIV5ZNl+MgFv/KO5z32C5IfqMmayYnsFGO brqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=qP6dWkWY; spf=pass (google.com: domain of linux-kernel+bounces-2014-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2014-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b2-20020a63eb42000000b005b99697d854si13846644pgk.673.2023.12.15.19.36.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:36:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2014-ouuuleilei=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=qP6dWkWY; spf=pass (google.com: domain of linux-kernel+bounces-2014-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2014-ouuuleilei=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 6167D286B03 for ; Sat, 16 Dec 2023 03:35:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F19EA39AC9; Sat, 16 Dec 2023 03:33:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="qP6dWkWY" X-Original-To: linux-kernel@vger.kernel.org Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 7024B35291 for ; Sat, 16 Dec 2023 03:33:24 +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=1702697602; 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=VwnREAuVN4OPHPun4TeRCrssO9sPJ33n6iud3s07kG4=; b=qP6dWkWYpw7oW2OJmZ+1xot5mAafow0AqE9tcjCelsxfjfPXBgKDnkp/JYEN5EbZb2GAtV Kcpk7JrNDkh1PfABeJwPOiozUfq/6/m0SK0oUW1sDCc4y14WJzUAiBYOeUk5t79yNntRcA ZbnHN+qPYOKqOHfVxGm4Kif1uB7/D2I= 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 35/50] cpumask: Split out cpumask_types.h Date: Fri, 15 Dec 2023 22:32:41 -0500 Message-ID: <20231216033300.3553457-3-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408014834551642 X-GMAIL-MSGID: 1785408014834551642 More sched.h dependency trimming: this will help to kill the printk.h dependency. Signed-off-by: Kent Overstreet --- arch/x86/include/asm/tlbbatch.h | 2 +- include/linux/cpumask.h | 4 +--- include/linux/cpumask_types.h | 12 ++++++++++++ 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 include/linux/cpumask_types.h diff --git a/arch/x86/include/asm/tlbbatch.h b/arch/x86/include/asm/tlbbatch.h index 1ad56eb3e8a8..0550dea70c0f 100644 --- a/arch/x86/include/asm/tlbbatch.h +++ b/arch/x86/include/asm/tlbbatch.h @@ -2,7 +2,7 @@ #ifndef _ARCH_X86_TLBBATCH_H #define _ARCH_X86_TLBBATCH_H -#include +#include struct arch_tlbflush_unmap_batch { /* diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index cfb545841a2c..b710dc4cd858 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -14,9 +14,7 @@ #include #include #include - -/* Don't assign or return these: may not be this big! */ -typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; +#include /** * cpumask_bits - get the bits in a cpumask diff --git a/include/linux/cpumask_types.h b/include/linux/cpumask_types.h new file mode 100644 index 000000000000..f4c032c9a81a --- /dev/null +++ b/include/linux/cpumask_types.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __LINUX_CPUMASK_TYPES_H +#define __LINUX_CPUMASK_TYPES_H + +#include +#include +#include + +/* Don't assign or return these: may not be this big! */ +typedef struct cpumask { DECLARE_BITMAP(bits, NR_CPUS); } cpumask_t; + +#endif /* __LINUX_CPUMASK_TYPES_H */ From patchwork Sat Dec 16 03:32:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17207dyi; Fri, 15 Dec 2023 19:35:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiaHUUjAzYzwQRHF5aUbpUX7Kc/q0okHNkxQVj5s4jen4STaL0itFy0hM2OEGVTo1Bh9GN X-Received: by 2002:a0c:f74b:0:b0:67e:ac32:60a4 with SMTP id e11-20020a0cf74b000000b0067eac3260a4mr13210558qvo.21.1702697736982; Fri, 15 Dec 2023 19:35:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697736; cv=none; d=google.com; s=arc-20160816; b=mw7M3oXS0je/jE9mh/Z+duGpla3Lx4Yl8LBmhRor3CACwHY1U7bd4IcTlHBHD3PNUy YpuVjwYpNDjCGCNxMrSRBz+7yxGOG7+3x6mPjSvKfDK5t4O15JK9dv+OWRvQvZmRVWsD hCp278gSl473vSFhYGQjHXidJWO0L6tyrWFu+aSfG6BnSCDsZEmz6WSwgNkYFIKXVaqD BhGIIM/CdjFrXZpxt99RK2sYEKqoLld2nhJBWHtSj5F62emku/aRxNRvN3S/xc6l6Jsu s48UyvJ84Tvxqs16Pj9XF0txrbDuQr7vsZpvlIIJ3csuEuoeHw1OeZAwR/hbucHvLHxM T57w== 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=dxw2KqDvlMnMD4Kapv1bIsL/tByrZwT85T/LljRE2HE=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=ua056ut6/ndEkzh6zlhqJq+yLuN+1DSMzl7WIwIPyb7LWvQU1duhD7Ek8H223CqoEn 7jGUql1AG6WWnjp2tAz3Wy2MxAOmSpeO8fXrujtXP4NBKvkaNlhWlyxcG/c5U+LQaMpS eLBs5ab9zels1kaSgOME0+/7f1mihsB0bDvVxVejOTf3y82AIGQmcR7+w8abyuJSpxU1 nYqr/JM8NE0LzV1o6zKwORuwv15rqMpV/gyx1DB7M0NWbE7EYsLW39AkJKizb9ZOc+Ea 6JGjQIKkLTkjrmkM88zNgQZ5LDnTMfjjTnks+MVKkqfUw18j+jRq9ydMSrCkMNcJ3Lfi F/vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wmpSPZvk; spf=pass (google.com: domain of linux-kernel+bounces-2015-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2015-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iw14-20020a0562140f2e00b0067ae1a24810si21227628qvb.133.2023.12.15.19.35.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:35:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2015-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wmpSPZvk; spf=pass (google.com: domain of linux-kernel+bounces-2015-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2015-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 73F8A1C20BF0 for ; Sat, 16 Dec 2023 03:35:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1E023A8E2; Sat, 16 Dec 2023 03:33:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="wmpSPZvk" X-Original-To: linux-kernel@vger.kernel.org Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 90F4537D08 for ; Sat, 16 Dec 2023 03:33:26 +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=1702697604; 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=dxw2KqDvlMnMD4Kapv1bIsL/tByrZwT85T/LljRE2HE=; b=wmpSPZvk0q6PpcFET+M+jpSJuPO1rvRf4yekiYZQcySO04+MNinlp+POwwTts/ZKSMA+vd G1nJLMt5WnAM8ceV7UR9qMkJRjc/TkrFKG3Rhg+S893Mr7vpUsk+D8ltIU+aPtti5HYLQ2 HGLpevlfQAM+3lPkaQ5vzJJDZLqfwks= 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 36/50] syscall_user_dispatch.h: split out *_types.h Date: Fri, 15 Dec 2023 22:32:42 -0500 Message-ID: <20231216033300.3553457-4-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785407982322270455 X-GMAIL-MSGID: 1785407982322270455 thread_info.h pulls in a lot of junk that sched.h that we don't need; in particular, this helps to kill the printk.h dependency. Signed-off-by: Kent Overstreet --- include/linux/sched.h | 2 +- include/linux/syscall_user_dispatch.h | 9 +-------- include/linux/syscall_user_dispatch_types.h | 22 +++++++++++++++++++++ 3 files changed, 24 insertions(+), 9 deletions(-) create mode 100644 include/linux/syscall_user_dispatch_types.h diff --git a/include/linux/sched.h b/include/linux/sched.h index d799427f6d1b..fea6d913e004 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/syscall_user_dispatch.h b/include/linux/syscall_user_dispatch.h index 641ca8880995..3858a6ffdd5c 100644 --- a/include/linux/syscall_user_dispatch.h +++ b/include/linux/syscall_user_dispatch.h @@ -6,16 +6,10 @@ #define _SYSCALL_USER_DISPATCH_H #include +#include #ifdef CONFIG_GENERIC_ENTRY -struct syscall_user_dispatch { - char __user *selector; - unsigned long offset; - unsigned long len; - bool on_dispatch; -}; - int set_syscall_user_dispatch(unsigned long mode, unsigned long offset, unsigned long len, char __user *selector); @@ -29,7 +23,6 @@ int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long siz void __user *data); #else -struct syscall_user_dispatch {}; static inline int set_syscall_user_dispatch(unsigned long mode, unsigned long offset, unsigned long len, char __user *selector) diff --git a/include/linux/syscall_user_dispatch_types.h b/include/linux/syscall_user_dispatch_types.h new file mode 100644 index 000000000000..3be36b06c7d7 --- /dev/null +++ b/include/linux/syscall_user_dispatch_types.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _SYSCALL_USER_DISPATCH_TYPES_H +#define _SYSCALL_USER_DISPATCH_TYPES_H + +#include + +#ifdef CONFIG_GENERIC_ENTRY + +struct syscall_user_dispatch { + char __user *selector; + unsigned long offset; + unsigned long len; + bool on_dispatch; +}; + +#else + +struct syscall_user_dispatch {}; + +#endif + +#endif /* _SYSCALL_USER_DISPATCH_TYPES_H */ From patchwork Sat Dec 16 03:32:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179779 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17383dyi; Fri, 15 Dec 2023 19:36:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFLWs6S1OSsb+GHoE3OvIYkWJefirGujfyFl4o61tozKHQUXl/qx9g0NJ+a4uOg0CmT0Qzk X-Received: by 2002:a17:906:fa92:b0:a00:8706:c82b with SMTP id lt18-20020a170906fa9200b00a008706c82bmr6087204ejb.47.1702697776553; Fri, 15 Dec 2023 19:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697776; cv=none; d=google.com; s=arc-20160816; b=DZ0EGISlLvUHKf294Tp3RPB1lBqTIavsJvqxArWCiNa/IFr93O+Z9qt9vM1Xhun6vp 4dsoPym+lF6mhI0v7ZSndxWzOhxXKx0/EEK8W8DU8Gjl5lJxeEtS52YvNYqgkP4I8nXS IAaHUB2JcZcrmfAcKiOfmTlnAypwLTJUh1SfOhGL39bjWYxhrijSo9IXgIyF8wgkAfik I9ziYAO/DkryFYYc5nj4xHNaxcelbx3yd8A1YUPgmUSvIX0VjIjyPomB694VfEyGUPK9 YiAkKtF/Azi7G/cn0CNu0uVcSxDTw17/kZ6Z6E8d0ucia7FsWcRRRajqsqiXYhM222zO mZ4A== 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=YdcVMfL4RKMuBKbyjbkGPxOyNcu8DW6qpqsLkgSGWJs=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=tyPhGRSWyMj1yO4qO6tmilhEU8CISfLguIiT4OfMvrzIp8+eF105GOduGKFd4NBn+f +CUAVqQaewvlUdZNhMQyaVauQPfph+BvUC4u8A9OtQqX8X/j9AoymlGUgye25trIWmql TLrbFZdK0kMT6AVniD0dqOErPxeaSiGqq20HsPBFPxpYKMfSch34JzfHi0NBdtWSsrGK 5YVE+RCMl5ZeVIBHa8vepdgv7OlPKrZXzu9Y46vuF/vXk3XJXshSLgWvj89MvDHHZ7Xl qauKAm/xP1gsZTvyuD2OElyS9ILG10mzRxiK+Vh/3Z7Hvb4/p8y3UCjfqWLR6hDR/8pS zvrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lSNJdfbY; spf=pass (google.com: domain of linux-kernel+bounces-2016-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2016-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r14-20020a170906364e00b00a1b63157f40si8124447ejb.196.2023.12.15.19.36.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:36:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2016-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=lSNJdfbY; spf=pass (google.com: domain of linux-kernel+bounces-2016-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2016-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id A899B1F2236A for ; Sat, 16 Dec 2023 03:35:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 802593D0D0; Sat, 16 Dec 2023 03:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="lSNJdfbY" X-Original-To: linux-kernel@vger.kernel.org Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (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 5CBC737D3C for ; Sat, 16 Dec 2023 03:33:28 +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=1702697606; 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=YdcVMfL4RKMuBKbyjbkGPxOyNcu8DW6qpqsLkgSGWJs=; b=lSNJdfbYaiT0EPw0hIZjBAE42js3NNtjIZAEm3CZvP9VPgMFCvaZwf4nKLCqlFLrmLpPLg TtjghGotjTtZR8nlnSqPQVJ6gE0bx8Dt1FxRHTj4dqrAf346qCgInLCPHjR4ZTJK+Lb13+ ebUEdRyyiV22oIBkxeHQtXj0tdrxZAY= 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 37/50] x86/signal: kill dependency on time.h Date: Fri, 15 Dec 2023 22:32:43 -0500 Message-ID: <20231216033300.3553457-5-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408023417415574 X-GMAIL-MSGID: 1785408023417415574 this is unecessary, and was pulling in printk.h from uapi headers Signed-off-by: Kent Overstreet --- arch/x86/include/uapi/asm/signal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/include/uapi/asm/signal.h b/arch/x86/include/uapi/asm/signal.h index 777c3a0f4e23..f777346450ec 100644 --- a/arch/x86/include/uapi/asm/signal.h +++ b/arch/x86/include/uapi/asm/signal.h @@ -4,7 +4,6 @@ #ifndef __ASSEMBLY__ #include -#include #include /* Avoid too many header ordering problems. */ From patchwork Sat Dec 16 03:32:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179782 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17540dyi; Fri, 15 Dec 2023 19:36:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGToo4ptmQHdNQF9MSGJIA7KI1UFz3mxay1tD9ongZm+MRvTN+LL7vwtu89mkZprYrWuD3 X-Received: by 2002:a05:6e02:15c7:b0:35d:59a2:929f with SMTP id q7-20020a056e0215c700b0035d59a2929fmr19085457ilu.51.1702697810996; Fri, 15 Dec 2023 19:36:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697810; cv=none; d=google.com; s=arc-20160816; b=xrqv22l0XSEr9GjkX0a6btS5wReCEp/JBcEgUSCc+AHW5mZn+1cf0Plc8kWhMgyPpc lUbO+UcxxILU0eakvz5HS3aeRvhqEKQGFsGZCZemOxqqP8Sz0qp1xRy6miy+MYg/0558 i/TyryErYpLRuLgxPQ1zMfLLrEK6k9zn7dnigmx9MREf5sW3a3Jh/7EikQ5blmx+ktL6 9LC/wojjeI6tYQZczA/BaIKqq05wH4Rl9bYvFl6Pq5boFWLA9wDPt9CFKI1FcGERVtP2 Q76yPmS1Q0dIwK0JdEWpy2pnoMPuTbvS8Kk0JJO3a2B/uxBhhFk51nY0xCOHtHPVIgG2 wbsg== 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=Qg4R+3dS8NCrkMo6yTS+9uLjKp5USb4ob2mh3UIyr+c=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=K+1j5V46Pfscb3RZrLHObOX5o8QdmIRGLY9w8MhuCMG+G/cr2dxXjA6oMcojKaa5UO cZ4Syxc5OZqMVT+FSEHSQcgb0gOB8pJzSMA/OnLDFdiECdwqCWNLOV78PWiddJx3M1/8 Lci/GhK65+fLC1dqyMBQkA7eho1DCe/QzIa2sflaG5EjwJRU0+as6yxYfoBiWzs0lgPD tIOXn+r/w5LE3dgICKgdolgkZCJpwG5gZywy7jZOCs9CugjJsD1gw3dbl/40NOp1CvBe 66r6tEi5melYhgrsjyZSDp6ZExKsHvUD29o3MpMdasu/+Q0HgB5eqfAy6UnUD6mHcQiI qGhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=VDRuNwP7; spf=pass (google.com: domain of linux-kernel+bounces-2017-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2017-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c14-20020a634e0e000000b005bd04873387si13519465pgb.105.2023.12.15.19.36.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:36:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2017-ouuuleilei=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=VDRuNwP7; spf=pass (google.com: domain of linux-kernel+bounces-2017-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2017-ouuuleilei=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 DA431282983 for ; Sat, 16 Dec 2023 03:36:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C9033FE33; Sat, 16 Dec 2023 03:33:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="VDRuNwP7" X-Original-To: linux-kernel@vger.kernel.org Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 41B3639AED for ; Sat, 16 Dec 2023 03:33:30 +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=1702697608; 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=Qg4R+3dS8NCrkMo6yTS+9uLjKp5USb4ob2mh3UIyr+c=; b=VDRuNwP7fSL5HGEtkp7KCl0slzTtRFbpCgoEv2ciFP/u3eQ5wwcFI1qnHP9Lt1PIQFU/XX 5Al64y7SlntEQhG6fcqlTfjp5IdDnkGRsTV9KIgGS7YTCaZb59Vyj388Ri3UTtb/gLolCp Il3aCxumd3kGVsF8X4GKlOzfBIPSJKA= 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 38/50] uapi/linux/resource.h: fix include Date: Fri, 15 Dec 2023 22:32:44 -0500 Message-ID: <20231216033300.3553457-6-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408059967518054 X-GMAIL-MSGID: 1785408059967518054 We should't be depending on time.h; we should only be pulling in other uapi headers. Signed-off-by: Kent Overstreet --- include/uapi/linux/resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/resource.h b/include/uapi/linux/resource.h index ac5d6a3031db..4fc22908bc09 100644 --- a/include/uapi/linux/resource.h +++ b/include/uapi/linux/resource.h @@ -2,7 +2,7 @@ #ifndef _UAPI_LINUX_RESOURCE_H #define _UAPI_LINUX_RESOURCE_H -#include +#include #include /* From patchwork Sat Dec 16 03:32:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17463dyi; Fri, 15 Dec 2023 19:36:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IFULKz4NZACMF0jceoSdNZpiXnxFO1lPxWs0X738tUeEAVNMVXY3o54HJHdv+/KNwDDjsT9 X-Received: by 2002:a05:600c:4c8a:b0:40c:377c:4b66 with SMTP id g10-20020a05600c4c8a00b0040c377c4b66mr7018775wmp.76.1702697795342; Fri, 15 Dec 2023 19:36:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697795; cv=none; d=google.com; s=arc-20160816; b=egpjHzI96qwMQiPRMSg885Obk6udq7/zfK0enkoJgn06UJrKYSP9nc0Vp1ZNZybOFI 6PyMS9LaH0NhSlRRbLxj2kUyXYegy8EdaX6BMOjpMxFNJF/GlRDfDR+yCcp5xCTI2XTt uqyXoJYQyaufQcMaQA03aQUGJU9YycGg45TEOmWY/5Ecd4S9LPSN7JZFFzETCqwnMo4w 9AQkdHBBxZziu5U2CW/lZ1tUnRqpD6yAUOSchQavlhMQ13noW8ljbhQmeM398fP58V/t HAk7EEy6De4uIm/k1D5PHJByi90X4ZB2f30cQNA2sOr2XbRLjD+1sk5FhLy9oqRMxTK/ Qqiw== 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=hdKy4c2nBK8OI3SHb8BxNCiiiUgr6tnoyAXaAjNUd7o=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=QzRrjgnK7aEo+Hm1cTunMRpg8Hz7MhDdzJrRMSdgqkISg+sbrUUAjqP+TemGMzKiXo 5WY2/kG5fw06QzcRdInJXCYG+0rFaEnTfgeSNKLoV/8Gb/A4Ye+fg7L/Mhwiuvjh3mAs ct43iXCIqLMLYuTjOE9Tk/Y7hgiUP7Whmc2WCzVBWQn77kNoaS3XDqYyET8XYBTF/SPr /ElmgnyLGukCP4yL2b7ka1Meacy422eHE/IDRpqyMjIlPNh43TXQ4/kIuy/iYanM7hKB UHoJEO2LzGP1AwMPitfLASLmchnx3iQRnD2kQwg6xu2vFao5tdNdj5aivjbuljyZJYeg JDGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=u7h8j6yR; spf=pass (google.com: domain of linux-kernel+bounces-2018-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2018-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z11-20020a1709067e4b00b00a1b7769f832si8139740ejr.614.2023.12.15.19.36.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:36:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2018-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=u7h8j6yR; spf=pass (google.com: domain of linux-kernel+bounces-2018-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2018-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 51FBF1F25A93 for ; Sat, 16 Dec 2023 03:36:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7AFB40C09; Sat, 16 Dec 2023 03:33:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="u7h8j6yR" X-Original-To: linux-kernel@vger.kernel.org Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 633763D0CB for ; Sat, 16 Dec 2023 03:33:32 +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=1702697610; 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=hdKy4c2nBK8OI3SHb8BxNCiiiUgr6tnoyAXaAjNUd7o=; b=u7h8j6yRy4W3KIP0uUc0t9IivyFOUHLizykuz/OutUHsq99rFa/O5tgPuwzqjJ0+TOXqYm dQl0x6e3yNEReAm6QbwM8WlNoe7FRV9uF4cu1Y3Pm4w1i7cWnQklA1javWWAGXQ2qehTNx EoDMjTpIhLYMCnn98EkX9mPxW7DV4Cs= 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 39/50] refcount: Split out refcount_types.h Date: Fri, 15 Dec 2023 22:32:45 -0500 Message-ID: <20231216033300.3553457-7-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408043285110519 X-GMAIL-MSGID: 1785408043285110519 More trimming of sched.h dependencies. Signed-off-by: Kent Overstreet --- include/linux/refcount.h | 13 +------------ include/linux/refcount_types.h | 19 +++++++++++++++++++ include/linux/sched.h | 2 +- 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 include/linux/refcount_types.h diff --git a/include/linux/refcount.h b/include/linux/refcount.h index a62fcca97486..85c6df0d1bef 100644 --- a/include/linux/refcount.h +++ b/include/linux/refcount.h @@ -96,22 +96,11 @@ #include #include #include +#include #include struct mutex; -/** - * typedef refcount_t - variant of atomic_t specialized for reference counts - * @refs: atomic_t counter field - * - * The counter saturates at REFCOUNT_SATURATED and will not move once - * there. This avoids wrapping the counter and causing 'spurious' - * use-after-free bugs. - */ -typedef struct refcount_struct { - atomic_t refs; -} refcount_t; - #define REFCOUNT_INIT(n) { .refs = ATOMIC_INIT(n), } #define REFCOUNT_MAX INT_MAX #define REFCOUNT_SATURATED (INT_MIN / 2) diff --git a/include/linux/refcount_types.h b/include/linux/refcount_types.h new file mode 100644 index 000000000000..162004f06edf --- /dev/null +++ b/include/linux/refcount_types.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_REFCOUNT_TYPES_H +#define _LINUX_REFCOUNT_TYPES_H + +#include + +/** + * typedef refcount_t - variant of atomic_t specialized for reference counts + * @refs: atomic_t counter field + * + * The counter saturates at REFCOUNT_SATURATED and will not move once + * there. This avoids wrapping the counter and causing 'spurious' + * use-after-free bugs. + */ +typedef struct refcount_struct { + atomic_t refs; +} refcount_t; + +#endif /* _LINUX_REFCOUNT_TYPES_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index fea6d913e004..f52977af1511 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include From patchwork Sat Dec 16 03:32:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179781 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17498dyi; Fri, 15 Dec 2023 19:36:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHx6ckSsey34HMivtNbqxIuGpXhpTS/zI82pDOn+tTerKd3pyg/jzIOHSI/xkAgH4YsUw6t X-Received: by 2002:a17:907:3e8f:b0:a1d:4d2c:9bf7 with SMTP id hs15-20020a1709073e8f00b00a1d4d2c9bf7mr3741502ejc.68.1702697803402; Fri, 15 Dec 2023 19:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697803; cv=none; d=google.com; s=arc-20160816; b=utvVPnNwp+rTN7hR32XrikzSwzJ9xs8b/7iLhkzj1T6ClIjNQfABdBIJAoMJ66aZ0s 47QHfZxZS+iPkHCtUy46IwLIsaKLpecYj6LWyHxWrnEnVVSCV7JnVGFmGniStyq0hZdV HzL5y5WU5weUP7RgHlEi94MwN59l0BM8S9tY6Os2sfQZLOYXFyGv0Lagg9NCizRAwLje 7qM5orufGr0yRjD66/gX+OJ59x7nJGKCCXE1+nC+Elfjt7dpcR/Xtdc9z2piFFFHOr5a TvEjM0zLNxb7vuCJokS6LnGZC7r8ORxGgbYLcyBQaGmftiImyQgaBJobY+qvkozIGAHB a0pA== 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=H50Z0kSGEyOHKjuvYlMoEObUuyeC38rfMHKwdLte1so=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=ABHgmLmfjX3peBsMic8QANIZZG6L4nrgm5ICpZsfUfPF15pbhT1ZX+ZvJM5u9qIJjg jopwyZgU3ND4rIt+huQo3h8nNXVQ3/QjpaW78WpCGr4bEshSV4hYzXlpmlhxkTF9Mp+j dbMWaSUOH2p2DKseHKpnuIDdnCgKPUZy3X+e0jhkcPD45rkyMV1Vqd9baH6NS+6Rud5f pjqINSMkxuJmaUNX+YFMVtCpqbSywGge3nvYKWP0C+aAm8yelQqwVnSxjKWkoQjz2DQW rKtZSDqjpUkv00waF8xxI1Xi3eWbeaXiDILLdMIRSp319t2702TOIDCHAzYc7sIi8HeM lhCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M1Je6O36; spf=pass (google.com: domain of linux-kernel+bounces-2019-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2019-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n20-20020a170906b31400b00a1d639f7bdcsi8234471ejz.937.2023.12.15.19.36.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:36:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2019-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=M1Je6O36; spf=pass (google.com: domain of linux-kernel+bounces-2019-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2019-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id B8BF21F20FB0 for ; Sat, 16 Dec 2023 03:36:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C4B04175F; Sat, 16 Dec 2023 03:33:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="M1Je6O36" X-Original-To: linux-kernel@vger.kernel.org Received: from out-172.mta0.migadu.com (out-172.mta0.migadu.com [91.218.175.172]) (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 472E93EA87 for ; Sat, 16 Dec 2023 03:33:34 +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=1702697612; 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=H50Z0kSGEyOHKjuvYlMoEObUuyeC38rfMHKwdLte1so=; b=M1Je6O36HQ5QIRvQAOQK7U/+LJOUwJxBcAvzS6QVZPFcMei3FP6V+VPGxf8RwjVwCutDXX LVnGA70HtCaiYKQUqI/J0w8za7YRSUh+eDptL1nlrCSTYkqJsJtd06zS/La04hgbvk79VN xmFlGBLX1P/18IRHlt+tjLYoG7a6y7M= 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 40/50] seccomp: Split out seccomp_types.h Date: Fri, 15 Dec 2023 22:32:46 -0500 Message-ID: <20231216033300.3553457-8-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408052225725471 X-GMAIL-MSGID: 1785408052225725471 More pruning of sched.h dependencies. Signed-off-by: Kent Overstreet --- include/linux/sched.h | 2 +- include/linux/seccomp.h | 20 +------------------- include/linux/seccomp_types.h | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 include/linux/seccomp_types.h diff --git a/include/linux/sched.h b/include/linux/sched.h index f52977af1511..9bfa61ab2750 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index 1ec0d8dc4b69..26a53cea5761 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h @@ -19,27 +19,9 @@ #include #include +#include #include -struct seccomp_filter; -/** - * struct seccomp - the state of a seccomp'ed process - * - * @mode: indicates one of the valid values above for controlled - * system calls available to a process. - * @filter_count: number of seccomp filters - * @filter: must always point to a valid seccomp-filter or NULL as it is - * accessed without locking during system call entry. - * - * @filter must only be accessed from the context of current as there - * is no read locking. - */ -struct seccomp { - int mode; - atomic_t filter_count; - struct seccomp_filter *filter; -}; - #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER extern int __secure_computing(const struct seccomp_data *sd); static inline int secure_computing(void) diff --git a/include/linux/seccomp_types.h b/include/linux/seccomp_types.h new file mode 100644 index 000000000000..c6184582a0a0 --- /dev/null +++ b/include/linux/seccomp_types.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_SECCOMP_TYPES_H +#define _LINUX_SECCOMP_TYPES_H + +#include + +struct seccomp_filter; +/** + * struct seccomp - the state of a seccomp'ed process + * + * @mode: indicates one of the valid values above for controlled + * system calls available to a process. + * @filter_count: number of seccomp filters + * @filter: must always point to a valid seccomp-filter or NULL as it is + * accessed without locking during system call entry. + * + * @filter must only be accessed from the context of current as there + * is no read locking. + */ +struct seccomp { + int mode; + atomic_t filter_count; + struct seccomp_filter *filter; +}; + +#endif /* _LINUX_SECCOMP_TYPES_H */ From patchwork Sat Dec 16 03:32:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179784 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17723dyi; Fri, 15 Dec 2023 19:37:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXyZLEcdmnmm8duBHUitFDimQoVrodhpPuadUths5uXqRVaZ5Aor6cPa5emNBnks7Sh4pf X-Received: by 2002:a05:6871:4609:b0:203:d46:ff79 with SMTP id nf9-20020a056871460900b002030d46ff79mr9921887oab.106.1702697860318; Fri, 15 Dec 2023 19:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697860; cv=none; d=google.com; s=arc-20160816; b=PBmrTZ+FZB9RUhYJp7mTq7gjMfFDeujdn/h2BelzPQXM4vEK+xRWreafGb3zmLyAa4 Xu/wXb2aCCj3MoLHre5adsQTN8pQ77MwMtPCcTdwoWgQzQxwtQrjH6MNJUDr0LMRiRIA BxwNSCp/naUmpDkvm/xheeKjQ1Te/I8E44NQ+wx8IgGkCnNgK+Z+vzLIfdwKjC2BKoA1 2IKrLk+v3Sm2KadeJ+xugEN7KfjI9OgkHbYktoRpSMdABIq/OFaGsATYdguqFPdOofxg 2sXcJu9dWOo2DHhjIO+IP8Jxece0naat1fvTTxkuuji5bP1YzeCY2T3udDV4LR6tsS26 vbRQ== 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=X87VjxlUd18l9kDwUL6NaoqByTrZMfLVDHgwYnIbMw0=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=TpATTH9M7qu6eZXn4GtQXHlsNYABN0INtcZ7OirtAcuyAxTNT2as7pn6ZnXRS9JikD L2lscOz1fj/B0GX6vzEja4yQJ3lI+t+L8QObm3BW0iGsuTNhXIslKyGsnP+T56p+eRvN 30gkIt0OQEeWqVvsMAD8y7pYJMV/r9G2FIXwxJqGMRnvKOODaZR8Fg8PLYZTOgCW10JK t6UP8KF1v77BSAleFAGTpWI55oq3jvEqSGP4qL3potsJsJOZ1xLHgeDB7sWK7O6Oe4uh z3vg1t3o0gTWItmdWdqw0ED00jFS0UpU3dWRWe1OgK+QVFk+kERmUv+20e2O8aFR8McG 8aeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=eZB1hQbw; spf=pass (google.com: domain of linux-kernel+bounces-2020-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2020-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b12-20020a63eb4c000000b005be1ee5be76si13705817pgk.373.2023.12.15.19.37.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:37:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2020-ouuuleilei=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=eZB1hQbw; spf=pass (google.com: domain of linux-kernel+bounces-2020-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2020-ouuuleilei=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 58B7D286EA4 for ; Sat, 16 Dec 2023 03:36:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E7F342A97; Sat, 16 Dec 2023 03:33:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eZB1hQbw" X-Original-To: linux-kernel@vger.kernel.org Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 54F0440BF4 for ; Sat, 16 Dec 2023 03:33:36 +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=1702697614; 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=X87VjxlUd18l9kDwUL6NaoqByTrZMfLVDHgwYnIbMw0=; b=eZB1hQbwqfmiZUO+79GfWV0LuKKMJ6JKSkbeassQpJlaB2P+Rb0z4HWp9m5kghK/zTCFRw vJRY1U00mr95LX29azmSiTsBvVEZYNGSLwTZ3UuvgDMDz5Oy95eu5Tdx/+nO15FNRWWMvP 5ry/UrjcV1NmicWNvaiu6kQTbR+GEOY= 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 41/50] uidgid: Split out uidgid_types.h Date: Fri, 15 Dec 2023 22:32:47 -0500 Message-ID: <20231216033300.3553457-9-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408111880495384 X-GMAIL-MSGID: 1785408111880495384 More sched.h dependency pruning. Signed-off-by: Kent Overstreet Reviewed-by: Christian Brauner --- include/linux/sched.h | 1 + include/linux/uidgid.h | 11 +---------- include/linux/uidgid_types.h | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 include/linux/uidgid_types.h diff --git a/include/linux/sched.h b/include/linux/sched.h index 9bfa61ab2750..157e7af36bb7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -37,6 +37,7 @@ #include #include #include +#include #include /* task_struct member predeclarations (sorted alphabetically): */ diff --git a/include/linux/uidgid.h b/include/linux/uidgid.h index b0542cd11aeb..ba20b62f13e1 100644 --- a/include/linux/uidgid.h +++ b/include/linux/uidgid.h @@ -12,21 +12,12 @@ * to detect when we overlook these differences. * */ -#include +#include #include struct user_namespace; extern struct user_namespace init_user_ns; -typedef struct { - uid_t val; -} kuid_t; - - -typedef struct { - gid_t val; -} kgid_t; - #define KUIDT_INIT(value) (kuid_t){ value } #define KGIDT_INIT(value) (kgid_t){ value } diff --git a/include/linux/uidgid_types.h b/include/linux/uidgid_types.h new file mode 100644 index 000000000000..b35ac4955a33 --- /dev/null +++ b/include/linux/uidgid_types.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_UIDGID_TYPES_H +#define _LINUX_UIDGID_TYPES_H + +#include + +typedef struct { + uid_t val; +} kuid_t; + +typedef struct { + gid_t val; +} kgid_t; + +#endif /* _LINUX_UIDGID_TYPES_H */ From patchwork Sat Dec 16 03:32:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179783 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17633dyi; Fri, 15 Dec 2023 19:37:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmdeAtMqh6DjjSrUmmLqv9XIckDNZu1ZiuCubL0Kopem9H3uiv+ISqN8N5Os3KRh1YET2y X-Received: by 2002:a05:6a21:778d:b0:194:1116:a980 with SMTP id bd13-20020a056a21778d00b001941116a980mr283877pzc.119.1702697834532; Fri, 15 Dec 2023 19:37:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697834; cv=none; d=google.com; s=arc-20160816; b=ef0o+TFhEzcZ85+Hqjty6eEvAZyXo/nUyS9ADONPk35saWRH2TkQRNUOFipR23onGR itg9zdmzwuf/Tl4xAxHbK/kjti2tGTR0Sf0y51PDJ8frfmSWBvChwOuLkvN8eR/LCygd xdGy0qH17KdsbFVT3BuDyTBLcldAvZl4YatC45rR/+KEcZINYPE1NJHNs7z48O0fsYgF XJI83bzodmbf0+qzS2R0Fgjn5jKjqnAOGyCUgjxeG51iC2yQzF/EQcVQ93BNEiBhJWsM sIaOSP2pcOPD2zvo6RwMF6aQCDZBdlZqp3WOjZl58xMBdM1Oo71eUsxkhVXfDfLs0/dq uNUA== 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=fEcswrm7jwwc7VjG2k3DRMFRtfQsexzn74V1sev2AFE=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=XINMS6UaqrG/3JHsqeYmx9cv5uvk58Y5PZfmlUzU2ownF1Mi/gk6ZZrxvyPkf31xxH 3G2xduAjVkIm3Ddc783ovLDZ/huYP7hLO3zfEPRjSn1YN10H9Do0dFVSUJPgbQS1xBQ7 XE006CTHH/9kiUUbaBqY9a0jmFTpL4zDl8+T7KyyY3Wo1tTtwf+YU8qb1GPM1evILzan HWezEvnOkbai4vjzk7eHbpUdx05hYM5qz7oDDtSICIqgTnG5kdp0WSGSQ5twaZkjZdP+ myZ83S/Agxme+75UBkZrOfXhhXpPR3wv9oVmDZKAmBu0wka90wxFEoi9qQXoHh6qVAfK EArg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=TEw8lyxG; spf=pass (google.com: domain of linux-kernel+bounces-2021-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2021-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k7-20020a654347000000b005cd6390ea8dsi2150898pgq.506.2023.12.15.19.37.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:37:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2021-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=TEw8lyxG; spf=pass (google.com: domain of linux-kernel+bounces-2021-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2021-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 81B56B2356C for ; Sat, 16 Dec 2023 03:37:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 566CF42A9E; Sat, 16 Dec 2023 03:33:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="TEw8lyxG" X-Original-To: linux-kernel@vger.kernel.org Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 18EB541234 for ; Sat, 16 Dec 2023 03:33:37 +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=1702697616; 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=fEcswrm7jwwc7VjG2k3DRMFRtfQsexzn74V1sev2AFE=; b=TEw8lyxGiEvcCafUswfHvN5NQkKGTs2243U56VTEeo3e0l3SKtJ7S42DFrZp7hpnCe5CdV SeeiJ74HseN+NIKaK/VjxGPdu7FOGxA7A0k/mvQ10aXwOThBSec0e/hUpzAo/iWiqXrFUQ Vytn1rIiS7BT4QaXEqkoF3Wg27OQ71M= 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 42/50] sem: Split out sem_types.h Date: Fri, 15 Dec 2023 22:32:48 -0500 Message-ID: <20231216033300.3553457-10-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408084925385689 X-GMAIL-MSGID: 1785408084925385689 More sched.h dependency pruning. Signed-off-by: Kent Overstreet --- include/linux/audit.h | 1 + include/linux/sched.h | 3 ++- include/linux/sem.h | 10 +--------- include/linux/sem_types.h | 13 +++++++++++++ 4 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 include/linux/sem_types.h diff --git a/include/linux/audit.h b/include/linux/audit.h index 51b1b7054a23..93d97b56e1e4 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -400,6 +400,7 @@ static inline void audit_ptrace(struct task_struct *t) } /* Private API (for audit.c only) */ +struct kern_ipc_perm; extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp); extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode); extern void __audit_bprm(struct linux_binprm *bprm); diff --git a/include/linux/sched.h b/include/linux/sched.h index 157e7af36bb7..98885e3a81e8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -13,12 +13,13 @@ #include #include -#include +#include #include #include #include #include #include +#include #include #include #include diff --git a/include/linux/sem.h b/include/linux/sem.h index 5608a500c43e..c4deefe42aeb 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h @@ -3,25 +3,17 @@ #define _LINUX_SEM_H #include +#include struct task_struct; -struct sem_undo_list; #ifdef CONFIG_SYSVIPC -struct sysv_sem { - struct sem_undo_list *undo_list; -}; - extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); extern void exit_sem(struct task_struct *tsk); #else -struct sysv_sem { - /* empty */ -}; - static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) { return 0; diff --git a/include/linux/sem_types.h b/include/linux/sem_types.h new file mode 100644 index 000000000000..73df1971a7ae --- /dev/null +++ b/include/linux/sem_types.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _LINUX_SEM_TYPES_H +#define _LINUX_SEM_TYPES_H + +struct sem_undo_list; + +struct sysv_sem { +#ifdef CONFIG_SYSVIPC + struct sem_undo_list *undo_list; +#endif +}; + +#endif /* _LINUX_SEM_TYPES_H */ From patchwork Sat Dec 16 03:32:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179785 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17825dyi; Fri, 15 Dec 2023 19:38:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6jGm/3RAtdUT4SsuYAdhGGqQx66JCJg7gPzyXMTF5BsSgGrnlQK9n1/KUhXyvapbd541N X-Received: by 2002:a05:6359:d08:b0:170:17eb:9c52 with SMTP id gp8-20020a0563590d0800b0017017eb9c52mr12054710rwb.51.1702697883408; Fri, 15 Dec 2023 19:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697883; cv=none; d=google.com; s=arc-20160816; b=lsPeKrHpRLNd88/0bCbgJtOd8+VuclFzglpJjGSRHcYSDamqkztK3Pp0/a47jdool7 J4JMHyJ5gXr+ebDVY6SucOEM1ol/ZmMpGVzFA7VCilinyT1oBGTUeFHfs0mRYAKlgBqU ewCW7ibaXiVlUX4E5+oidcPEMAihvD/nNZ6fpLTYcQ+rUCGvY080soSqNg8uTu88XrmG 0C7YHBoas3Ezfz9gwS5kyiIpXG2unMt7Sllu27X9H3McHVjDmv8Rthct4yGAa/zwTXwj q4eFQz29mOls/klfUthHENcDTVvqzOUe9gSCyzNcl54SefVRUeuimINVGvgNG9+Vu5rH B8HA== 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=/YlwF6jQl3AGWCNwHZroZiQJXLn/OA9Z6AEGkzv6HW8=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=g8ZBANEAFfb4uD63XxilX95+tRWE+eHnpmzfuO65ZDhG0Zyy8VhUii0zLGrcQqeIe6 VgxdgTImR9Db83o+Jj4BzQ8nZQpzVoDli9KJfULuztWsuu8HJzlmYjHEZVQDAffpoyEr BlydZei3FdtKxcjmIHALQ04KRPzpEcHYfFL7QXdZAeg9BiPgrhtoi2sSBDQwIkjnsTFc nPrj4jiZX4ePMWvGZX+4k4zSUpnu+FF/MbC/OblRCWmc/Cpc5D8Kyz8QGVRdL18XrdYG N7WsMHjMOdW9xeGHO2AALbgiV6sg8U0EuL2Zn5oKAZBhk2hxV4qQgjn0g9YV54Ukym9M BE8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=nijiqWnI; spf=pass (google.com: domain of linux-kernel+bounces-2022-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2022-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o3-20020a17090ab88300b0028b2f13d510si1980265pjr.72.2023.12.15.19.38.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2022-ouuuleilei=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=nijiqWnI; spf=pass (google.com: domain of linux-kernel+bounces-2022-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2022-ouuuleilei=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 25FCE287E02 for ; Sat, 16 Dec 2023 03:37:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C9FC4438D; Sat, 16 Dec 2023 03:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="nijiqWnI" X-Original-To: linux-kernel@vger.kernel.org Received: from out-175.mta0.migadu.com (out-175.mta0.migadu.com [91.218.175.175]) (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 18D1D41C95 for ; Sat, 16 Dec 2023 03:33:39 +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=1702697618; 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=/YlwF6jQl3AGWCNwHZroZiQJXLn/OA9Z6AEGkzv6HW8=; b=nijiqWnIMhK8D4E+Dsg3ln2Q7UPgn+yu9KR+e2JPEspKys0O6hVGLCnxi5pkYic8E9OCiG pGy+l2s15DaXeItKJ/if34iFAE3tHB6uBAO2eH431kKPbX4YcuQTfdhzqtTSV1ZoEFY5I6 gbtEG/7AyCymx8o2Dy6NxS+GuSnt7YU= 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 43/50] lockdep: move held_lock to lockdep_types.h Date: Fri, 15 Dec 2023 22:32:49 -0500 Message-ID: <20231216033300.3553457-11-kent.overstreet@linux.dev> In-Reply-To: <20231216033300.3553457-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033300.3553457-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408135908851138 X-GMAIL-MSGID: 1785408135908851138 held_lock is embedded in task_struct, and we don't want sched.h pulling in all of lockdep.h Signed-off-by: Kent Overstreet Acked-by: Waiman Long --- include/linux/lockdep.h | 57 ----------------------------------- include/linux/lockdep_types.h | 57 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index dc2844b071c2..08b0d1d9d78b 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h @@ -82,63 +82,6 @@ struct lock_chain { u64 chain_key; }; -#define MAX_LOCKDEP_KEYS_BITS 13 -#define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS) -#define INITIAL_CHAIN_KEY -1 - -struct held_lock { - /* - * One-way hash of the dependency chain up to this point. We - * hash the hashes step by step as the dependency chain grows. - * - * We use it for dependency-caching and we skip detection - * passes and dependency-updates if there is a cache-hit, so - * it is absolutely critical for 100% coverage of the validator - * to have a unique key value for every unique dependency path - * that can occur in the system, to make a unique hash value - * as likely as possible - hence the 64-bit width. - * - * The task struct holds the current hash value (initialized - * with zero), here we store the previous hash value: - */ - u64 prev_chain_key; - unsigned long acquire_ip; - struct lockdep_map *instance; - struct lockdep_map *nest_lock; -#ifdef CONFIG_LOCK_STAT - u64 waittime_stamp; - u64 holdtime_stamp; -#endif - /* - * class_idx is zero-indexed; it points to the element in - * lock_classes this held lock instance belongs to. class_idx is in - * the range from 0 to (MAX_LOCKDEP_KEYS-1) inclusive. - */ - unsigned int class_idx:MAX_LOCKDEP_KEYS_BITS; - /* - * The lock-stack is unified in that the lock chains of interrupt - * contexts nest ontop of process context chains, but we 'separate' - * the hashes by starting with 0 if we cross into an interrupt - * context, and we also keep do not add cross-context lock - * dependencies - the lock usage graph walking covers that area - * anyway, and we'd just unnecessarily increase the number of - * dependencies otherwise. [Note: hardirq and softirq contexts - * are separated from each other too.] - * - * The following field is used to detect when we cross into an - * interrupt context: - */ - unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */ - unsigned int trylock:1; /* 16 bits */ - - unsigned int read:2; /* see lock_acquire() comment */ - unsigned int check:1; /* see lock_acquire() comment */ - unsigned int hardirqs_off:1; - unsigned int sync:1; - unsigned int references:11; /* 32 bits */ - unsigned int pin_count; -}; - /* * Initialization, self-test and debugging-output methods: */ diff --git a/include/linux/lockdep_types.h b/include/linux/lockdep_types.h index 2ebc323d345a..9c533c8d701e 100644 --- a/include/linux/lockdep_types.h +++ b/include/linux/lockdep_types.h @@ -198,6 +198,63 @@ struct lockdep_map { struct pin_cookie { unsigned int val; }; +#define MAX_LOCKDEP_KEYS_BITS 13 +#define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS) +#define INITIAL_CHAIN_KEY -1 + +struct held_lock { + /* + * One-way hash of the dependency chain up to this point. We + * hash the hashes step by step as the dependency chain grows. + * + * We use it for dependency-caching and we skip detection + * passes and dependency-updates if there is a cache-hit, so + * it is absolutely critical for 100% coverage of the validator + * to have a unique key value for every unique dependency path + * that can occur in the system, to make a unique hash value + * as likely as possible - hence the 64-bit width. + * + * The task struct holds the current hash value (initialized + * with zero), here we store the previous hash value: + */ + u64 prev_chain_key; + unsigned long acquire_ip; + struct lockdep_map *instance; + struct lockdep_map *nest_lock; +#ifdef CONFIG_LOCK_STAT + u64 waittime_stamp; + u64 holdtime_stamp; +#endif + /* + * class_idx is zero-indexed; it points to the element in + * lock_classes this held lock instance belongs to. class_idx is in + * the range from 0 to (MAX_LOCKDEP_KEYS-1) inclusive. + */ + unsigned int class_idx:MAX_LOCKDEP_KEYS_BITS; + /* + * The lock-stack is unified in that the lock chains of interrupt + * contexts nest ontop of process context chains, but we 'separate' + * the hashes by starting with 0 if we cross into an interrupt + * context, and we also keep do not add cross-context lock + * dependencies - the lock usage graph walking covers that area + * anyway, and we'd just unnecessarily increase the number of + * dependencies otherwise. [Note: hardirq and softirq contexts + * are separated from each other too.] + * + * The following field is used to detect when we cross into an + * interrupt context: + */ + unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */ + unsigned int trylock:1; /* 16 bits */ + + unsigned int read:2; /* see lock_acquire() comment */ + unsigned int check:1; /* see lock_acquire() comment */ + unsigned int hardirqs_off:1; + unsigned int sync:1; + unsigned int references:11; /* 32 bits */ + unsigned int pin_count; +}; + #else /* !CONFIG_LOCKDEP */ /* From patchwork Sat Dec 16 03:35:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179788 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17954dyi; Fri, 15 Dec 2023 19:38:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIPc+AbujQljZEFucFi16XAVxG1RAIX9SIcZNjuhEtjywm2oFHo3neT8ScL//dcIHDgnk+ X-Received: by 2002:a05:6870:fb86:b0:203:11ec:b242 with SMTP id kv6-20020a056870fb8600b0020311ecb242mr8552071oab.8.1702697917872; Fri, 15 Dec 2023 19:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697917; cv=none; d=google.com; s=arc-20160816; b=rwsV0CX6vxa2+lkw9hd2/hCzxWHm0kJIPbv3OobpT3bHKHV8w3nxan4XRoBmNixn3u Q8sIYBMxLfkxjBSvOnzmdHLFOHpk0zZAYMkIeeVYRG+wvY8ROSWwhwW0x655eMAq4szs YFBoIj0sXSCJpwlFTmCjGbqyxGQ0qjEq8GC6gQz5fwXCknUd44m73Ay08A1cl51WbR2H OioTrFDglbcFFXRRS4HHU1+bgo/lPhmNWV9pSiZUrMXqXcV5noM1fjRCuJN1D7zq+UEE AV5CIYiKCL6lOs9WXqUAnSARFYche2ged+k19ixCqMi05+L2ki9Cm2lV1ZdHSAXP3jiP QZeA== 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=Lx23CvYqmL3FO1BOdwPl48m+Gd9mJQDDIFCAY3/8fI0=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=LrhcQu9VASFuzeR89+vBd2535k4MYCnYuDoKVJT8OB+Eiewm6WIWQ4WJ7BXqiMTq66 20aUGkjATq022qeAgQJDDjvQ1jJY2F6LG/FQjxA4+ZbXuyeS9WjKCz0k2YootHIbPuJs H50xrJthe87R7hzlHtflPEyMArX0Nmn9Fqgsen9oQYLQsEBao41j09klGktUXkfNmemt VICYhC+Cy9BNXWPk7PGbjmHO9GzeoId4uQUELnllM0BWpzNK50yw+wJQQUyl2Y1A6TrB gyriZ7L2LnkJS2kjG+ixvjEYV9HI0C4FrXtjpyqlfG8AQG6MigZYyGOuQc2vrIz4zX5C NjgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=o5z+wqYo; spf=pass (google.com: domain of linux-kernel+bounces-2023-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2023-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v34-20020a634662000000b0058afac51c12si14001480pgk.545.2023.12.15.19.38.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:38:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2023-ouuuleilei=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=o5z+wqYo; spf=pass (google.com: domain of linux-kernel+bounces-2023-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2023-ouuuleilei=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 7385E2819A2 for ; Sat, 16 Dec 2023 03:38:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1393510956; Sat, 16 Dec 2023 03:36:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="o5z+wqYo" X-Original-To: linux-kernel@vger.kernel.org Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) (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 5A9B246BD for ; Sat, 16 Dec 2023 03:36:07 +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=1702697763; 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=Lx23CvYqmL3FO1BOdwPl48m+Gd9mJQDDIFCAY3/8fI0=; b=o5z+wqYoQdVXnS6r4OdqyH4lRXwr0g2HIUjv8a7lcCqCHk8hjzGHrHivbx+/4XXYNf+9iX jsKIbs3P6Pz4RkTLhnbgRjwjpqqommU0D4BNVnMaAIh4umFxfUm48xktMPocCRXv+mkS6J CEJBFfkTi5mQDSL7GRewP4jN4NPtyhI= 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 44/50] restart_block: Trim includes Date: Fri, 15 Dec 2023 22:35:45 -0500 Message-ID: <20231216033552.3553579-1-kent.overstreet@linux.dev> In-Reply-To: <20231216024834.3510073-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408171608044300 X-GMAIL-MSGID: 1785408171608044300 We don't actually use any timekeeping types, no need to pull in time64.h. Also, sched.h uses restart_block; add it as a direct dependency. Signed-off-by: Kent Overstreet --- include/linux/restart_block.h | 2 +- include/linux/sched.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/restart_block.h b/include/linux/restart_block.h index 980a65594412..13f17676c5f4 100644 --- a/include/linux/restart_block.h +++ b/include/linux/restart_block.h @@ -7,8 +7,8 @@ #include #include -#include +struct __kernel_timespec; struct timespec; struct old_timespec32; struct pollfd; diff --git a/include/linux/sched.h b/include/linux/sched.h index 98885e3a81e8..ec739277c39b 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include From patchwork Sat Dec 16 03:35:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179786 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17863dyi; Fri, 15 Dec 2023 19:38:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEf+wE6DR1C1my/xfh8/LR+82QZuXZlRR9iaOPI2Os8GT4Zx86NrkjlYcYWfng+5RPsFtpl X-Received: by 2002:a05:6402:2156:b0:548:e0d0:de86 with SMTP id bq22-20020a056402215600b00548e0d0de86mr6215612edb.39.1702697890661; Fri, 15 Dec 2023 19:38:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697890; cv=none; d=google.com; s=arc-20160816; b=megFWL+TL8X8bO9Hkv9kHy+WwIqSNjI7kzAVi1UFbng4ZEZ983olFBH7glfMtl0ctm 0ECfI5o+h+fxBPYzieDsn3wqTXchBTP4+jswkaJABVE9iGKtUksCW6b73aglVJPIYLvo 6ixkCaWHbI3L+ZCTXgeGYVSFR4Joy5rpTG5/7iXYdyewpytUd9nISbLU0OXvvn4KB7CF 5KbpHvKkCiweY54QsF0Q2ljUkmzWS+e3G8p15TRXSWk60X4YQWePu4oS1U8ZtHihdMk4 x/IMXov3SGkV92Lm1VWSJKRcvCCIt19QEX0YikXJO0IlFhk8NqvWMj5xFBKKGSE7hS5c xYMw== 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=T038932wuCXACMWNvPFPITs/R+VZVZByTEI0/A5A1Vw=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=dVBPRggTogQO26dc71yA3yJEhBIRkYNhf9OciLeuSYq6f+IeWFxd7QshW4iZoa024+ ekmeKOR6BBFLXlaB7fJjmOkPo0QSRgirCIYSaop9Pni1DtJsVVisF9ceI1ZiNIQKrRth c7LBbAxGbcTIy/635b66K65EmUdhZkgQ7hopWX9jMzwLRfdZ+mdStHNWOm7cscSupgX/ lmmHwvhz/bUveCnqlGaSpDUuVe2iOEY/vyQ/cF8XS3PXivIqm7gwBdMipYBa4LQmPGnh bgvjXGQhsMiTa4gASjdl9r2tNXSFZcXldorPavH5gUb5I6D84e6P2nIdX1MltX1sayvH XTYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=JIJ50rps; spf=pass (google.com: domain of linux-kernel+bounces-2024-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2024-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dz10-20020a0564021d4a00b0054c22bd0cebsi8326949edb.132.2023.12.15.19.38.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:38:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2024-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=JIJ50rps; spf=pass (google.com: domain of linux-kernel+bounces-2024-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2024-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1FD781F2157F for ; Sat, 16 Dec 2023 03:38:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 139571095B; Sat, 16 Dec 2023 03:36:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="JIJ50rps" X-Original-To: linux-kernel@vger.kernel.org Received: from out-175.mta1.migadu.com (out-175.mta1.migadu.com [95.215.58.175]) (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 3C0F34681 for ; Sat, 16 Dec 2023 03:36:07 +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=1702697765; 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=T038932wuCXACMWNvPFPITs/R+VZVZByTEI0/A5A1Vw=; b=JIJ50rpsZ9uBQHu6mf0+OX7hWyAU2OKOxh3pe82ZPLtO3xtyCSvUwTvxLYPWZ06u2p6gjg 3B6hiQVH0q/IzecEJ/lXJr5jyu9gn1ur+9K8hANGj9s4B3Exs0aHhuasM4I0XYPP61AcWl peQqnrAdGbrXRWcdu9vReGmtVDWuBoY= 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 45/50] rseq: Split out rseq.h from sched.h Date: Fri, 15 Dec 2023 22:35:46 -0500 Message-ID: <20231216033552.3553579-2-kent.overstreet@linux.dev> In-Reply-To: <20231216033552.3553579-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033552.3553579-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408143328190398 X-GMAIL-MSGID: 1785408143328190398 We're trying to get sched.h down to more or less just types only, not code - rseq can live in its own header. This helps us kill the dependency on preempt.h in sched.h. Signed-off-by: Kent Overstreet --- arch/x86/kernel/signal.c | 1 + fs/exec.c | 1 + include/linux/resume_user_mode.h | 1 + include/linux/rseq.h | 131 +++++++++++++++++++++++++++++++ include/linux/sched.h | 125 +---------------------------- kernel/fork.c | 1 + kernel/sched/core.c | 1 + 7 files changed, 137 insertions(+), 124 deletions(-) create mode 100644 include/linux/rseq.h diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index 65fe2094da59..31b6f5dddfc2 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/fs/exec.c b/fs/exec.c index 4aa19b24f281..41773af7e3dc 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -66,6 +66,7 @@ #include #include #include +#include #include #include diff --git a/include/linux/resume_user_mode.h b/include/linux/resume_user_mode.h index f8f3e958e9cf..e0135e0adae0 100644 --- a/include/linux/resume_user_mode.h +++ b/include/linux/resume_user_mode.h @@ -6,6 +6,7 @@ #include #include #include +#include #include /** diff --git a/include/linux/rseq.h b/include/linux/rseq.h new file mode 100644 index 000000000000..bc8af3eb5598 --- /dev/null +++ b/include/linux/rseq.h @@ -0,0 +1,131 @@ +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +#ifndef _LINUX_RSEQ_H +#define _LINUX_RSEQ_H + +#ifdef CONFIG_RSEQ + +#include +#include + +/* + * Map the event mask on the user-space ABI enum rseq_cs_flags + * for direct mask checks. + */ +enum rseq_event_mask_bits { + RSEQ_EVENT_PREEMPT_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT, + RSEQ_EVENT_SIGNAL_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT, + RSEQ_EVENT_MIGRATE_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT, +}; + +enum rseq_event_mask { + RSEQ_EVENT_PREEMPT = (1U << RSEQ_EVENT_PREEMPT_BIT), + RSEQ_EVENT_SIGNAL = (1U << RSEQ_EVENT_SIGNAL_BIT), + RSEQ_EVENT_MIGRATE = (1U << RSEQ_EVENT_MIGRATE_BIT), +}; + +static inline void rseq_set_notify_resume(struct task_struct *t) +{ + if (t->rseq) + set_tsk_thread_flag(t, TIF_NOTIFY_RESUME); +} + +void __rseq_handle_notify_resume(struct ksignal *sig, struct pt_regs *regs); + +static inline void rseq_handle_notify_resume(struct ksignal *ksig, + struct pt_regs *regs) +{ + if (current->rseq) + __rseq_handle_notify_resume(ksig, regs); +} + +static inline void rseq_signal_deliver(struct ksignal *ksig, + struct pt_regs *regs) +{ + preempt_disable(); + __set_bit(RSEQ_EVENT_SIGNAL_BIT, ¤t->rseq_event_mask); + preempt_enable(); + rseq_handle_notify_resume(ksig, regs); +} + +/* rseq_preempt() requires preemption to be disabled. */ +static inline void rseq_preempt(struct task_struct *t) +{ + __set_bit(RSEQ_EVENT_PREEMPT_BIT, &t->rseq_event_mask); + rseq_set_notify_resume(t); +} + +/* rseq_migrate() requires preemption to be disabled. */ +static inline void rseq_migrate(struct task_struct *t) +{ + __set_bit(RSEQ_EVENT_MIGRATE_BIT, &t->rseq_event_mask); + rseq_set_notify_resume(t); +} + +/* + * If parent process has a registered restartable sequences area, the + * child inherits. Unregister rseq for a clone with CLONE_VM set. + */ +static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) +{ + if (clone_flags & CLONE_VM) { + t->rseq = NULL; + t->rseq_len = 0; + t->rseq_sig = 0; + t->rseq_event_mask = 0; + } else { + t->rseq = current->rseq; + t->rseq_len = current->rseq_len; + t->rseq_sig = current->rseq_sig; + t->rseq_event_mask = current->rseq_event_mask; + } +} + +static inline void rseq_execve(struct task_struct *t) +{ + t->rseq = NULL; + t->rseq_len = 0; + t->rseq_sig = 0; + t->rseq_event_mask = 0; +} + +#else + +static inline void rseq_set_notify_resume(struct task_struct *t) +{ +} +static inline void rseq_handle_notify_resume(struct ksignal *ksig, + struct pt_regs *regs) +{ +} +static inline void rseq_signal_deliver(struct ksignal *ksig, + struct pt_regs *regs) +{ +} +static inline void rseq_preempt(struct task_struct *t) +{ +} +static inline void rseq_migrate(struct task_struct *t) +{ +} +static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) +{ +} +static inline void rseq_execve(struct task_struct *t) +{ +} + +#endif + +#ifdef CONFIG_DEBUG_RSEQ + +void rseq_syscall(struct pt_regs *regs); + +#else + +static inline void rseq_syscall(struct pt_regs *regs) +{ +} + +#endif + +#endif /* _LINUX_RSEQ_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index ec739277c39b..d528057c99e4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include @@ -2180,129 +2180,6 @@ static inline bool owner_on_cpu(struct task_struct *owner) unsigned long sched_cpu_util(int cpu); #endif /* CONFIG_SMP */ -#ifdef CONFIG_RSEQ - -/* - * Map the event mask on the user-space ABI enum rseq_cs_flags - * for direct mask checks. - */ -enum rseq_event_mask_bits { - RSEQ_EVENT_PREEMPT_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_PREEMPT_BIT, - RSEQ_EVENT_SIGNAL_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_SIGNAL_BIT, - RSEQ_EVENT_MIGRATE_BIT = RSEQ_CS_FLAG_NO_RESTART_ON_MIGRATE_BIT, -}; - -enum rseq_event_mask { - RSEQ_EVENT_PREEMPT = (1U << RSEQ_EVENT_PREEMPT_BIT), - RSEQ_EVENT_SIGNAL = (1U << RSEQ_EVENT_SIGNAL_BIT), - RSEQ_EVENT_MIGRATE = (1U << RSEQ_EVENT_MIGRATE_BIT), -}; - -static inline void rseq_set_notify_resume(struct task_struct *t) -{ - if (t->rseq) - set_tsk_thread_flag(t, TIF_NOTIFY_RESUME); -} - -void __rseq_handle_notify_resume(struct ksignal *sig, struct pt_regs *regs); - -static inline void rseq_handle_notify_resume(struct ksignal *ksig, - struct pt_regs *regs) -{ - if (current->rseq) - __rseq_handle_notify_resume(ksig, regs); -} - -static inline void rseq_signal_deliver(struct ksignal *ksig, - struct pt_regs *regs) -{ - preempt_disable(); - __set_bit(RSEQ_EVENT_SIGNAL_BIT, ¤t->rseq_event_mask); - preempt_enable(); - rseq_handle_notify_resume(ksig, regs); -} - -/* rseq_preempt() requires preemption to be disabled. */ -static inline void rseq_preempt(struct task_struct *t) -{ - __set_bit(RSEQ_EVENT_PREEMPT_BIT, &t->rseq_event_mask); - rseq_set_notify_resume(t); -} - -/* rseq_migrate() requires preemption to be disabled. */ -static inline void rseq_migrate(struct task_struct *t) -{ - __set_bit(RSEQ_EVENT_MIGRATE_BIT, &t->rseq_event_mask); - rseq_set_notify_resume(t); -} - -/* - * If parent process has a registered restartable sequences area, the - * child inherits. Unregister rseq for a clone with CLONE_VM set. - */ -static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) -{ - if (clone_flags & CLONE_VM) { - t->rseq = NULL; - t->rseq_len = 0; - t->rseq_sig = 0; - t->rseq_event_mask = 0; - } else { - t->rseq = current->rseq; - t->rseq_len = current->rseq_len; - t->rseq_sig = current->rseq_sig; - t->rseq_event_mask = current->rseq_event_mask; - } -} - -static inline void rseq_execve(struct task_struct *t) -{ - t->rseq = NULL; - t->rseq_len = 0; - t->rseq_sig = 0; - t->rseq_event_mask = 0; -} - -#else - -static inline void rseq_set_notify_resume(struct task_struct *t) -{ -} -static inline void rseq_handle_notify_resume(struct ksignal *ksig, - struct pt_regs *regs) -{ -} -static inline void rseq_signal_deliver(struct ksignal *ksig, - struct pt_regs *regs) -{ -} -static inline void rseq_preempt(struct task_struct *t) -{ -} -static inline void rseq_migrate(struct task_struct *t) -{ -} -static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) -{ -} -static inline void rseq_execve(struct task_struct *t) -{ -} - -#endif - -#ifdef CONFIG_DEBUG_RSEQ - -void rseq_syscall(struct pt_regs *regs); - -#else - -static inline void rseq_syscall(struct pt_regs *regs) -{ -} - -#endif - #ifdef CONFIG_SCHED_CORE extern void sched_core_free(struct task_struct *tsk); extern void sched_core_fork(struct task_struct *p); diff --git a/kernel/fork.c b/kernel/fork.c index 319e61297bfb..53816393995b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -100,6 +100,7 @@ #include #include #include +#include #include #include diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a708d225c28e..d04cf3c47899 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include #include From patchwork Sat Dec 16 03:35:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179787 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp17913dyi; Fri, 15 Dec 2023 19:38:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFByVfnhIwV/9xtgDkAyYlxASd4cmVihYBIoVGyh1LpOEZuDRKkIUjj/Kgs4Qguu+5L7S4L X-Received: by 2002:a05:620a:4950:b0:77f:89e:986d with SMTP id vz16-20020a05620a495000b0077f089e986dmr16345062qkn.78.1702697906487; Fri, 15 Dec 2023 19:38:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697906; cv=none; d=google.com; s=arc-20160816; b=t4EEes1luKzgt48pPNhLCKRAHN+5wk6nhjEI8xZQ5y8Sg1XsOXzXyaOPtVlQ5mNTjc gyu2LSPn00/5WCDL2S4tc6ztae6CtqxLeHLftSG+QuTAW8tObGZaIRHbzne/Ud5O/nFS AHs7KtWHqapXXsnkoFf+skWFMxakm/mw7fjO1bjTSxWanDwYo6D69qq/azA2LEBE8b+j TuLWOLIcT61fbQ3jgZorOucDKhADicVMftPmN9SD5v0rnL4oWBXKzcKDFztX/69K+9Y/ KFBUBQvCjrnAWe264hqzlp3iQgrnlSxnSnxxgZwxd0yDIwJ3lDLd822i9GX/zLbE5XYN pj6g== 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=OUqwYAx0DDPud63nNEdLEk98WtGqrjOdsdwrtUhwy7M=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=lpyDWsllEXSOhfmCPTCL8tK76w+Noywr4762EIXTLaEcYMP6kyQRDFdHDT56hhumSZ TSmCOfVUSplQSjU4SfAGZOaixOGwk9wWZlc9vTUogCjy6nef/N7mIab+bMgx8J1KCh5C 5grHefly6Ls0vRdcXAjPaXNRjwP3d7gK6dX1ozptqfPi0xIx2qEzPjjlD52el+HtGEDt lL4tDzgJiTpa8P1B0vOd6njScPhiQaPxAkOVzDiR7UFA03dAaL3VmO+66d6uYihCQ/kk hto7wdHE9jSIpKzY1YMn9RhagIwNd3RogIaJ2PA+IqaD44qItlryR+G/b04tsra0jNIC Q/Hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="RK/hF5+q"; spf=pass (google.com: domain of linux-kernel+bounces-2025-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2025-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v3-20020a05620a0f0300b0077c0f390186si19827657qkl.368.2023.12.15.19.38.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:38:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2025-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="RK/hF5+q"; spf=pass (google.com: domain of linux-kernel+bounces-2025-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2025-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4C96B1C24A26 for ; Sat, 16 Dec 2023 03:38:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BBBB612B68; Sat, 16 Dec 2023 03:36:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="RK/hF5+q" X-Original-To: linux-kernel@vger.kernel.org Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.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 3EE465670 for ; Sat, 16 Dec 2023 03:36:08 +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=1702697767; 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=OUqwYAx0DDPud63nNEdLEk98WtGqrjOdsdwrtUhwy7M=; b=RK/hF5+qNAuTN//SAOHI3R7Lu9Lf4KKbYrkcT/9G7ZF0d+mCv64pZGUkMRZpfq0PJil7/G 9K/J6HudIs1uYCuuQDHxAZkUyBklxOtXfa5qhuihA7RRVwaGkztuPBEywhIYYfGrmFaPOT 3b5Jx+8IMm2SxDqdLfIJPieW5co+7gU= 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 46/50] preempt.h: Kill dependency on list.h Date: Fri, 15 Dec 2023 22:35:47 -0500 Message-ID: <20231216033552.3553579-3-kent.overstreet@linux.dev> In-Reply-To: <20231216033552.3553579-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033552.3553579-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408159804933358 X-GMAIL-MSGID: 1785408159804933358 We really only need types.h, list.h is big. Signed-off-by: Kent Overstreet --- include/linux/preempt.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/preempt.h b/include/linux/preempt.h index 9aa6358a1a16..7233e9cf1bab 100644 --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -9,7 +9,7 @@ #include #include -#include +#include /* * We put the hardirq and softirq counter into the preemption @@ -360,7 +360,9 @@ void preempt_notifier_unregister(struct preempt_notifier *notifier); static inline void preempt_notifier_init(struct preempt_notifier *notifier, struct preempt_ops *ops) { - INIT_HLIST_NODE(¬ifier->link); + /* INIT_HLIST_NODE() open coded, to avoid dependency on list.h */ + notifier->link.next = NULL; + notifier->link.pprev = NULL; notifier->ops = ops; } From patchwork Sat Dec 16 03:35:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179790 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp18078dyi; Fri, 15 Dec 2023 19:39:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHPlxRE6e9CfXEMgMNzOp2GsilF7CA+rU2aQ2872mGr1qMW8ioMNl43KVHZBq/bA8rOhZo X-Received: by 2002:a05:6358:e4a1:b0:170:cc09:2e3e with SMTP id by33-20020a056358e4a100b00170cc092e3emr13758532rwb.60.1702697949522; Fri, 15 Dec 2023 19:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697949; cv=none; d=google.com; s=arc-20160816; b=AQEr88vDdPdNqsU5eUsy7jMnXMOZxxDn4TiQ3P06e5ml72vFrwkToGeOFxFNdWtepY hzmn4Gszw3Hw7/NmxujhTmeJyO+vXB90L4V5F/sX6/QTunMTfdVNYCTQV0iTGqD5jY4Z 657M8ZR539QVSRb4qi0rqf3Ix2FquLB/TPwoLOU9aANvjpjAgs9RlLx//ynyUCcrTr36 GBAA6MTl67GXhuqCPB6HBZYp+pdg2midL9tjufN7AQhxLPEvabssZecF3zU8XqTQs3bJ H3V5kf+7aDnTXzIZyr82qqzIfTlIth8HhUzDwyz0/mnf9zEXagNwRPGMqe7jEct5LdcC QYmw== 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=vu1t9phxzTSXpH+NH5TjLwnssQckaKv/rd6AdxtJ6QU=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=US9A2caNKaXOjc8Q/d8NxXM0X23cmVjwzikovXvSlRN0PAYZKuzEsD7s9cPhRSdnal R2FOUDN8ZSBZ5qT+yXACdUFsS2Yn4ZSYVdmjVMNmpbxiovMFcEiDYV2DdFP4g86Z/1An is2qt/2wrKJhFqOwtOMNv5MeSie78GVBEAAX6zj85g/kVvOK0VIh3Dxyh0kWBdF9DlqF E/k5W5wwxvdwXVAz7RLXUjObkgmqVCu0/RBhodFrnE9vAdFovIXsvGXfbGyHWAQbbuw+ FEzN6v+5SXGCYoYzA5pcfyeDksUmjvjcrIFkGmQLrgiQ4KScES63vTzx2KwhwSzISN1G MHNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=k2LqHjje; spf=pass (google.com: domain of linux-kernel+bounces-2026-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2026-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o3-20020a17090ab88300b0028b2f13d510si1980265pjr.72.2023.12.15.19.39.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:39:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2026-ouuuleilei=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=k2LqHjje; spf=pass (google.com: domain of linux-kernel+bounces-2026-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2026-ouuuleilei=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 61253286191 for ; Sat, 16 Dec 2023 03:38:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56B7E1429C; Sat, 16 Dec 2023 03:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="k2LqHjje" X-Original-To: linux-kernel@vger.kernel.org Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181]) (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 2168ED532 for ; Sat, 16 Dec 2023 03:36:10 +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=1702697769; 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=vu1t9phxzTSXpH+NH5TjLwnssQckaKv/rd6AdxtJ6QU=; b=k2LqHjjeXyWQcZtEDT3qPwqJuVwSn31XJPGOmS7I+9BpmD0M3wsbYtMoHVlHz4TYub/KKS DPM8Vz6e/Sk8rDIrenfyToVzwzlhXYIAl5YUo7wyNEGYRA0OZmX/Ixpt2NvbKJDE+mxSRw Xhh1YWwCbg1cSQ6BMyxwdiNZZiGXZS4= 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 47/50] thread_info, uaccess.h: Move HARDENED_USERCOPY to better location Date: Fri, 15 Dec 2023 22:35:48 -0500 Message-ID: <20231216033552.3553579-4-kent.overstreet@linux.dev> In-Reply-To: <20231216033552.3553579-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033552.3553579-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408205219472526 X-GMAIL-MSGID: 1785408205219472526 thread_info.h is needed by sched.h, and we're trying to slim down dependencies there - bug.h is a big one. And the HARDENED_USERCOPY stuff is used in uaccess.h, so it makes more sense there anyways. Signed-off-by: Kent Overstreet --- include/linux/thread_info.h | 49 ------------------------------------- include/linux/uaccess.h | 49 +++++++++++++++++++++++++++++++++++++ include/linux/uio.h | 2 +- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 9ea0b28068f4..85d99c556cb5 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -204,54 +203,6 @@ static inline int arch_within_stack_frames(const void * const stack, } #endif -#ifdef CONFIG_HARDENED_USERCOPY -extern void __check_object_size(const void *ptr, unsigned long n, - bool to_user); - -static __always_inline void check_object_size(const void *ptr, unsigned long n, - bool to_user) -{ - if (!__builtin_constant_p(n)) - __check_object_size(ptr, n, to_user); -} -#else -static inline void check_object_size(const void *ptr, unsigned long n, - bool to_user) -{ } -#endif /* CONFIG_HARDENED_USERCOPY */ - -extern void __compiletime_error("copy source size is too small") -__bad_copy_from(void); -extern void __compiletime_error("copy destination size is too small") -__bad_copy_to(void); - -void __copy_overflow(int size, unsigned long count); - -static inline void copy_overflow(int size, unsigned long count) -{ - if (IS_ENABLED(CONFIG_BUG)) - __copy_overflow(size, count); -} - -static __always_inline __must_check bool -check_copy_size(const void *addr, size_t bytes, bool is_source) -{ - int sz = __builtin_object_size(addr, 0); - if (unlikely(sz >= 0 && sz < bytes)) { - if (!__builtin_constant_p(bytes)) - copy_overflow(sz, bytes); - else if (is_source) - __bad_copy_from(); - else - __bad_copy_to(); - return false; - } - if (WARN_ON_ONCE(bytes > INT_MAX)) - return false; - check_object_size(addr, bytes, is_source); - return true; -} - #ifndef arch_setup_new_exec static inline void arch_setup_new_exec(void) { } #endif diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index 3064314f4832..3e93ee64d6f8 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -2,6 +2,7 @@ #ifndef __LINUX_UACCESS_H__ #define __LINUX_UACCESS_H__ +#include #include #include #include @@ -32,6 +33,54 @@ }) #endif +#ifdef CONFIG_HARDENED_USERCOPY +extern void __check_object_size(const void *ptr, unsigned long n, + bool to_user); + +static __always_inline void check_object_size(const void *ptr, unsigned long n, + bool to_user) +{ + if (!__builtin_constant_p(n)) + __check_object_size(ptr, n, to_user); +} +#else +static inline void check_object_size(const void *ptr, unsigned long n, + bool to_user) +{ } +#endif /* CONFIG_HARDENED_USERCOPY */ + +extern void __compiletime_error("copy source size is too small") +__bad_copy_from(void); +extern void __compiletime_error("copy destination size is too small") +__bad_copy_to(void); + +void __copy_overflow(int size, unsigned long count); + +static inline void copy_overflow(int size, unsigned long count) +{ + if (IS_ENABLED(CONFIG_BUG)) + __copy_overflow(size, count); +} + +static __always_inline __must_check bool +check_copy_size(const void *addr, size_t bytes, bool is_source) +{ + int sz = __builtin_object_size(addr, 0); + if (unlikely(sz >= 0 && sz < bytes)) { + if (!__builtin_constant_p(bytes)) + copy_overflow(sz, bytes); + else if (is_source) + __bad_copy_from(); + else + __bad_copy_to(); + return false; + } + if (WARN_ON_ONCE(bytes > INT_MAX)) + return false; + check_object_size(addr, bytes, is_source); + return true; +} + /* * Architectures should provide two primitives (raw_copy_{to,from}_user()) * and get rid of their private instances of copy_{to,from}_user() and diff --git a/include/linux/uio.h b/include/linux/uio.h index b6214cbf2a43..084262b68106 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -6,7 +6,7 @@ #define __LINUX_UIO_H #include -#include +#include #include #include From patchwork Sat Dec 16 03:35:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179789 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp18064dyi; Fri, 15 Dec 2023 19:39:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IH51SFAZFipOnFAd3yaubuioCspdPMJ1aJA1u8yObGRpimpwFQ6l6faKByDtcodgPiaGisR X-Received: by 2002:a05:651c:1a0f:b0:2cc:1da0:9f1 with SMTP id by15-20020a05651c1a0f00b002cc1da009f1mr2512667ljb.12.1702697945809; Fri, 15 Dec 2023 19:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697945; cv=none; d=google.com; s=arc-20160816; b=D5OrpUAmBfpvHCDw+27gvEpWepo/5yMfKAwNKlbc0EeS3B2+f6C8iEv/Zx7/SoeH11 YzD6ZRRJwDU0+Hh4k3T61L5TG4Gh3oqLFUmzyOTvQYYWhYiMXGvdtdxPVRg0kARIxgdT /vOjyu+oMnBMvP3lm72BH2yeNBz3f9eb+cCsXIS1gnxnDQzjs93g7eERvautj6Izdckl 0rE+CEHMqnK1JpseqYnRaLn3RGlOBUduT7sAQc/sqRMZQmjV8WZHQ3qqvR1ixSSCV9cw ohFg5cGgCLQLTlGPZQ/3+Lld89W8LEwVwjpGj17JxaZLklogpYhVmHHPdjv86fcg31Ph 9ifg== 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=LxvqaxrdjqIZpV18yuEOiGDA6WPBowU+ZtiCF/cYqpM=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=hh2MywfOACKldhkglCEDOrJI2aEkswKi/oodAjqHhg6UJcFBC4gnzkVQTIS3vtpTgK QZw281Ii64ZWWldwxTWqzFaz7nEvkgii7LlsAyMuCeAHOyp3Elce2LLuIe+8tHyLfJG0 NWblttbyMQZSd5G2o1K5eVQyiWLm0eRgE3Tfo2h9FMig+YVxMV549ULxGylLwTDxUD8s 1ebSiqIVVbVgkzK0eRLIe93hSuaaOAuSOcLbEhUWXmbuJsI8lymz1iEUZ/28eaRs1YXW eFVvXZ/JOVR0A5Nf/Sv3ktGHBEzUQGmvhZDYjSsN8uppWYjtVrJNuPHI0LocvSzpfmJr zS8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=eq5ynikG; spf=pass (google.com: domain of linux-kernel+bounces-2027-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2027-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id m29-20020a50931d000000b005527b37050esi1953287eda.163.2023.12.15.19.39.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:39:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2027-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=eq5ynikG; spf=pass (google.com: domain of linux-kernel+bounces-2027-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2027-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6A1691F20FBB for ; Sat, 16 Dec 2023 03:39:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AECBB17729; Sat, 16 Dec 2023 03:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eq5ynikG" X-Original-To: linux-kernel@vger.kernel.org Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 DB69D1118E for ; Sat, 16 Dec 2023 03:36:12 +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=1702697771; 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=LxvqaxrdjqIZpV18yuEOiGDA6WPBowU+ZtiCF/cYqpM=; b=eq5ynikG7aXEh6Wl2qNFNspAUNLPUKuuSZkYAM8mRcc9I/D6+KXkpqCFFkaUh5XcyNu/wI 0jDvO1DVSEpdKkrdnhXCQ7HWBiE/jFlguUb9/g3KueG54u3XtLojaST1LNOYUbnJAtKg18 R/xt9RtELiUb0ZrPxw3JBXxl7/TUMKk= 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 48/50] Kill unnecessary kernel.h include Date: Fri, 15 Dec 2023 22:35:49 -0500 Message-ID: <20231216033552.3553579-5-kent.overstreet@linux.dev> In-Reply-To: <20231216033552.3553579-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033552.3553579-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408201247820460 X-GMAIL-MSGID: 1785408201247820460 More trimming down unnecessary includes. Signed-off-by: Kent Overstreet --- arch/x86/include/asm/current.h | 1 + arch/x86/include/asm/percpu.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/current.h b/arch/x86/include/asm/current.h index a1168e7b69e5..dd4b67101bb7 100644 --- a/arch/x86/include/asm/current.h +++ b/arch/x86/include/asm/current.h @@ -2,6 +2,7 @@ #ifndef _ASM_X86_CURRENT_H #define _ASM_X86_CURRENT_H +#include #include #ifndef __ASSEMBLY__ diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index 20624b80f890..5e01883eb51e 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h @@ -24,8 +24,8 @@ #else /* ...!ASSEMBLY */ -#include #include +#include #ifdef CONFIG_SMP #define __percpu_prefix "%%"__stringify(__percpu_seg)":" From patchwork Sat Dec 16 03:35:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179791 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp18118dyi; Fri, 15 Dec 2023 19:39:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxLecmks81hczpMocilNU9epppfwJM76E35t4XxzDgq8GfUSxDTI+tBE02hsZPip+ja8NY X-Received: by 2002:ac8:7e89:0:b0:425:4043:18d1 with SMTP id w9-20020ac87e89000000b00425404318d1mr16060282qtj.132.1702697961691; Fri, 15 Dec 2023 19:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697961; cv=none; d=google.com; s=arc-20160816; b=OcoFiaMmFl0JlsXf17j1ecuuI9p+Eq1kdH0lNSTWuSS7hz5F+pZxHnhB3phIqPGYXr VDSiQV0MiBdoJ8E+9AmEcOBAIFS/yxshRwu49HReKqvutujF+JKzuAQ9bgErkv3gHfjX d7QbMH/NzgGhjhYhe5aaUqn45uSmB0HcJ31XfO9tFCGGXjjJxro3obT+w5XmzrOfqBWr 9aWZne451am1N+weYP1T3x5t1dMVnc4evFw/40BYyOIWTE5mQkT+v3qwHHAhDqV+8fKj /a955mrrd/JtCDUfYTmihelYVj4e0IvRmISuF0cjRRL5s8a1W2mXcs8X98EHzRUH2GWf ys+g== 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=850nIVdU/aZ+9UNxKyDC6+ms+COezKJHu/54VC5PeQc=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=h8x7vdzz6nlgXJGbT2+4o0TrInzQSjf0YyJaCz74gg8DlcQ7dgi3AVwmHTMcAivK8n irQJP7Xrov9sqz0Gyk/Nd6x42PU6Et1KScn0TxGwc59dvincY9ATdl0Wg8ss/IQI6kMO ezfdSKJW3E2knJIQBeTdOWrMr0j61raeeBoS/j+5F7Nbh2bvarRBE7X0ZjBBCvGyv7ta J8Vw/5HiodbuoHVZtAatIP9TcDd8pjILTe52QGkx9dfQR4E3o5fZPFvL2PYlPI7mLc/T qmCNgtgM1pVXuQ+UeULr6J33omNPlE1PSqEhkI59q4TZ8667AbTdXrCSZaZRAEyFT3f4 HSbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=qxY+wHmx; spf=pass (google.com: domain of linux-kernel+bounces-2028-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2028-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id ay13-20020a05622a228d00b00423aca6388bsi19720203qtb.786.2023.12.15.19.39.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:39:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2028-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=qxY+wHmx; spf=pass (google.com: domain of linux-kernel+bounces-2028-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2028-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E5261C24A67 for ; Sat, 16 Dec 2023 03:39:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6092519460; Sat, 16 Dec 2023 03:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="qxY+wHmx" X-Original-To: linux-kernel@vger.kernel.org Received: from out-178.mta1.migadu.com (out-178.mta1.migadu.com [95.215.58.178]) (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 B42D1134CA for ; Sat, 16 Dec 2023 03:36:14 +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=1702697773; 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=850nIVdU/aZ+9UNxKyDC6+ms+COezKJHu/54VC5PeQc=; b=qxY+wHmxOFVeWSzvjapHXJMiZ8z/5+3XLBv4Zxe1O9zHPBcEu05pL0085Fb2ALCvaqgp1l EKpcrQg3yY+jiz+KJ1Ga3SmSAnVvGIW0PBDkb8U44EX1PMESjWCmHLFF7SRzsIs8cfDX0A LQBD1olLoqijXr/khW6yfgWu1gjdHv4= 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 49/50] kill unnecessary thread_info.h include Date: Fri, 15 Dec 2023 22:35:50 -0500 Message-ID: <20231216033552.3553579-6-kent.overstreet@linux.dev> In-Reply-To: <20231216033552.3553579-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033552.3553579-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408218013770876 X-GMAIL-MSGID: 1785408218013770876 Signed-off-by: Kent Overstreet --- arch/x86/include/asm/fpu/types.h | 2 ++ arch/x86/include/asm/preempt.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h index eb810074f1e7..3dad7cf25505 100644 --- a/arch/x86/include/asm/fpu/types.h +++ b/arch/x86/include/asm/fpu/types.h @@ -5,6 +5,8 @@ #ifndef _ASM_X86_FPU_H #define _ASM_X86_FPU_H +#include + /* * The legacy x87 FPU state format, as saved by FSAVE and * restored by the FRSTOR instructions: diff --git a/arch/x86/include/asm/preempt.h b/arch/x86/include/asm/preempt.h index 4527e1430c6d..af77235fded6 100644 --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h @@ -6,7 +6,6 @@ #include #include -#include #include /* We use the MSB mostly because its available */ From patchwork Sat Dec 16 03:35:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kent Overstreet X-Patchwork-Id: 179792 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp18150dyi; Fri, 15 Dec 2023 19:39:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IExYljzVJUBbpRi0UT0FnHYMCdu045RfFvRAAp26b9woHeFjT/oHG+KwwtGFj2nWeTVTibM X-Received: by 2002:a17:906:20dd:b0:a1f:616d:ea7a with SMTP id c29-20020a17090620dd00b00a1f616dea7amr5874381ejc.91.1702697972156; Fri, 15 Dec 2023 19:39:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702697972; cv=none; d=google.com; s=arc-20160816; b=rawSMQtXvU6V+dXfI8BTkY+ymi0LKsYFFYMua4yuCD1pM6zBJEtt72djJ69fPZQ53t ELHr8sKJ0qk3UlL7J2PWnHybbxuTJaneJpvpDCfh3XKXXhlZcYyXqwgj5g1CMy+kv5WG gDTvRES/Q3S+wflGIQ9u/le+QhJSK6d80QMRQ8exU6d3ei3ZkNY8Ww7t5uelLPLqjZi/ iF6EvLW16vRcmtNwnyBKjStLOjgRCoq56LYNgFje0cDHsWaY+YR61B1lSaVl5WYm/aa7 2xI4MR7clwXp6RVb2i7+UTSUTztMHHiHctbL+vNolEjFOvLV/oEtIgXQeoODPuteJkSc h33g== 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=9mNDldpW72dzzPm2XiWKIN1gnNsmgtyhmZKpYp8TNSQ=; fh=vHhjxHftTECn/hRvIWNlq1eDzDsn74Roqz0kmRcPgcE=; b=sxt8JsoQ170hbSUV0OHilssJyihnGFWKP+bAvv06VvaE/LmGUGLv/nKppcHr3Bsp17 ZUxxvUI+WMfFwY+RZsdVdV8d6j7hIYi4Qx1I+ZPRqdKCckyxilPl2w+/yB1fPu6BYkFn /gdQwB0T21P06JfunHBxhtAxdyqkIFYfLfJqteI5Q+JYdzGGeXa8r3kkNxjT7hZEsh5q eClqQLey5O7SZjTc1ypfBVfQYZqAwqhLjd7i+i/Kh1tRiR/2GKaQ2F7bXcm+Vtxnyw0M jY5DnEy80j5iCm1iLrliQo1fBEXBK/JIP7ea3aXta8Hrmt4UXuA0/MaepfT7hSYhvjqI GK6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XEtPsaHY; spf=pass (google.com: domain of linux-kernel+bounces-2029-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2029-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id si5-20020a170906cec500b00a1e3254ef26si7748191ejb.98.2023.12.15.19.39.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Dec 2023 19:39:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2029-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=XEtPsaHY; spf=pass (google.com: domain of linux-kernel+bounces-2029-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2029-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id C26541F2238A for ; Sat, 16 Dec 2023 03:39:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14A921A720; Sat, 16 Dec 2023 03:36:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="XEtPsaHY" X-Original-To: linux-kernel@vger.kernel.org Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (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 E50AE154BA for ; Sat, 16 Dec 2023 03:36:16 +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=1702697775; 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=9mNDldpW72dzzPm2XiWKIN1gnNsmgtyhmZKpYp8TNSQ=; b=XEtPsaHY4Dmh0NEcxeo6xv7f2ym7o2IfV8/+qvppIKvuW8rL7syDOpqeXnCtLUbRWy3ay9 XUTcKSfr0H9Um73s8jIzA0dpG5SyaSVsv//HPpv6j5K8XxsJxUYi8LxxcHXGVIFo2kSSKH BrTDi66xvwaoqvzUoGgtuCKz5WtWL5I= 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 50/50] Kill sched.h dependency on rcupdate.h Date: Fri, 15 Dec 2023 22:35:51 -0500 Message-ID: <20231216033552.3553579-7-kent.overstreet@linux.dev> In-Reply-To: <20231216033552.3553579-1-kent.overstreet@linux.dev> References: <20231216024834.3510073-1-kent.overstreet@linux.dev> <20231216033552.3553579-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 X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408228743578203 X-GMAIL-MSGID: 1785408228743578203 by moving cond_resched_rcu() to rcupdate.h, we can kill another big sched.h dependency. Signed-off-by: Kent Overstreet Reported-by: noreply@ellerman.id.au Acked-by: Geert Uytterhoeven --- include/linux/rcupdate.h | 11 +++++++++++ include/linux/sched.h | 13 +++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index f7206b2623c9..8ebfa57e0164 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h @@ -1058,4 +1058,15 @@ extern int rcu_normal; DEFINE_LOCK_GUARD_0(rcu, rcu_read_lock(), rcu_read_unlock()) +#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU) +#define cond_resched_rcu() \ +do { \ + rcu_read_unlock(); \ + cond_resched(); \ + rcu_read_lock(); \ +} while (0) +#else +#define cond_resched_rcu() +#endif + #endif /* __LINUX_RCUPDATE_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index d528057c99e4..b781ac7e0a02 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -10,8 +10,11 @@ #include #include +#include +#include #include +#include #include #include #include @@ -22,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -2058,15 +2060,6 @@ extern int __cond_resched_rwlock_write(rwlock_t *lock); __cond_resched_rwlock_write(lock); \ }) -static inline void cond_resched_rcu(void) -{ -#if defined(CONFIG_DEBUG_ATOMIC_SLEEP) || !defined(CONFIG_PREEMPT_RCU) - rcu_read_unlock(); - cond_resched(); - rcu_read_lock(); -#endif -} - #ifdef CONFIG_PREEMPT_DYNAMIC extern bool preempt_model_none(void);