[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250411164229.23413-20-james.morse@arm.com>
Date: Fri, 11 Apr 2025 16:42:27 +0000
From: James Morse <james.morse@....com>
To: x86@...nel.org,
linux-kernel@...r.kernel.org
Cc: Reinette Chatre <reinette.chatre@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
H Peter Anvin <hpa@...or.com>,
Babu Moger <Babu.Moger@....com>,
James Morse <james.morse@....com>,
shameerali.kolothum.thodi@...wei.com,
D Scott Phillips OS <scott@...amperecomputing.com>,
carl@...amperecomputing.com,
lcherian@...vell.com,
bobo.shaobowang@...wei.com,
tan.shaopeng@...itsu.com,
baolin.wang@...ux.alibaba.com,
Jamie Iles <quic_jiles@...cinc.com>,
Xin Hao <xhao@...ux.alibaba.com>,
peternewman@...gle.com,
dfustini@...libre.com,
amitsinght@...vell.com,
David Hildenbrand <david@...hat.com>,
Rex Nie <rex.nie@...uarmicro.com>,
Dave Martin <dave.martin@....com>,
Koba Ko <kobak@...dia.com>,
Shanker Donthineni <sdonthineni@...dia.com>,
fenghuay@...dia.com
Subject: [PATCH v8 19/21] fs/resctrl: Remove unnecessary includes
When splitting and moving the resctrl code to live in fs/resctrl and
arch/x86, some code was duplicated. This was done to keep the parser
in the script that does the moving simple. This results in unnecessary
includes in the arch and filesystem code.
Remove them.
Signed-off-by: James Morse <james.morse@....com>
---
Changes since v7:
* Expanded the scope, removed many more includes.
---
arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ----
arch/x86/kernel/cpu/resctrl/internal.h | 5 -----
arch/x86/kernel/cpu/resctrl/monitor.c | 3 ---
arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 7 -------
fs/resctrl/internal.h | 2 --
fs/resctrl/monitor.c | 3 ---
fs/resctrl/pseudo_lock.c | 6 ------
fs/resctrl/rdtgroup.c | 2 --
8 files changed, 32 deletions(-)
diff --git a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
index 0164d769aeca..1189c0df4ad7 100644
--- a/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
+++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
@@ -16,10 +16,6 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/cpu.h>
-#include <linux/kernfs.h>
-#include <linux/seq_file.h>
-#include <linux/slab.h>
-#include <linux/tick.h>
#include "internal.h"
diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h
index 521db28efb3f..5e3c41b36437 100644
--- a/arch/x86/kernel/cpu/resctrl/internal.h
+++ b/arch/x86/kernel/cpu/resctrl/internal.h
@@ -3,11 +3,6 @@
#define _ASM_X86_RESCTRL_INTERNAL_H
#include <linux/resctrl.h>
-#include <linux/sched.h>
-#include <linux/kernfs.h>
-#include <linux/fs_context.h>
-#include <linux/jump_label.h>
-#include <linux/tick.h>
#define L3_QOS_CDP_ENABLE 0x01ULL
diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
index 800e52845b1d..182f0514cc88 100644
--- a/arch/x86/kernel/cpu/resctrl/monitor.c
+++ b/arch/x86/kernel/cpu/resctrl/monitor.c
@@ -18,10 +18,7 @@
#define pr_fmt(fmt) "resctrl: " fmt
#include <linux/cpu.h>
-#include <linux/module.h>
#include <linux/resctrl.h>
-#include <linux/sizes.h>
-#include <linux/slab.h>
#include <asm/cpu_device_id.h>
diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
index 99c34a0610a4..241d0d7e1cb5 100644
--- a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
+++ b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
@@ -12,17 +12,10 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/cacheflush.h>
-#include <linux/cacheinfo.h>
#include <linux/cpu.h>
-#include <linux/cpumask.h>
-#include <linux/debugfs.h>
-#include <linux/kthread.h>
-#include <linux/mman.h>
#include <linux/perf_event.h>
#include <linux/pm_qos.h>
#include <linux/resctrl.h>
-#include <linux/slab.h>
-#include <linux/uaccess.h>
#include <asm/cpu_device_id.h>
#include <asm/perf_event.h>
diff --git a/fs/resctrl/internal.h b/fs/resctrl/internal.h
index ee9b95122872..8a5c692142cd 100644
--- a/fs/resctrl/internal.h
+++ b/fs/resctrl/internal.h
@@ -3,10 +3,8 @@
#define _ASM_X86_RESCTRL_INTERNAL_H
#include <linux/resctrl.h>
-#include <linux/sched.h>
#include <linux/kernfs.h>
#include <linux/fs_context.h>
-#include <linux/jump_label.h>
#include <linux/tick.h>
#define CQM_LIMBOCHECK_INTERVAL 1000
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
index a76bfaa8d43e..bde2801289d3 100644
--- a/fs/resctrl/monitor.c
+++ b/fs/resctrl/monitor.c
@@ -18,13 +18,10 @@
#define pr_fmt(fmt) "resctrl: " fmt
#include <linux/cpu.h>
-#include <linux/module.h>
#include <linux/resctrl.h>
#include <linux/sizes.h>
#include <linux/slab.h>
-#include <asm/cpu_device_id.h>
-
#include "internal.h"
#define CREATE_TRACE_POINTS
diff --git a/fs/resctrl/pseudo_lock.c b/fs/resctrl/pseudo_lock.c
index 7305b232384e..ccc2f9213b4b 100644
--- a/fs/resctrl/pseudo_lock.c
+++ b/fs/resctrl/pseudo_lock.c
@@ -11,23 +11,17 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-#include <linux/cacheflush.h>
#include <linux/cacheinfo.h>
#include <linux/cpu.h>
#include <linux/cpumask.h>
#include <linux/debugfs.h>
#include <linux/kthread.h>
#include <linux/mman.h>
-#include <linux/perf_event.h>
#include <linux/pm_qos.h>
#include <linux/resctrl.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
-#include <asm/cpu_device_id.h>
-#include <asm/perf_event.h>
-
-#include "../../events/perf_event.h" /* For X86_CONFIG() */
#include "internal.h"
/*
diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
index 4b1c8881a4a8..9fa4c2024249 100644
--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -21,10 +21,8 @@
#include <linux/resctrl.h>
#include <linux/seq_buf.h>
#include <linux/seq_file.h>
-#include <linux/sched/signal.h>
#include <linux/sched/task.h>
#include <linux/slab.h>
-#include <linux/task_work.h>
#include <linux/user_namespace.h>
#include <uapi/linux/magic.h>
--
2.20.1
Powered by blists - more mailing lists