Message ID | 20231216033300.3553457-10-kent.overstreet@linux.dev |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-2021-ouuuleilei=gmail.com@vger.kernel.org> 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 <ouuuleilei@gmail.com> (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 <ouuuleilei@gmail.com>; 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 <linux-kernel@vger.kernel.org>; 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 <kent.overstreet@linux.dev> To: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org Cc: Kent Overstreet <kent.overstreet@linux.dev>, 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785408084925385689 X-GMAIL-MSGID: 1785408084925385689 |
Series |
big header dependency cleanup targeting sched.h
|
|
Commit Message
Kent Overstreet
Dec. 16, 2023, 3:32 a.m. UTC
More sched.h dependency pruning.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
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
Comments
Hi Kent, On Sat, Dec 16, 2023 at 4:37 AM Kent Overstreet <kent.overstreet@linux.dev> wrote: > More sched.h dependency pruning. > > Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Thanks for your patch, which is now commit eb72d60ccaed883a ("sem: Split out sem_types.h") in next-20231220. $ make ARCH=m68k defconfig arch/m68k/kernel/asm-offsets.i *** Default configuration is based on 'multi_defconfig' # # No change to .config # UPD include/config/kernel.release UPD include/generated/utsrelease.h CC arch/m68k/kernel/asm-offsets.s In file included from arch/m68k/kernel/asm-offsets.c:15: ./include/linux/sched.h:551:3: error: conflicting types for ‘____cacheline_aligned’ 551 | } ____cacheline_aligned; | ^~~~~~~~~~~~~~~~~~~~~ ./include/linux/sched.h:509:3: note: previous declaration of ‘____cacheline_aligned’ was here 509 | } ____cacheline_aligned; | ^~~~~~~~~~~~~~~~~~~~~ make[3]: *** [scripts/Makefile.build:116: arch/m68k/kernel/asm-offsets.s] Error 1 make[2]: *** [Makefile:1191: prepare0] Error 2 make[1]: *** [Makefile:350: __build_one_by_one] Error 2 make: *** [Makefile:234: __sub-make] Error 2 > --- 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 <linux/irqflags_types.h> > #include <linux/pid_types.h> > -#include <linux/sem.h> > +#include <linux/sem_types.h> > #include <linux/shm.h> > #include <linux/kmsan_types.h> > #include <linux/mutex_types.h> > #include <linux/plist_types.h> > #include <linux/hrtimer_types.h> > +#include <linux/timer_types.h> > #include <linux/seccomp_types.h> > #include <linux/nodemask_types.h> > #include <linux/rcupdate.h> > 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 <uapi/linux/sem.h> > +#include <linux/sem_types.h> > > 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 */ > Gr{oetje,eeting}s, Geert
On Wed, Dec 20, 2023 at 12:53:46PM +0100, Geert Uytterhoeven wrote: > Hi Kent, > > On Sat, Dec 16, 2023 at 4:37 AM Kent Overstreet > <kent.overstreet@linux.dev> wrote: > > More sched.h dependency pruning. > > > > Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> > > Thanks for your patch, which is now commit eb72d60ccaed883a ("sem: > Split out sem_types.h") in next-20231220. > > $ make ARCH=m68k defconfig arch/m68k/kernel/asm-offsets.i > *** Default configuration is based on 'multi_defconfig' > # > # No change to .config > # > UPD include/config/kernel.release > UPD include/generated/utsrelease.h > CC arch/m68k/kernel/asm-offsets.s > In file included from arch/m68k/kernel/asm-offsets.c:15: > ./include/linux/sched.h:551:3: error: conflicting types for > ‘____cacheline_aligned’ > 551 | } ____cacheline_aligned; > | ^~~~~~~~~~~~~~~~~~~~~ > ./include/linux/sched.h:509:3: note: previous declaration of > ‘____cacheline_aligned’ was here > 509 | } ____cacheline_aligned; > | ^~~~~~~~~~~~~~~~~~~~~ > make[3]: *** [scripts/Makefile.build:116: > arch/m68k/kernel/asm-offsets.s] Error 1 > make[2]: *** [Makefile:1191: prepare0] Error 2 > make[1]: *** [Makefile:350: __build_one_by_one] Error 2 > make: *** [Makefile:234: __sub-make] Error 2 Is this a build failure on linux-next, or that specific commit? It looks like this should be fixed in a later commit that includes cache.h in sched.h; I'll move that include back to this patch.
Hi Kent, On Wed, Dec 20, 2023 at 10:39 PM Kent Overstreet <kent.overstreet@linux.dev> wrote: > On Wed, Dec 20, 2023 at 12:53:46PM +0100, Geert Uytterhoeven wrote: > > On Sat, Dec 16, 2023 at 4:37 AM Kent Overstreet > > <kent.overstreet@linux.dev> wrote: > > > More sched.h dependency pruning. > > > > > > Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> > > > > Thanks for your patch, which is now commit eb72d60ccaed883a ("sem: > > Split out sem_types.h") in next-20231220. > > > > $ make ARCH=m68k defconfig arch/m68k/kernel/asm-offsets.i > > *** Default configuration is based on 'multi_defconfig' > > # > > # No change to .config > > # > > UPD include/config/kernel.release > > UPD include/generated/utsrelease.h > > CC arch/m68k/kernel/asm-offsets.s > > In file included from arch/m68k/kernel/asm-offsets.c:15: > > ./include/linux/sched.h:551:3: error: conflicting types for > > ‘____cacheline_aligned’ > > 551 | } ____cacheline_aligned; > > | ^~~~~~~~~~~~~~~~~~~~~ > > ./include/linux/sched.h:509:3: note: previous declaration of > > ‘____cacheline_aligned’ was here > > 509 | } ____cacheline_aligned; > > | ^~~~~~~~~~~~~~~~~~~~~ > > make[3]: *** [scripts/Makefile.build:116: > > arch/m68k/kernel/asm-offsets.s] Error 1 > > make[2]: *** [Makefile:1191: prepare0] Error 2 > > make[1]: *** [Makefile:350: __build_one_by_one] Error 2 > > make: *** [Makefile:234: __sub-make] Error 2 > > Is this a build failure on linux-next, or that specific commit? On this specific commit. > It looks like this should be fixed in a later commit that includes > cache.h in sched.h; I'll move that include back to this patch. Indeed. The robots reported a build failure, and bisection arrived at this (different) build failure first. Gr{oetje,eeting}s, Geert
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 <linux/irqflags_types.h> #include <linux/pid_types.h> -#include <linux/sem.h> +#include <linux/sem_types.h> #include <linux/shm.h> #include <linux/kmsan_types.h> #include <linux/mutex_types.h> #include <linux/plist_types.h> #include <linux/hrtimer_types.h> +#include <linux/timer_types.h> #include <linux/seccomp_types.h> #include <linux/nodemask_types.h> #include <linux/rcupdate.h> 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 <uapi/linux/sem.h> +#include <linux/sem_types.h> 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 */