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


Groups > linux.kernel > #1576862

[PATCH 02/48] sched/headers: Prepare for new header dependencies before moving code to <linux/sched/idle.h>

Path csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod
From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 02/48] sched/headers: Prepare for new header dependencies before moving code to <linux/sched/idle.h>
Date Wed, 08 Feb 2017 20:00:01 +0100
Message-ID <t8FDb-3VT-3@gated-at.bofh.it> (permalink)
References <t8Ftw-3Sf-21@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=po+f4hBBCf0UYMENa6XEGxlu+9YrsJlb0sE9jthkLv8=; b=POMZ769xXcj5UsR02GPbJi1wd7PYT7eFXeAhqE04jopSDqHbOeaIGSjPZi+Y2Xe3yZ BJuccatMowRMW8J6PkzVTYIpPFOtTOQH/57l+uVWeW9tWNqwAqhM8COQiIrqYqlcD8nN 92Ilmp+7oImp7M9ni6TEqydHsNXJq8M6YRMbe36nvKOMgx75fY9f7VDf3omx2qgr4QGD dyJsPkixXJZyRqame6m78L+P1E64pn12d3LaHsVkgInD4RRdKL2ypVhpgLLbw8YJ2Lur pwoFKXRrMzUef+IUwOOCiRzZZ0yyCg/xfJ9v1JnGTPSEZRSXu4EZTNQBha9JIFJ7xFZv /vVw==
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=po+f4hBBCf0UYMENa6XEGxlu+9YrsJlb0sE9jthkLv8=; b=pSSgTAeJ5InpQ/XfkSFx5X2KwGHD6ryfsPdyvkBUhQkY68Qg0J46GriQAMOmZ9jHRS uyJj6fDPmGed9cZIhcwD0Vc7RWU6YSsQCcNYNoPIFTalL5EHKA7K36nmRnQmDFmDBHSy VQkw5dGEItGBeCqYU7hGv3E1EpHIe1hNetOWYNHrjrTno41TG1wUpBHEUdNEMsgIdVU8 EWUd0NHtGA90N0hSf8nvuIgzgkzYKNXRtJTvtTj9GMRHkKtR0BGMn5sCikrwi1xY4MZf wkxeYZx+nRiT2cgzo2Wd7dn14XFKQCPGOoG95qZVZ8U7rFGuSgIZ95q8lHwASWiJ41D2 h0wg==
X-Gm-Message-State AMke39nsCzH8OO0+bhdJ3AWaeRXGcw+8oiWX/rF8puKOuKgzzEyDf+dOXSsGWagv7OFznQ==
X-Received by 10.28.173.74 with SMTP id w71mr18037843wme.14.1486579212934; Wed, 08 Feb 2017 10:40:12 -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 110
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 Wed, 8 Feb 2017 19:39:04 +0100
X-Original-Message-ID <1486579190-11717-3-git-send-email-mingo@kernel.org>
X-Original-References <1486579190-11717-1-git-send-email-mingo@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1576862

Show key headers only | View raw


We are going to split  <linux/sched/idle.h> out of <linux/sched.h>, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder <linux/sched/idle.h> file that just
maps to <linux/sched.h> to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/mwait.h   | 1 +
 arch/x86/kernel/process.c      | 1 +
 drivers/cpuidle/driver.c       | 1 +
 include/linux/sched/idle.h     | 6 ++++++
 include/linux/sched/topology.h | 2 ++
 kernel/sched/idle.c            | 1 +
 kernel/smp.c                   | 1 +
 7 files changed, 13 insertions(+)

diff --git a/arch/x86/include/asm/mwait.h b/arch/x86/include/asm/mwait.h
index f37f2d8a2989..bda3c27f0da0 100644
--- a/arch/x86/include/asm/mwait.h
+++ b/arch/x86/include/asm/mwait.h
@@ -2,6 +2,7 @@
 #define _ASM_X86_MWAIT_H
 
 #include <linux/sched.h>
+#include <linux/sched/idle.h>
 
 #include <asm/cpufeature.h>
 
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index b615a1113f58..e9176466c587 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -7,6 +7,7 @@
 #include <linux/prctl.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
+#include <linux/sched/idle.h>
 #include <linux/init.h>
 #include <linux/export.h>
 #include <linux/pm.h>
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index ab264d393233..e53fb861beb0 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -11,6 +11,7 @@
 #include <linux/mutex.h>
 #include <linux/module.h>
 #include <linux/sched.h>
+#include <linux/sched/idle.h>
 #include <linux/cpuidle.h>
 #include <linux/cpumask.h>
 #include <linux/tick.h>
diff --git a/include/linux/sched/idle.h b/include/linux/sched/idle.h
new file mode 100644
index 000000000000..a3cf79b86986
--- /dev/null
+++ b/include/linux/sched/idle.h
@@ -0,0 +1,6 @@
+#ifndef _LINUX_SCHED_IDLE_H
+#define _LINUX_SCHED_IDLE_H
+
+#include <linux/sched.h>
+
+#endif /* _LINUX_SCHED_IDLE_H */
diff --git a/include/linux/sched/topology.h b/include/linux/sched/topology.h
index 4f1159f76f92..184b56b8aa64 100644
--- a/include/linux/sched/topology.h
+++ b/include/linux/sched/topology.h
@@ -3,4 +3,6 @@
 
 #include <linux/sched.h>
 
+#include <linux/sched/idle.h>
+
 #endif /* _LINUX_SCHED_TOPOLOGY_H */
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 6a4bae0a649d..ac6d5176463d 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -2,6 +2,7 @@
  * Generic entry point for the idle threads
  */
 #include <linux/sched.h>
+#include <linux/sched/idle.h>
 #include <linux/cpu.h>
 #include <linux/cpuidle.h>
 #include <linux/cpuhotplug.h>
diff --git a/kernel/smp.c b/kernel/smp.c
index 77fcdb9f2775..a817769b53c0 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -17,6 +17,7 @@
 #include <linux/smp.h>
 #include <linux/cpu.h>
 #include <linux/sched.h>
+#include <linux/sched/idle.h>
 #include <linux/hypervisor.h>
 
 #include "smpboot.h"
-- 
2.7.4

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


Thread

[PATCH 02/48] sched/headers: Prepare for new header dependencies before moving code to <linux/sched/idle.h> Ingo Molnar <mingo@kernel.org> - 2017-02-08 20:00 +0100

csiph-web