treewide: add missing includes masked by cgroup -> bpf dependency
Subsystems (25)
Jakub Kicinski
maintainerPATCH v2 1/1 treewide: add missing includes masked by cgroup -> bpf dependency
cgroup.h (therefore swap.h, therefore half of the universe) includes bpf.h which in turn includes module.h and slab.h. Since we're about to get rid of that dependency we need to clean things up.
v2: drop the cpu.h include from cacheinfo.h, it's not necessary and it makes riscv sensitive to ordering of include files.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- block/fops.c | 1 + drivers/gpu/drm/drm_gem_shmem_helper.c | 1 + drivers/gpu/drm/i915/gt/intel_gtt.c | 1 + drivers/gpu/drm/i915/i915_request.c | 1 + drivers/gpu/drm/lima/lima_device.c | 1 + drivers/gpu/drm/msm/msm_gem_shrinker.c | 1 + drivers/gpu/drm/ttm/ttm_tt.c | 1 + drivers/net/ethernet/huawei/hinic/hinic_sriov.c | 1 + drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c | 2 ++ drivers/pci/controller/dwc/pci-exynos.c | 1 + drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 + drivers/usb/cdns3/host.c | 1 + include/linux/cacheinfo.h | 1 - include/linux/device/driver.h | 1 + include/linux/filter.h | 2 +- mm/damon/vaddr.c | 1 + mm/memory_hotplug.c | 1 + mm/swap_slots.c | 1 + 18 files changed, 18 insertions(+), 2 deletions(-)
block/fops.c +1 -0
@@ -15,6 +15,7 @@#include <linux/falloc.h> #include <linux/suspend.h> #include <linux/fs.h> +#include <linux/module.h> #include "blk.h" static inline struct inode *bdev_file_inode (struct file *file)
drivers/gpu/drm/drm_gem_shmem_helper.c +1 -0
@@ -9,6 +9,7 @@#include <linux/shmem_fs.h> #include <linux/slab.h> #include <linux/vmalloc.h> +#include <linux/module.h> #ifdef CONFIG_X86 #include <asm/set_memory.h>
drivers/gpu/drm/i915/gt/intel_gtt.c +1 -0
@@ -6,6 +6,7 @@#include <linux/slab.h> /* fault-inject.h is not standalone! */ #include <linux/fault-inject.h> +#include <linux/sched/mm.h> #include "gem/i915_gem_lmem.h" #include "i915_trace.h"
drivers/gpu/drm/i915/i915_request.c +1 -0
@@ -29,6 +29,7 @@#include <linux/sched.h> #include <linux/sched/clock.h> #include <linux/sched/signal.h> +#include <linux/sched/mm.h> #include "gem/i915_gem_context.h" #include "gt/intel_breadcrumbs.h"
drivers/gpu/drm/lima/lima_device.c +1 -0
@@ -4,6 +4,7 @@#include <linux/regulator/consumer.h> #include <linux/reset.h> #include <linux/clk.h> +#include <linux/slab.h> #include <linux/dma-mapping.h> #include <linux/platform_device.h>
drivers/gpu/drm/msm/msm_gem_shrinker.c +1 -0
@@ -5,6 +5,7 @@*/ #include <linux/vmalloc.h> +#include <linux/sched/mm.h> #include "msm_drv.h" #include "msm_gem.h"
drivers/gpu/drm/ttm/ttm_tt.c +1 -0
@@ -34,6 +34,7 @@#include <linux/sched.h> #include <linux/shmem_fs.h> #include <linux/file.h> +#include <linux/module.h> #include <drm/drm_cache.h> #include <drm/ttm/ttm_bo_driver.h>
drivers/net/ethernet/huawei/hinic/hinic_sriov.c +1 -0
@@ -8,6 +8,7 @@#include <linux/interrupt.h> #include <linux/etherdevice.h> #include <linux/netdevice.h> +#include <linux/module.h> #include "hinic_hw_dev.h" #include "hinic_dev.h"
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c +2 -0
@@ -5,6 +5,8 @@* */ +#include <linux/module.h> +#include "otx2_common.h" #include "otx2_ptp.h"
drivers/pci/controller/dwc/pci-exynos.c +1 -0
@@ -19,6 +19,7 @@#include <linux/platform_device.h> #include <linux/phy/phy.h> #include <linux/regulator/consumer.h> +#include <linux/module.h> #include "pcie-designware.h"
drivers/pci/controller/dwc/pcie-qcom-ep.c +1 -0
@@ -18,6 +18,7 @@#include <linux/pm_domain.h> #include <linux/regmap.h> #include <linux/reset.h> +#include <linux/module.h> #include "pcie-designware.h"
drivers/usb/cdns3/host.c +1 -0
@@ -10,6 +10,7 @@*/ #include <linux/platform_device.h> +#include <linux/slab.h> #include "core.h" #include "drd.h" #include "host-export.h"
include/linux/cacheinfo.h +0 -1
@@ -3,7 +3,6 @@#define _LINUX_CACHEINFO_H#include <linux/bitops.h> -#include <linux/cpu.h> #include <linux/cpumask.h> #include <linux/smp.h>
include/linux/device/driver.h +1 -0
@@ -18,6 +18,7 @@#include <linux/klist.h> #include <linux/pm.h> #include <linux/device/bus.h> +#include <linux/module.h> /** * enum probe_type - device driver probe type to try
include/linux/filter.h +1 -1
@@ -6,6 +6,7 @@#define __LINUX_FILTER_H__#include <linux/atomic.h> +#include <linux/bpf.h> #include <linux/refcount.h> #include <linux/compat.h> #include <linux/skbuff.h>
@@ -26,7 +27,6 @@#include <asm/byteorder.h> #include <uapi/linux/filter.h> -#include <uapi/linux/bpf.h> struct sk_buff ;struct sock ;
mm/damon/vaddr.c +1 -0
@@ -13,6 +13,7 @@#include <linux/mmu_notifier.h> #include <linux/page_idle.h> #include <linux/pagewalk.h> +#include <linux/sched/mm.h> #include "prmtv-common.h"
mm/memory_hotplug.c +1 -0
@@ -35,6 +35,7 @@#include <linux/memblock.h> #include <linux/compaction.h> #include <linux/rmap.h> +#include <linux/module.h> #include <asm/tlbflush.h>
mm/swap_slots.c +1 -0
@@ -30,6 +30,7 @@#include <linux/swap_slots.h> #include <linux/cpu.h> #include <linux/cpumask.h> +#include <linux/slab.h> #include <linux/vmalloc.h> #include <linux/mutex.h> #include <linux/mm.h>
Signature · 1 line
2.31.1
Thanks, always good to see someone else helping to unwind our include dependency mess..
Quoted 8 lines · Jakub Kicinski
cgroup.h(thereforeswap.h, therefore half of the universe) includesbpf.hwhich in turn includesmodule.handslab.h. Since we're about to get rid of that dependency we need to clean things up.v2: drop the
cpu.hinclude fromcacheinfo.h, it's not necessary and it makes riscv sensitive to ordering of include files.
Quoted 7 lines
Link https://lore.kernel.org/all/[email protected]/ # cacheinfo discussion open hereAcked-by Peter Chen <[email protected]>Acked-by SeongJae Park <[email protected]>Acked-by Jani Nikula <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>
Quoted 18 lines · Greg KH
Quoted 8 lines · Jakub Kicinski
cgroup.h(thereforeswap.h, therefore half of the universe) includesbpf.hwhich in turn includesmodule.handslab.h. Since we're about to get rid of that dependency we need to clean things up.v2: drop the
cpu.hinclude fromcacheinfo.h, it's not necessary and it makes riscv sensitive to ordering of include files.Quoted 7 lines
Link https://lore.kernel.org/all/[email protected]/ # cacheinfo discussion open hereAcked-by Peter Chen <[email protected]>Acked-by SeongJae Park <[email protected]>Acked-by Jani Nikula <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>
Quoted 1 line
I'm not sure how to test that it helps to reduce build deps, but it builds and passes tests, so applied to bpf tree. Jakub, you'll soon get it back via bpf tree PR :)
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for treewide: add missing includes masked by cgroup -> bpf dependency (rev2)
In reply to Jakub Kicinski== Series Details ==
== Series Details ==
Series: treewide: add missing includes masked by cgroup -> bpf dependency (rev2)
URL : https://patchwork.freedesktop.org/series/97159/
State : failure
== Summary ==
Applying: treewide: add missing includes masked by cgroup -> bpf dependency
error: sha1 information is lacking or useless (include/linux/filter.h).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0001 treewide: add missing includes masked by cgroup -> bpf dependency When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
This patch was applied to bpf/bpf.git (master) by Alexei Starovoitov <[email protected]>:
Hello:
This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov <[email protected]>:
Quoted 9 lines · On Thu, 2 Dec 2021 12:34:00 -0800 you wrote:
cgroup.h(thereforeswap.h, therefore half of the universe) includesbpf.hwhich in turn includesmodule.handslab.h. Since we're about to get rid of that dependency we need to clean things up.v2: drop the
cpu.hinclude fromcacheinfo.h, it's not necessary and it makes riscv sensitive to ordering of include files.[...]
Here is the summary with links:
- [bpf,v2] treewide: add missing includes masked by cgroup -> bpf dependency
https://git.kernel.org/bpf/bpf/c/8581fd402a0c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html