git: 4f6b7aef517f - stable/13 - linux(4): Cleanup vm includes from linux_util.h

From: Dmitry Chagin <dchagin_at_FreeBSD.org>
Date: Wed, 01 Mar 2023 08:43:02 UTC
The branch stable/13 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=4f6b7aef517f38a6a580e3c9f6b1aaff90a741b0

commit 4f6b7aef517f38a6a580e3c9f6b1aaff90a741b0
Author:     Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2023-02-14 14:46:30 +0000
Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2023-03-01 08:41:49 +0000

    linux(4): Cleanup vm includes from linux_util.h
    
    Include vm headers directly where they needed. The linux_util.h included
    in a most source files of the Linuxulator, avoid collecting a rarely used
    includes here.
    
    MFC after:              2 weeks
    
    (cherry picked from commit 31e938c531dcbb708dbcd0e1d0a4ea80dcc82300)
---
 sys/amd64/linux/linux_machdep.c | 1 +
 sys/arm64/linux/linux_machdep.c | 2 ++
 sys/compat/linux/linux_misc.c   | 1 +
 sys/compat/linux/linux_util.h   | 2 --
 4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c
index 1c042424f3ea..ed905518fdf4 100644
--- a/sys/amd64/linux/linux_machdep.c
+++ b/sys/amd64/linux/linux_machdep.c
@@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$");
 
 #include <vm/pmap.h>
 #include <vm/vm.h>
+#include <vm/vm_param.h>
 #include <vm/vm_extern.h>
 #include <vm/vm_kern.h>
 #include <vm/vm_map.h>
diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c
index 0bfe51f7da1e..4b12476f7865 100644
--- a/sys/arm64/linux/linux_machdep.c
+++ b/sys/arm64/linux/linux_machdep.c
@@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$");
 #include <sys/reg.h>
 #include <sys/sdt.h>
 
+#include <vm/vm_param.h>
+
 #include <arm64/linux/linux.h>
 #include <arm64/linux/linux_proto.h>
 #include <compat/linux/linux_dtrace.h>
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index 0e429e0a29ca..5b9cb4cb7b49 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$");
 #include <vm/pmap.h>
 #include <vm/vm_kern.h>
 #include <vm/vm_map.h>
+#include <vm/vm_param.h>
 #include <vm/vm_extern.h>
 #include <vm/swap_pager.h>
 
diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h
index f8b4d0aaaa75..044116f76b57 100644
--- a/sys/compat/linux/linux_util.h
+++ b/sys/compat/linux/linux_util.h
@@ -36,8 +36,6 @@
 #ifndef	_LINUX_UTIL_H_
 #define	_LINUX_UTIL_H_
 
-#include <vm/vm.h>
-#include <vm/vm_param.h>
 #include <sys/sysent.h>
 #include <sys/uio.h>