Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1574760

[PATCH 49/89] sched/headers: Move <asm/current.h> include from the middle of <linux/sched.h> to the header portion

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 49/89] sched/headers: Move <asm/current.h> include from the middle of <linux/sched.h> to the header portion
Date Mon, 06 Feb 2017 14:50:04 +0100
Message-ID <t7RQ8-5AW-87@gated-at.bofh.it> (permalink)
References <t7RGp-5x6-3@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=rEKmnz8Ok9iXSC9Jy2U38TlKQ/5PgUR4STkd0v379+A=; b=JpOuAk2mdf7xud2N1L2eb/RdBu1GdNO+OLghYomjai5leyZfjZpTwxD+eehK3t9aMq Emk4NmzzSanhWsYDfRsyIKa/CXSUbLea2+HOEK+xRQt+OZRVYAdMRrpZJfBaQiCUCcJ8 L9LcFONHT4oGu2tyOr5y6tk2E3K1dx9wqUSsViR+k2JwxfQajpEOhXUZqbFWmdQJXbUy IXFuEeL/3bPEt8/PKhQoNJvAkEnIAF6WuywpZldBasKH5ZqwUOh98qZX+Be7y9f7gCCy H9I/1YfxefLFrvkonKl2qj4dQyemDdNIinnpg9hpxrAFzUuwZfQ5kni5R87/iY3ks8AV qorw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=rEKmnz8Ok9iXSC9Jy2U38TlKQ/5PgUR4STkd0v379+A=; b=px6kgvxxmwOC9ClBEuEBU0XF5QkSTsRx5yOCmuSYrBvh0O33DacLjsBfo1skUh62DV 3OyC5n/mdyaaOUaoZIpFdXIuj8eI68DcocfHLsgenmN7k7P24A1bgTuisYj59vMHh/Fu fjH34kWR4S2N0wKAZNhTt+eZpcVDfNYfk9WO1eGz3kP4UNtWmAnQtFJsyAxhZPseFfrw qPuzkEQqkjZLyUOFh0EGSbYYgag7XixqAOtrR+a/Vl4noIFfplR9ZHxnQBsCO/lgxAjY 28gPHFup5f7G4KbWUFqhBRCWaMor8A7Y/RSFfyIEinkvE/cDSe6TFqYo6BYiHoR5IHc9 gW1Q==
X-Gm-Message-State AMke39lc8hNyXKg4PbJVdooBtVb5YjEj1dhlZHgP7MTFkkaT+UcYPB9JREUqbrY0uycw6A==
X-Received by 10.28.229.193 with SMTP id c184mr9627003wmh.83.1486387854290; Mon, 06 Feb 2017 05:30:54 -0800 (PST)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 45
Organization linux.* mail to news gateway
X-Original-Cc Andrew Morton <akpm@linux-foundation.org>, Linus Torvalds <torvalds@linux-foundation.org>, Mike Galbraith <efault@gmx.de>, Oleg Nesterov <oleg@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>
X-Original-Date Mon, 6 Feb 2017 14:28:52 +0100
X-Original-Message-ID <1486387772-18837-50-git-send-email-mingo@kernel.org>
X-Original-References <1486387772-18837-1-git-send-email-mingo@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1574760

Show key headers only | View raw


Linux-0.01 already defined 'current' in the middle of sched.h, so this
is an ancient historical precedent - but still in a modern kernel it
looks a bit weird that we have:

	#include <asm/current.h>

in the middle of the header.

Move it further up. If this was done for some obscure dependency
reasons then we'll trigger and document it.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 include/linux/sched.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index f2c86b69c3e8..29262493c915 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -23,6 +23,8 @@
 #include <linux/topology.h>
 #include <linux/magic.h>
 
+#include <asm/current.h>
+
 struct sched_attr;
 struct sched_param;
 
@@ -1574,8 +1576,6 @@ extern struct task_struct *find_task_by_vpid(pid_t nr);
 extern struct task_struct *find_task_by_pid_ns(pid_t nr,
 		struct pid_namespace *ns);
 
-#include <asm/current.h>
-
 extern int wake_up_state(struct task_struct *tsk, unsigned int state);
 extern int wake_up_process(struct task_struct *tsk);
 extern void wake_up_new_task(struct task_struct *tsk);
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 49/89] sched/headers: Move <asm/current.h> include from the middle of <linux/sched.h> to the header portion Ingo Molnar <mingo@kernel.org> - 2017-02-06 14:50 +0100

csiph-web