aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2011-08-18 15:01:29 -0400
committerRichard Weinberger <richard@nod.at>2011-11-02 09:14:44 -0400
commit078073a3d48ce7c140f1538d249da3ac545065a6 (patch)
tree064e0baa9b1a6d97d5dbbbfae388a297303fba65
parent4de1c5f65c7dd4965a2a58b93205b747d7826110 (diff)
um: -include user.h for USER_OBJ, trim includes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/um/drivers/chan_user.c2
-rw-r--r--arch/um/drivers/cow_sys.h1
-rw-r--r--arch/um/drivers/daemon_user.c1
-rw-r--r--arch/um/drivers/fd.c2
-rw-r--r--arch/um/drivers/harddog_user.c1
-rw-r--r--arch/um/drivers/mconsole_user.c2
-rw-r--r--arch/um/drivers/net_user.c2
-rw-r--r--arch/um/drivers/pcap_user.c2
-rw-r--r--arch/um/drivers/port_user.c2
-rw-r--r--arch/um/drivers/pty.c2
-rw-r--r--arch/um/drivers/slip_user.c2
-rw-r--r--arch/um/drivers/slirp_user.c2
-rw-r--r--arch/um/drivers/tty.c2
-rw-r--r--arch/um/drivers/ubd_user.c1
-rw-r--r--arch/um/drivers/umcast_user.c2
-rw-r--r--arch/um/drivers/vde_user.c2
-rw-r--r--arch/um/drivers/xterm.c2
-rw-r--r--arch/um/kernel/skas/clone.c1
-rw-r--r--arch/um/os-Linux/aio.c2
-rw-r--r--arch/um/os-Linux/drivers/ethertap_user.c2
-rw-r--r--arch/um/os-Linux/drivers/tuntap_user.c2
-rw-r--r--arch/um/os-Linux/elf_aux.c1
-rw-r--r--arch/um/os-Linux/file.c2
-rw-r--r--arch/um/os-Linux/helper.c2
-rw-r--r--arch/um/os-Linux/irq.c2
-rw-r--r--arch/um/os-Linux/main.c1
-rw-r--r--arch/um/os-Linux/mem.c2
-rw-r--r--arch/um/os-Linux/process.c2
-rw-r--r--arch/um/os-Linux/sigio.c2
-rw-r--r--arch/um/os-Linux/signal.c1
-rw-r--r--arch/um/os-Linux/skas/mem.c2
-rw-r--r--arch/um/os-Linux/skas/process.c2
-rw-r--r--arch/um/os-Linux/start_up.c1
-rw-r--r--arch/um/os-Linux/sys-i386/registers.c2
-rw-r--r--arch/um/os-Linux/sys-i386/task_size.c1
-rw-r--r--arch/um/os-Linux/sys-i386/tls.c1
-rw-r--r--arch/um/os-Linux/sys-x86_64/registers.c2
-rw-r--r--arch/um/os-Linux/time.c2
-rw-r--r--arch/um/os-Linux/tty.c2
-rw-r--r--arch/um/os-Linux/umid.c2
-rw-r--r--arch/um/os-Linux/util.c2
-rw-r--r--arch/um/scripts/Makefile.rules2
-rw-r--r--arch/um/sys-i386/Makefile2
-rw-r--r--arch/um/sys-i386/bugs.c2
-rw-r--r--arch/um/sys-i386/shared/sysdep/stub.h1
-rw-r--r--arch/um/sys-x86_64/Makefile2
-rw-r--r--arch/um/sys-x86_64/shared/sysdep/stub.h1
47 files changed, 3 insertions, 78 deletions
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index cfeb3f4a44af..7ed06a7399d5 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -11,10 +11,8 @@
11#include <termios.h> 11#include <termios.h>
12#include <sys/ioctl.h> 12#include <sys/ioctl.h>
13#include "chan_user.h" 13#include "chan_user.h"
14#include "kern_constants.h"
15#include "os.h" 14#include "os.h"
16#include "um_malloc.h" 15#include "um_malloc.h"
17#include "user.h"
18 16
19void generic_close(int fd, void *unused) 17void generic_close(int fd, void *unused)
20{ 18{
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h
index f5701fd2ef90..7f2ed0b8824a 100644
--- a/arch/um/drivers/cow_sys.h
+++ b/arch/um/drivers/cow_sys.h
@@ -3,7 +3,6 @@
3 3
4#include "kern_util.h" 4#include "kern_util.h"
5#include "os.h" 5#include "os.h"
6#include "user.h"
7#include "um_malloc.h" 6#include "um_malloc.h"
8 7
9static inline void *cow_malloc(int size) 8static inline void *cow_malloc(int size)
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index f8e85e0bdace..a4fd7bc14af7 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -17,7 +17,6 @@
17#include "net_user.h" 17#include "net_user.h"
18#include "os.h" 18#include "os.h"
19#include "um_malloc.h" 19#include "um_malloc.h"
20#include "user.h"
21 20
22enum request_type { REQ_NEW_CONTROL }; 21enum request_type { REQ_NEW_CONTROL };
23 22
diff --git a/arch/um/drivers/fd.c b/arch/um/drivers/fd.c
index f5a981a16240..5b81d2574415 100644
--- a/arch/um/drivers/fd.c
+++ b/arch/um/drivers/fd.c
@@ -9,10 +9,8 @@
9#include <errno.h> 9#include <errno.h>
10#include <termios.h> 10#include <termios.h>
11#include "chan_user.h" 11#include "chan_user.h"
12#include "kern_constants.h"
13#include "os.h" 12#include "os.h"
14#include "um_malloc.h" 13#include "um_malloc.h"
15#include "user.h"
16 14
17struct fd_chan { 15struct fd_chan {
18 int fd; 16 int fd;
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c
index 84dce3fc590c..0345d6206d40 100644
--- a/arch/um/drivers/harddog_user.c
+++ b/arch/um/drivers/harddog_user.c
@@ -7,7 +7,6 @@
7#include <unistd.h> 7#include <unistd.h>
8#include <errno.h> 8#include <errno.h>
9#include "os.h" 9#include "os.h"
10#include "user.h"
11 10
12struct dog_data { 11struct dog_data {
13 int stdin; 12 int stdin;
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c
index f8cf4c8bedef..99209826adb1 100644
--- a/arch/um/drivers/mconsole_user.c
+++ b/arch/um/drivers/mconsole_user.c
@@ -10,9 +10,7 @@
10#include <sys/socket.h> 10#include <sys/socket.h>
11#include <sys/uio.h> 11#include <sys/uio.h>
12#include <sys/un.h> 12#include <sys/un.h>
13#include "kern_constants.h"
14#include "mconsole.h" 13#include "mconsole.h"
15#include "user.h"
16 14
17static struct mconsole_command commands[] = { 15static struct mconsole_command commands[] = {
18 /* 16 /*
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
index 520118888f16..05090c37fa84 100644
--- a/arch/um/drivers/net_user.c
+++ b/arch/um/drivers/net_user.c
@@ -12,10 +12,8 @@
12#include <sys/socket.h> 12#include <sys/socket.h>
13#include <sys/wait.h> 13#include <sys/wait.h>
14#include "net_user.h" 14#include "net_user.h"
15#include "kern_constants.h"
16#include "os.h" 15#include "os.h"
17#include "um_malloc.h" 16#include "um_malloc.h"
18#include "user.h"
19 17
20int tap_open_common(void *dev, char *gate_addr) 18int tap_open_common(void *dev, char *gate_addr)
21{ 19{
diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c
index 5f903587d69e..702a75b190ee 100644
--- a/arch/um/drivers/pcap_user.c
+++ b/arch/um/drivers/pcap_user.c
@@ -9,9 +9,7 @@
9#include <asm/types.h> 9#include <asm/types.h>
10#include "net_user.h" 10#include "net_user.h"
11#include "pcap_user.h" 11#include "pcap_user.h"
12#include "kern_constants.h"
13#include "um_malloc.h" 12#include "um_malloc.h"
14#include "user.h"
15 13
16#define PCAP_FD(p) (*(int *)(p)) 14#define PCAP_FD(p) (*(int *)(p))
17 15
diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c
index b49bf56a56aa..7b010b76ddf0 100644
--- a/arch/um/drivers/port_user.c
+++ b/arch/um/drivers/port_user.c
@@ -10,11 +10,9 @@
10#include <unistd.h> 10#include <unistd.h>
11#include <netinet/in.h> 11#include <netinet/in.h>
12#include "chan_user.h" 12#include "chan_user.h"
13#include "kern_constants.h"
14#include "os.h" 13#include "os.h"
15#include "port.h" 14#include "port.h"
16#include "um_malloc.h" 15#include "um_malloc.h"
17#include "user.h"
18 16
19struct port_chan { 17struct port_chan {
20 int raw; 18 int raw;
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
index 1113911dcb2b..cff2b75d31fd 100644
--- a/arch/um/drivers/pty.c
+++ b/arch/um/drivers/pty.c
@@ -12,10 +12,8 @@
12#include <termios.h> 12#include <termios.h>
13#include <sys/stat.h> 13#include <sys/stat.h>
14#include "chan_user.h" 14#include "chan_user.h"
15#include "kern_constants.h"
16#include "os.h" 15#include "os.h"
17#include "um_malloc.h" 16#include "um_malloc.h"
18#include "user.h"
19 17
20struct pty_chan { 18struct pty_chan {
21 void (*announce)(char *dev_name, int dev); 19 void (*announce)(char *dev_name, int dev);
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index cbacfc4e63e6..932b4d69bec2 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -11,12 +11,10 @@
11#include <string.h> 11#include <string.h>
12#include <sys/termios.h> 12#include <sys/termios.h>
13#include <sys/wait.h> 13#include <sys/wait.h>
14#include "kern_constants.h"
15#include "net_user.h" 14#include "net_user.h"
16#include "os.h" 15#include "os.h"
17#include "slip.h" 16#include "slip.h"
18#include "um_malloc.h" 17#include "um_malloc.h"
19#include "user.h"
20 18
21static int slip_user_init(void *data, void *dev) 19static int slip_user_init(void *data, void *dev)
22{ 20{
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c
index a0ada8fec72a..db4adb639ff8 100644
--- a/arch/um/drivers/slirp_user.c
+++ b/arch/um/drivers/slirp_user.c
@@ -7,11 +7,9 @@
7#include <errno.h> 7#include <errno.h>
8#include <string.h> 8#include <string.h>
9#include <sys/wait.h> 9#include <sys/wait.h>
10#include "kern_constants.h"
11#include "net_user.h" 10#include "net_user.h"
12#include "os.h" 11#include "os.h"
13#include "slirp.h" 12#include "slirp.h"
14#include "user.h"
15 13
16static int slirp_user_init(void *data, void *dev) 14static int slirp_user_init(void *data, void *dev)
17{ 15{
diff --git a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c
index 495858a090e4..a97391f9ec54 100644
--- a/arch/um/drivers/tty.c
+++ b/arch/um/drivers/tty.c
@@ -7,10 +7,8 @@
7#include <fcntl.h> 7#include <fcntl.h>
8#include <termios.h> 8#include <termios.h>
9#include "chan_user.h" 9#include "chan_user.h"
10#include "kern_constants.h"
11#include "os.h" 10#include "os.h"
12#include "um_malloc.h" 11#include "um_malloc.h"
13#include "user.h"
14 12
15struct tty_chan { 13struct tty_chan {
16 char *dev; 14 char *dev;
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c
index b591bb9c41dd..007b94d97726 100644
--- a/arch/um/drivers/ubd_user.c
+++ b/arch/um/drivers/ubd_user.c
@@ -16,7 +16,6 @@
16#include <sys/mman.h> 16#include <sys/mman.h>
17#include <sys/param.h> 17#include <sys/param.h>
18#include "asm/types.h" 18#include "asm/types.h"
19#include "user.h"
20#include "ubd_user.h" 19#include "ubd_user.h"
21#include "os.h" 20#include "os.h"
22#include "cow.h" 21#include "cow.h"
diff --git a/arch/um/drivers/umcast_user.c b/arch/um/drivers/umcast_user.c
index 59c56fd6f52a..010fa2d849ec 100644
--- a/arch/um/drivers/umcast_user.c
+++ b/arch/um/drivers/umcast_user.c
@@ -15,11 +15,9 @@
15#include <unistd.h> 15#include <unistd.h>
16#include <errno.h> 16#include <errno.h>
17#include <netinet/in.h> 17#include <netinet/in.h>
18#include "kern_constants.h"
19#include "umcast.h" 18#include "umcast.h"
20#include "net_user.h" 19#include "net_user.h"
21#include "um_malloc.h" 20#include "um_malloc.h"
22#include "user.h"
23 21
24static struct sockaddr_in *new_addr(char *addr, unsigned short port) 22static struct sockaddr_in *new_addr(char *addr, unsigned short port)
25{ 23{
diff --git a/arch/um/drivers/vde_user.c b/arch/um/drivers/vde_user.c
index c5c43253e6ce..b8c286748d3d 100644
--- a/arch/um/drivers/vde_user.c
+++ b/arch/um/drivers/vde_user.c
@@ -6,10 +6,8 @@
6#include <stddef.h> 6#include <stddef.h>
7#include <errno.h> 7#include <errno.h>
8#include <libvdeplug.h> 8#include <libvdeplug.h>
9#include "kern_constants.h"
10#include "net_user.h" 9#include "net_user.h"
11#include "um_malloc.h" 10#include "um_malloc.h"
12#include "user.h"
13#include "vde.h" 11#include "vde.h"
14 12
15static int vde_user_init(void *data, void *dev) 13static int vde_user_init(void *data, void *dev)
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c
index 2e1de5728604..969110e56487 100644
--- a/arch/um/drivers/xterm.c
+++ b/arch/um/drivers/xterm.c
@@ -11,10 +11,8 @@
11#include <string.h> 11#include <string.h>
12#include <termios.h> 12#include <termios.h>
13#include "chan_user.h" 13#include "chan_user.h"
14#include "kern_constants.h"
15#include "os.h" 14#include "os.h"
16#include "um_malloc.h" 15#include "um_malloc.h"
17#include "user.h"
18#include "xterm.h" 16#include "xterm.h"
19 17
20struct xterm_chan { 18struct xterm_chan {
diff --git a/arch/um/kernel/skas/clone.c b/arch/um/kernel/skas/clone.c
index 2c8583c1a344..e1fd066a3525 100644
--- a/arch/um/kernel/skas/clone.c
+++ b/arch/um/kernel/skas/clone.c
@@ -8,7 +8,6 @@
8#include <asm/unistd.h> 8#include <asm/unistd.h>
9#include <sys/time.h> 9#include <sys/time.h>
10#include "as-layout.h" 10#include "as-layout.h"
11#include "kern_constants.h"
12#include "ptrace_user.h" 11#include "ptrace_user.h"
13#include "stub-data.h" 12#include "stub-data.h"
14#include "sysdep/stub.h" 13#include "sysdep/stub.h"
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index 57e3d46c989c..c5d039e1ff3b 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -11,10 +11,8 @@
11#include <asm/unistd.h> 11#include <asm/unistd.h>
12#include "aio.h" 12#include "aio.h"
13#include "init.h" 13#include "init.h"
14#include "kern_constants.h"
15#include "kern_util.h" 14#include "kern_util.h"
16#include "os.h" 15#include "os.h"
17#include "user.h"
18 16
19struct aio_thread_req { 17struct aio_thread_req {
20 enum aio_type type; 18 enum aio_type type;
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c
index cc72cb2c1af6..db3d6481375a 100644
--- a/arch/um/os-Linux/drivers/ethertap_user.c
+++ b/arch/um/os-Linux/drivers/ethertap_user.c
@@ -13,11 +13,9 @@
13#include <sys/socket.h> 13#include <sys/socket.h>
14#include <sys/wait.h> 14#include <sys/wait.h>
15#include "etap.h" 15#include "etap.h"
16#include "kern_constants.h"
17#include "os.h" 16#include "os.h"
18#include "net_user.h" 17#include "net_user.h"
19#include "um_malloc.h" 18#include "um_malloc.h"
20#include "user.h"
21 19
22#define MAX_PACKET ETH_MAX_PACKET 20#define MAX_PACKET ETH_MAX_PACKET
23 21
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c
index 2448be03fd7a..a2aacffdd907 100644
--- a/arch/um/os-Linux/drivers/tuntap_user.c
+++ b/arch/um/os-Linux/drivers/tuntap_user.c
@@ -13,11 +13,9 @@
13#include <sys/socket.h> 13#include <sys/socket.h>
14#include <sys/wait.h> 14#include <sys/wait.h>
15#include <sys/uio.h> 15#include <sys/uio.h>
16#include "kern_constants.h"
17#include "kern_util.h" 16#include "kern_util.h"
18#include "os.h" 17#include "os.h"
19#include "tuntap.h" 18#include "tuntap.h"
20#include "user.h"
21 19
22static int tuntap_user_init(void *data, void *dev) 20static int tuntap_user_init(void *data, void *dev)
23{ 21{
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
index 953323799381..d895271ad6f7 100644
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -12,7 +12,6 @@
12#include "init.h" 12#include "init.h"
13#include "elf_user.h" 13#include "elf_user.h"
14#include "mem_user.h" 14#include "mem_user.h"
15#include <kern_constants.h>
16 15
17typedef Elf32_auxv_t elf_auxv_t; 16typedef Elf32_auxv_t elf_auxv_t;
18 17
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index 140e587bc0ad..b049a63bb74b 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -13,9 +13,7 @@
13#include <sys/socket.h> 13#include <sys/socket.h>
14#include <sys/stat.h> 14#include <sys/stat.h>
15#include <sys/un.h> 15#include <sys/un.h>
16#include "kern_constants.h"
17#include "os.h" 16#include "os.h"
18#include "user.h"
19 17
20static void copy_stat(struct uml_stat *dst, const struct stat64 *src) 18static void copy_stat(struct uml_stat *dst, const struct stat64 *src)
21{ 19{
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index feff22d64672..cf26c4a9a43a 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -10,11 +10,9 @@
10#include <linux/limits.h> 10#include <linux/limits.h>
11#include <sys/socket.h> 11#include <sys/socket.h>
12#include <sys/wait.h> 12#include <sys/wait.h>
13#include "kern_constants.h"
14#include "kern_util.h" 13#include "kern_util.h"
15#include "os.h" 14#include "os.h"
16#include "um_malloc.h" 15#include "um_malloc.h"
17#include "user.h"
18 16
19struct helper_data { 17struct helper_data {
20 void (*pre_exec)(void*); 18 void (*pre_exec)(void*);
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c
index 0348b975e81c..59c592cca25d 100644
--- a/arch/um/os-Linux/irq.c
+++ b/arch/um/os-Linux/irq.c
@@ -9,11 +9,9 @@
9#include <signal.h> 9#include <signal.h>
10#include <string.h> 10#include <string.h>
11#include "irq_user.h" 11#include "irq_user.h"
12#include "kern_constants.h"
13#include "os.h" 12#include "os.h"
14#include "process.h" 13#include "process.h"
15#include "um_malloc.h" 14#include "um_malloc.h"
16#include "user.h"
17 15
18/* 16/*
19 * Locked by irq_lock in arch/um/kernel/irq.c. Changed by os_create_pollfd 17 * Locked by irq_lock in arch/um/kernel/irq.c. Changed by os_create_pollfd
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 8471b817d94f..7a86dd516eb1 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -12,7 +12,6 @@
12#include <sys/resource.h> 12#include <sys/resource.h>
13#include "as-layout.h" 13#include "as-layout.h"
14#include "init.h" 14#include "init.h"
15#include "kern_constants.h"
16#include "kern_util.h" 15#include "kern_util.h"
17#include "os.h" 16#include "os.h"
18#include "um_malloc.h" 17#include "um_malloc.h"
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c
index 62878cf1d33f..8e421e1d6d36 100644
--- a/arch/um/os-Linux/mem.c
+++ b/arch/um/os-Linux/mem.c
@@ -14,9 +14,7 @@
14#include <sys/mman.h> 14#include <sys/mman.h>
15#include <sys/param.h> 15#include <sys/param.h>
16#include "init.h" 16#include "init.h"
17#include "kern_constants.h"
18#include "os.h" 17#include "os.h"
19#include "user.h"
20 18
21/* Modified by which_tmpdir, which is called during early boot */ 19/* Modified by which_tmpdir, which is called during early boot */
22static char *default_tmpdir = "/tmp"; 20static char *default_tmpdir = "/tmp";
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
index 0c45dc8efb05..0ced30cd4ab8 100644
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -13,12 +13,10 @@
13#include <sys/wait.h> 13#include <sys/wait.h>
14#include <asm/unistd.h> 14#include <asm/unistd.h>
15#include "init.h" 15#include "init.h"
16#include "kern_constants.h"
17#include "longjmp.h" 16#include "longjmp.h"
18#include "os.h" 17#include "os.h"
19#include "process.h" 18#include "process.h"
20#include "skas_ptrace.h" 19#include "skas_ptrace.h"
21#include "user.h"
22 20
23#define ARBITRARY_ADDR -1 21#define ARBITRARY_ADDR -1
24#define FAILURE_PID -1 22#define FAILURE_PID -1
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index 63d299df152b..34bb59bfa00b 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -11,14 +11,12 @@
11#include <sched.h> 11#include <sched.h>
12#include <signal.h> 12#include <signal.h>
13#include <string.h> 13#include <string.h>
14#include "kern_constants.h"
15#include "kern_util.h" 14#include "kern_util.h"
16#include "init.h" 15#include "init.h"
17#include "os.h" 16#include "os.h"
18#include "process.h" 17#include "process.h"
19#include "sigio.h" 18#include "sigio.h"
20#include "um_malloc.h" 19#include "um_malloc.h"
21#include "user.h"
22 20
23/* 21/*
24 * Protected by sigio_lock(), also used by sigio_cleanup, which is an 22 * Protected by sigio_lock(), also used by sigio_cleanup, which is an
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index 6ae180703a63..4fc3cd19ec69 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -15,7 +15,6 @@
15#include "process.h" 15#include "process.h"
16#include "sysdep/barrier.h" 16#include "sysdep/barrier.h"
17#include "sysdep/sigcontext.h" 17#include "sysdep/sigcontext.h"
18#include "user.h"
19 18
20/* Copied from linux/compiler-gcc.h since we can't include it directly */ 19/* Copied from linux/compiler-gcc.h since we can't include it directly */
21#define barrier() __asm__ __volatile__("": : :"memory") 20#define barrier() __asm__ __volatile__("": : :"memory")
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c
index e771398be5f3..c0afff7af4bd 100644
--- a/arch/um/os-Linux/skas/mem.c
+++ b/arch/um/os-Linux/skas/mem.c
@@ -9,7 +9,6 @@
9#include <string.h> 9#include <string.h>
10#include <sys/mman.h> 10#include <sys/mman.h>
11#include "init.h" 11#include "init.h"
12#include "kern_constants.h"
13#include "as-layout.h" 12#include "as-layout.h"
14#include "mm_id.h" 13#include "mm_id.h"
15#include "os.h" 14#include "os.h"
@@ -17,7 +16,6 @@
17#include "ptrace_user.h" 16#include "ptrace_user.h"
18#include "registers.h" 17#include "registers.h"
19#include "skas.h" 18#include "skas.h"
20#include "user.h"
21#include "sysdep/ptrace.h" 19#include "sysdep/ptrace.h"
22#include "sysdep/stub.h" 20#include "sysdep/stub.h"
23 21
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index dee0e8cf8ad0..2a72bfcd7aba 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -14,7 +14,6 @@
14#include <asm/unistd.h> 14#include <asm/unistd.h>
15#include "as-layout.h" 15#include "as-layout.h"
16#include "chan_user.h" 16#include "chan_user.h"
17#include "kern_constants.h"
18#include "kern_util.h" 17#include "kern_util.h"
19#include "mem.h" 18#include "mem.h"
20#include "os.h" 19#include "os.h"
@@ -24,7 +23,6 @@
24#include "registers.h" 23#include "registers.h"
25#include "skas.h" 24#include "skas.h"
26#include "skas_ptrace.h" 25#include "skas_ptrace.h"
27#include "user.h"
28#include "sysdep/stub.h" 26#include "sysdep/stub.h"
29 27
30int is_skas_winch(int pid, int fd, void *data) 28int is_skas_winch(int pid, int fd, void *data)
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index 02ee9adff54a..b6986809b8e0 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -18,7 +18,6 @@
18#include <sys/wait.h> 18#include <sys/wait.h>
19#include <asm/unistd.h> 19#include <asm/unistd.h>
20#include "init.h" 20#include "init.h"
21#include "kern_constants.h"
22#include "os.h" 21#include "os.h"
23#include "mem_user.h" 22#include "mem_user.h"
24#include "ptrace_user.h" 23#include "ptrace_user.h"
diff --git a/arch/um/os-Linux/sys-i386/registers.c b/arch/um/os-Linux/sys-i386/registers.c
index 229f7a53d8da..913d811b38db 100644
--- a/arch/um/os-Linux/sys-i386/registers.c
+++ b/arch/um/os-Linux/sys-i386/registers.c
@@ -7,9 +7,7 @@
7#include <errno.h> 7#include <errno.h>
8#include <sys/ptrace.h> 8#include <sys/ptrace.h>
9#include <sys/user.h> 9#include <sys/user.h>
10#include "kern_constants.h"
11#include "longjmp.h" 10#include "longjmp.h"
12#include "user.h"
13#include "sysdep/ptrace_user.h" 11#include "sysdep/ptrace_user.h"
14 12
15int save_fp_registers(int pid, unsigned long *fp_regs) 13int save_fp_registers(int pid, unsigned long *fp_regs)
diff --git a/arch/um/os-Linux/sys-i386/task_size.c b/arch/um/os-Linux/sys-i386/task_size.c
index be04c1e183bf..4ce09b8e99c9 100644
--- a/arch/um/os-Linux/sys-i386/task_size.c
+++ b/arch/um/os-Linux/sys-i386/task_size.c
@@ -3,7 +3,6 @@
3#include <signal.h> 3#include <signal.h>
4#include <sys/mman.h> 4#include <sys/mman.h>
5#include "longjmp.h" 5#include "longjmp.h"
6#include "kern_constants.h"
7 6
8static jmp_buf buf; 7static jmp_buf buf;
9 8
diff --git a/arch/um/os-Linux/sys-i386/tls.c b/arch/um/os-Linux/sys-i386/tls.c
index 32ed41ec1a3d..281e83ecce3d 100644
--- a/arch/um/os-Linux/sys-i386/tls.c
+++ b/arch/um/os-Linux/sys-i386/tls.c
@@ -5,7 +5,6 @@
5#include <unistd.h> 5#include <unistd.h>
6 6
7#include "sysdep/tls.h" 7#include "sysdep/tls.h"
8#include "user.h"
9 8
10/* Checks whether host supports TLS, and sets *tls_min according to the value 9/* Checks whether host supports TLS, and sets *tls_min according to the value
11 * valid on the host. 10 * valid on the host.
diff --git a/arch/um/os-Linux/sys-x86_64/registers.c b/arch/um/os-Linux/sys-x86_64/registers.c
index 594d97ad02b3..0594d550c034 100644
--- a/arch/um/os-Linux/sys-x86_64/registers.c
+++ b/arch/um/os-Linux/sys-x86_64/registers.c
@@ -7,9 +7,7 @@
7#include <sys/ptrace.h> 7#include <sys/ptrace.h>
8#define __FRAME_OFFSETS 8#define __FRAME_OFFSETS
9#include <asm/ptrace.h> 9#include <asm/ptrace.h>
10#include "kern_constants.h"
11#include "longjmp.h" 10#include "longjmp.h"
12#include "user.h"
13 11
14int save_fp_registers(int pid, unsigned long *fp_regs) 12int save_fp_registers(int pid, unsigned long *fp_regs)
15{ 13{
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index 6e3359d6a839..995ca304f1c9 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
@@ -8,11 +8,9 @@
8#include <signal.h> 8#include <signal.h>
9#include <time.h> 9#include <time.h>
10#include <sys/time.h> 10#include <sys/time.h>
11#include "kern_constants.h"
12#include "kern_util.h" 11#include "kern_util.h"
13#include "os.h" 12#include "os.h"
14#include "process.h" 13#include "process.h"
15#include "user.h"
16 14
17int set_interval(void) 15int set_interval(void)
18{ 16{
diff --git a/arch/um/os-Linux/tty.c b/arch/um/os-Linux/tty.c
index b09ff66a77ee..dd12b99dcb59 100644
--- a/arch/um/os-Linux/tty.c
+++ b/arch/um/os-Linux/tty.c
@@ -7,10 +7,8 @@
7#include <unistd.h> 7#include <unistd.h>
8#include <errno.h> 8#include <errno.h>
9#include <fcntl.h> 9#include <fcntl.h>
10#include "kern_constants.h"
11#include "kern_util.h" 10#include "kern_util.h"
12#include "os.h" 11#include "os.h"
13#include "user.h"
14 12
15struct grantpt_info { 13struct grantpt_info {
16 int fd; 14 int fd;
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index a27defb81884..4832eb519f8d 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -13,9 +13,7 @@
13#include <unistd.h> 13#include <unistd.h>
14#include <sys/stat.h> 14#include <sys/stat.h>
15#include "init.h" 15#include "init.h"
16#include "kern_constants.h"
17#include "os.h" 16#include "os.h"
18#include "user.h"
19 17
20#define UML_DIR "~/.uml/" 18#define UML_DIR "~/.uml/"
21 19
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c
index 5803b1887672..9e3b43bb84c9 100644
--- a/arch/um/os-Linux/util.c
+++ b/arch/um/os-Linux/util.c
@@ -13,9 +13,7 @@
13#include <wait.h> 13#include <wait.h>
14#include <sys/mman.h> 14#include <sys/mman.h>
15#include <sys/utsname.h> 15#include <sys/utsname.h>
16#include "kern_constants.h"
17#include "os.h" 16#include "os.h"
18#include "user.h"
19 17
20void stack_protections(unsigned long address) 18void stack_protections(unsigned long address)
21{ 19{
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules
index 61107b68e05b..3a7efb017a73 100644
--- a/arch/um/scripts/Makefile.rules
+++ b/arch/um/scripts/Makefile.rules
@@ -8,7 +8,7 @@ USER_OBJS += $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS))
8USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) 8USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
9 9
10$(USER_OBJS:.o=.%): \ 10$(USER_OBJS:.o=.%): \
11 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(basetarget).o) 11 c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) -include user.h $(CFLAGS_$(basetarget).o)
12$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ 12$(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \
13 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF) 13 -Dunix -D__unix__ -D__$(SUBARCH)__ $(CF)
14 14
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
index e5e56d76dec3..231bb983a121 100644
--- a/arch/um/sys-i386/Makefile
+++ b/arch/um/sys-i386/Makefile
@@ -15,8 +15,8 @@ subarch-obj-$(CONFIG_MODULES) += kernel/module.o
15 15
16USER_OBJS := bugs.o ptrace_user.o fault.o 16USER_OBJS := bugs.o ptrace_user.o fault.o
17 17
18USER_OBJS += user-offsets.s
19extra-y += user-offsets.s 18extra-y += user-offsets.s
19$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS)
20 20
21UNPROFILE_OBJS := stub_segv.o 21UNPROFILE_OBJS := stub_segv.o
22CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) 22CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING)
diff --git a/arch/um/sys-i386/bugs.c b/arch/um/sys-i386/bugs.c
index 2c6d0d731c12..7058e1fa903b 100644
--- a/arch/um/sys-i386/bugs.c
+++ b/arch/um/sys-i386/bugs.c
@@ -4,11 +4,9 @@
4 */ 4 */
5 5
6#include <signal.h> 6#include <signal.h>
7#include "kern_constants.h"
8#include "kern_util.h" 7#include "kern_util.h"
9#include "longjmp.h" 8#include "longjmp.h"
10#include "task.h" 9#include "task.h"
11#include "user.h"
12#include "sysdep/ptrace.h" 10#include "sysdep/ptrace.h"
13 11
14/* Set during early boot */ 12/* Set during early boot */
diff --git a/arch/um/sys-i386/shared/sysdep/stub.h b/arch/um/sys-i386/shared/sysdep/stub.h
index 977dedd9221b..cca14d4ddf52 100644
--- a/arch/um/sys-i386/shared/sysdep/stub.h
+++ b/arch/um/sys-i386/shared/sysdep/stub.h
@@ -11,7 +11,6 @@
11#include <asm/unistd.h> 11#include <asm/unistd.h>
12#include "as-layout.h" 12#include "as-layout.h"
13#include "stub-data.h" 13#include "stub-data.h"
14#include "kern_constants.h"
15 14
16extern void stub_segv_handler(int sig); 15extern void stub_segv_handler(int sig);
17extern void stub_clone_handler(void); 16extern void stub_clone_handler(void);
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile
index bd4d1d3ba919..097184660e8a 100644
--- a/arch/um/sys-x86_64/Makefile
+++ b/arch/um/sys-x86_64/Makefile
@@ -18,8 +18,8 @@ ldt-y = ../sys-i386/ldt.o
18 18
19USER_OBJS := ptrace_user.o 19USER_OBJS := ptrace_user.o
20 20
21USER_OBJS += user-offsets.s
22extra-y += user-offsets.s 21extra-y += user-offsets.s
22$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS)
23 23
24UNPROFILE_OBJS := stub_segv.o 24UNPROFILE_OBJS := stub_segv.o
25CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING) 25CFLAGS_stub_segv.o := $(CFLAGS_NO_HARDENING)
diff --git a/arch/um/sys-x86_64/shared/sysdep/stub.h b/arch/um/sys-x86_64/shared/sysdep/stub.h
index 3432aa249970..922a5702c8d8 100644
--- a/arch/um/sys-x86_64/shared/sysdep/stub.h
+++ b/arch/um/sys-x86_64/shared/sysdep/stub.h
@@ -11,7 +11,6 @@
11#include <sysdep/ptrace_user.h> 11#include <sysdep/ptrace_user.h>
12#include "as-layout.h" 12#include "as-layout.h"
13#include "stub-data.h" 13#include "stub-data.h"
14#include "kern_constants.h"
15 14
16extern void stub_segv_handler(int sig); 15extern void stub_segv_handler(int sig);
17extern void stub_clone_handler(void); 16extern void stub_clone_handler(void);