aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 22:15:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 22:15:20 -0400
commitf59b51fe3d3092c08d7d554ecb40db24011b2ebc (patch)
treef19a5cb72adda3963f83609dbe2314620a4cf63e
parentaac2b1f5747ea34696d0da5bdc4d8247aa6437af (diff)
parent062d52672446014222942cae6934d97769b329f0 (diff)
Merge branch 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML changes from Richard Weinberger: "UML receives this time only cleanups. The most outstanding change is the 'include "foo.h"' do 'include <foo.h>' conversion done by Al Viro. It touches many files, that's why the diffstat is rather big." * 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: typo in UserModeLinux-HOWTO hppfs: fix the return value of get_inode() hostfs: drop vmtruncate um: get rid of pointless include "..." where include <...> will do um: move sysrq.h out of include/shared um/x86: merge 32 and 64 bit variants of ptrace.h um/x86: merge 32 and 64bit variants of checksum.h
-rw-r--r--Documentation/virtual/uml/UserModeLinux-HOWTO.txt2
-rw-r--r--arch/um/drivers/chan_kern.c4
-rw-r--r--arch/um/drivers/chan_user.c4
-rw-r--r--arch/um/drivers/chan_user.h2
-rw-r--r--arch/um/drivers/cow_sys.h6
-rw-r--r--arch/um/drivers/daemon.h2
-rw-r--r--arch/um/drivers/daemon_kern.c4
-rw-r--r--arch/um/drivers/daemon_user.c6
-rw-r--r--arch/um/drivers/fd.c4
-rw-r--r--arch/um/drivers/harddog_user.c2
-rw-r--r--arch/um/drivers/hostaudio_kern.c18
-rw-r--r--arch/um/drivers/line.c16
-rw-r--r--arch/um/drivers/line.h12
-rw-r--r--arch/um/drivers/mconsole.h2
-rw-r--r--arch/um/drivers/mconsole_kern.c10
-rw-r--r--arch/um/drivers/mconsole_kern.h2
-rw-r--r--arch/um/drivers/mmapper_kern.c2
-rw-r--r--arch/um/drivers/net_kern.c10
-rw-r--r--arch/um/drivers/net_user.c6
-rw-r--r--arch/um/drivers/null.c2
-rw-r--r--arch/um/drivers/pcap_kern.c4
-rw-r--r--arch/um/drivers/pcap_user.c4
-rw-r--r--arch/um/drivers/pcap_user.h2
-rw-r--r--arch/um/drivers/port_kern.c20
-rw-r--r--arch/um/drivers/port_user.c4
-rw-r--r--arch/um/drivers/pty.c4
-rw-r--r--arch/um/drivers/random.c4
-rw-r--r--arch/um/drivers/slip_common.c2
-rw-r--r--arch/um/drivers/slip_kern.c2
-rw-r--r--arch/um/drivers/slip_user.c6
-rw-r--r--arch/um/drivers/slirp_kern.c6
-rw-r--r--arch/um/drivers/slirp_user.c4
-rw-r--r--arch/um/drivers/ssl.c22
-rw-r--r--arch/um/drivers/stdio_console.c36
-rw-r--r--arch/um/drivers/tty.c4
-rw-r--r--arch/um/drivers/ubd_kern.c8
-rw-r--r--arch/um/drivers/ubd_user.c2
-rw-r--r--arch/um/drivers/umcast.h2
-rw-r--r--arch/um/drivers/umcast_kern.c4
-rw-r--r--arch/um/drivers/umcast_user.c4
-rw-r--r--arch/um/drivers/vde_kern.c6
-rw-r--r--arch/um/drivers/vde_user.c4
-rw-r--r--arch/um/drivers/xterm.c4
-rw-r--r--arch/um/drivers/xterm_kern.c4
-rw-r--r--arch/um/include/asm/dma.h2
-rw-r--r--arch/um/include/asm/mmu.h2
-rw-r--r--arch/um/include/asm/page.h2
-rw-r--r--arch/um/include/asm/pgtable.h4
-rw-r--r--arch/um/include/asm/processor-generic.h6
-rw-r--r--arch/um/include/asm/ptrace-generic.h2
-rw-r--r--arch/um/include/asm/smp.h6
-rw-r--r--arch/um/include/asm/sysrq.h (renamed from arch/um/include/shared/sysrq.h)0
-rw-r--r--arch/um/include/shared/arch.h2
-rw-r--r--arch/um/include/shared/as-layout.h2
-rw-r--r--arch/um/include/shared/irq_kern.h4
-rw-r--r--arch/um/include/shared/irq_user.h2
-rw-r--r--arch/um/include/shared/kern_util.h4
-rw-r--r--arch/um/include/shared/longjmp.h4
-rw-r--r--arch/um/include/shared/os.h6
-rw-r--r--arch/um/include/shared/registers.h4
-rw-r--r--arch/um/include/shared/skas/skas.h2
-rw-r--r--arch/um/include/shared/skas_ptrace.h2
-rw-r--r--arch/um/kernel/asm-offsets.c2
-rw-r--r--arch/um/kernel/config.c.in2
-rw-r--r--arch/um/kernel/dyn.lds.S2
-rw-r--r--arch/um/kernel/early_printk.c2
-rw-r--r--arch/um/kernel/exec.c8
-rw-r--r--arch/um/kernel/gmon_syms.c2
-rw-r--r--arch/um/kernel/gprof_syms.c2
-rw-r--r--arch/um/kernel/initrd.c12
-rw-r--r--arch/um/kernel/irq.c22
-rw-r--r--arch/um/kernel/ksyms.c2
-rw-r--r--arch/um/kernel/mem.c12
-rw-r--r--arch/um/kernel/process.c8
-rw-r--r--arch/um/kernel/reboot.c14
-rw-r--r--arch/um/kernel/sigio.c6
-rw-r--r--arch/um/kernel/signal.c4
-rw-r--r--arch/um/kernel/skas/clone.c8
-rw-r--r--arch/um/kernel/skas/mmu.c16
-rw-r--r--arch/um/kernel/skas/process.c12
-rw-r--r--arch/um/kernel/skas/syscall.c10
-rw-r--r--arch/um/kernel/skas/uaccess.c4
-rw-r--r--arch/um/kernel/smp.c30
-rw-r--r--arch/um/kernel/syscall.c20
-rw-r--r--arch/um/kernel/sysrq.c2
-rw-r--r--arch/um/kernel/time.c4
-rw-r--r--arch/um/kernel/tlb.c8
-rw-r--r--arch/um/kernel/trap.c10
-rw-r--r--arch/um/kernel/um_arch.c14
-rw-r--r--arch/um/kernel/umid.c6
-rw-r--r--arch/um/kernel/uml.lds.S2
-rw-r--r--arch/um/os-Linux/aio.c8
-rw-r--r--arch/um/os-Linux/drivers/etap.h2
-rw-r--r--arch/um/os-Linux/drivers/ethertap_kern.c2
-rw-r--r--arch/um/os-Linux/drivers/ethertap_user.c6
-rw-r--r--arch/um/os-Linux/drivers/tuntap.h2
-rw-r--r--arch/um/os-Linux/drivers/tuntap_kern.c2
-rw-r--r--arch/um/os-Linux/drivers/tuntap_user.c4
-rw-r--r--arch/um/os-Linux/elf_aux.c6
-rw-r--r--arch/um/os-Linux/execvp.c4
-rw-r--r--arch/um/os-Linux/file.c2
-rw-r--r--arch/um/os-Linux/helper.c6
-rw-r--r--arch/um/os-Linux/irq.c6
-rw-r--r--arch/um/os-Linux/main.c10
-rw-r--r--arch/um/os-Linux/mem.c4
-rw-r--r--arch/um/os-Linux/process.c8
-rw-r--r--arch/um/os-Linux/registers.c6
-rw-r--r--arch/um/os-Linux/sigio.c10
-rw-r--r--arch/um/os-Linux/signal.c8
-rw-r--r--arch/um/os-Linux/skas/mem.c20
-rw-r--r--arch/um/os-Linux/skas/process.c22
-rw-r--r--arch/um/os-Linux/start_up.c14
-rw-r--r--arch/um/os-Linux/time.c4
-rw-r--r--arch/um/os-Linux/tty.c4
-rw-r--r--arch/um/os-Linux/umid.c4
-rw-r--r--arch/um/os-Linux/user_syms.c4
-rw-r--r--arch/um/os-Linux/util.c2
-rw-r--r--arch/um/sys-ppc/miscthings.c6
-rw-r--r--arch/um/sys-ppc/ptrace.c2
-rw-r--r--arch/um/sys-ppc/ptrace_user.c2
-rw-r--r--arch/um/sys-ppc/shared/sysdep/ptrace.h2
-rw-r--r--arch/um/sys-ppc/sigcontext.c2
-rw-r--r--arch/um/sys-ppc/sysrq.c4
-rw-r--r--arch/x86/um/asm/checksum.h144
-rw-r--r--arch/x86/um/asm/checksum_32.h140
-rw-r--r--arch/x86/um/asm/checksum_64.h125
-rw-r--r--arch/x86/um/asm/elf.h2
-rw-r--r--arch/x86/um/asm/ptrace.h58
-rw-r--r--arch/x86/um/asm/ptrace_32.h28
-rw-r--r--arch/x86/um/asm/ptrace_64.h46
-rw-r--r--arch/x86/um/bugs_32.c6
-rw-r--r--arch/x86/um/bugs_64.c2
-rw-r--r--arch/x86/um/fault.c2
-rw-r--r--arch/x86/um/ldt.c10
-rw-r--r--arch/x86/um/mem_64.c6
-rw-r--r--arch/x86/um/os-Linux/registers.c4
-rw-r--r--arch/x86/um/os-Linux/task_size.c2
-rw-r--r--arch/x86/um/os-Linux/tls.c2
-rw-r--r--arch/x86/um/ptrace_32.c8
-rw-r--r--arch/x86/um/ptrace_user.c2
-rw-r--r--arch/x86/um/shared/sysdep/ptrace.h2
-rw-r--r--arch/x86/um/shared/sysdep/stub.h4
-rw-r--r--arch/x86/um/shared/sysdep/syscalls_32.h4
-rw-r--r--arch/x86/um/signal.c4
-rw-r--r--arch/x86/um/stub_32.S2
-rw-r--r--arch/x86/um/stub_64.S2
-rw-r--r--arch/x86/um/stub_segv.c6
-rw-r--r--arch/x86/um/sysrq_32.c12
-rw-r--r--arch/x86/um/sysrq_64.c2
-rw-r--r--arch/x86/um/tls_32.c12
-rw-r--r--arch/x86/um/tls_64.c2
-rw-r--r--fs/hostfs/hostfs.h2
-rw-r--r--fs/hostfs/hostfs_kern.c12
-rw-r--r--fs/hostfs/hostfs_user.c1
-rw-r--r--fs/hppfs/hppfs.c4
155 files changed, 641 insertions, 785 deletions
diff --git a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
index 77dfecf4e2d6..a5f8436753e7 100644
--- a/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
+++ b/Documentation/virtual/uml/UserModeLinux-HOWTO.txt
@@ -3591,7 +3591,7 @@
3591 3591
3592 3592
3593 Looking at the source shows that the fault happened during a call to 3593 Looking at the source shows that the fault happened during a call to
3594 copy_to_user to copy the data into the kernel: 3594 copy_from_user to copy the data into the kernel:
3595 3595
3596 3596
3597 107 count -= chars; 3597 107 count -= chars;
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 87eebfe03c61..c3bba73e4be6 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -7,8 +7,8 @@
7#include <linux/tty.h> 7#include <linux/tty.h>
8#include <linux/tty_flip.h> 8#include <linux/tty_flip.h>
9#include "chan.h" 9#include "chan.h"
10#include "os.h" 10#include <os.h>
11#include "irq_kern.h" 11#include <irq_kern.h>
12 12
13#ifdef CONFIG_NOCONFIG_CHAN 13#ifdef CONFIG_NOCONFIG_CHAN
14static void *not_configged_init(char *str, int device, 14static void *not_configged_init(char *str, int device,
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index f180813ce2c7..9be670ad23b5 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -11,8 +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 "os.h" 14#include <os.h>
15#include "um_malloc.h" 15#include <um_malloc.h>
16 16
17void generic_close(int fd, void *unused) 17void generic_close(int fd, void *unused)
18{ 18{
diff --git a/arch/um/drivers/chan_user.h b/arch/um/drivers/chan_user.h
index 6257b7a6e1af..dc693298eb8f 100644
--- a/arch/um/drivers/chan_user.h
+++ b/arch/um/drivers/chan_user.h
@@ -6,7 +6,7 @@
6#ifndef __CHAN_USER_H__ 6#ifndef __CHAN_USER_H__
7#define __CHAN_USER_H__ 7#define __CHAN_USER_H__
8 8
9#include "init.h" 9#include <init.h>
10 10
11struct chan_opts { 11struct chan_opts {
12 void (*const announce)(char *dev_name, int dev); 12 void (*const announce)(char *dev_name, int dev);
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h
index 7f2ed0b8824a..67cbee63e702 100644
--- a/arch/um/drivers/cow_sys.h
+++ b/arch/um/drivers/cow_sys.h
@@ -1,9 +1,9 @@
1#ifndef __COW_SYS_H__ 1#ifndef __COW_SYS_H__
2#define __COW_SYS_H__ 2#define __COW_SYS_H__
3 3
4#include "kern_util.h" 4#include <kern_util.h>
5#include "os.h" 5#include <os.h>
6#include "um_malloc.h" 6#include <um_malloc.h>
7 7
8static inline void *cow_malloc(int size) 8static inline void *cow_malloc(int size)
9{ 9{
diff --git a/arch/um/drivers/daemon.h b/arch/um/drivers/daemon.h
index 6e0e891f8a00..c2dd1951559f 100644
--- a/arch/um/drivers/daemon.h
+++ b/arch/um/drivers/daemon.h
@@ -6,7 +6,7 @@
6#ifndef __DAEMON_H__ 6#ifndef __DAEMON_H__
7#define __DAEMON_H__ 7#define __DAEMON_H__
8 8
9#include "net_user.h" 9#include <net_user.h>
10 10
11#define SWITCH_VERSION 3 11#define SWITCH_VERSION 3
12 12
diff --git a/arch/um/drivers/daemon_kern.c b/arch/um/drivers/daemon_kern.c
index b4a1522f2157..7568cc2f3cd6 100644
--- a/arch/um/drivers/daemon_kern.c
+++ b/arch/um/drivers/daemon_kern.c
@@ -6,9 +6,9 @@
6 * Licensed under the GPL. 6 * Licensed under the GPL.
7 */ 7 */
8 8
9#include "linux/init.h" 9#include <linux/init.h>
10#include <linux/netdevice.h> 10#include <linux/netdevice.h>
11#include "net_kern.h" 11#include <net_kern.h>
12#include "daemon.h" 12#include "daemon.h"
13 13
14struct daemon_init { 14struct daemon_init {
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index a4fd7bc14af7..8813c10d0177 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -14,9 +14,9 @@
14#include <sys/time.h> 14#include <sys/time.h>
15#include <sys/un.h> 15#include <sys/un.h>
16#include "daemon.h" 16#include "daemon.h"
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 20
21enum request_type { REQ_NEW_CONTROL }; 21enum request_type { REQ_NEW_CONTROL };
22 22
diff --git a/arch/um/drivers/fd.c b/arch/um/drivers/fd.c
index 5b81d2574415..a13a427b996b 100644
--- a/arch/um/drivers/fd.c
+++ b/arch/um/drivers/fd.c
@@ -9,8 +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 "os.h" 12#include <os.h>
13#include "um_malloc.h" 13#include <um_malloc.h>
14 14
15struct fd_chan { 15struct fd_chan {
16 int fd; 16 int fd;
diff --git a/arch/um/drivers/harddog_user.c b/arch/um/drivers/harddog_user.c
index 0345d6206d40..f99b32a4dbff 100644
--- a/arch/um/drivers/harddog_user.c
+++ b/arch/um/drivers/harddog_user.c
@@ -6,7 +6,7 @@
6#include <stdio.h> 6#include <stdio.h>
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 10
11struct dog_data { 11struct dog_data {
12 int stdin; 12 int stdin;
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c
index f9f6a4e20590..9b90fdc4b151 100644
--- a/arch/um/drivers/hostaudio_kern.c
+++ b/arch/um/drivers/hostaudio_kern.c
@@ -3,15 +3,15 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/fs.h" 6#include <linux/fs.h>
7#include "linux/module.h" 7#include <linux/module.h>
8#include "linux/slab.h" 8#include <linux/slab.h>
9#include "linux/sound.h" 9#include <linux/sound.h>
10#include "linux/soundcard.h" 10#include <linux/soundcard.h>
11#include "linux/mutex.h" 11#include <linux/mutex.h>
12#include "asm/uaccess.h" 12#include <asm/uaccess.h>
13#include "init.h" 13#include <init.h>
14#include "os.h" 14#include <os.h>
15 15
16struct hostaudio_state { 16struct hostaudio_state {
17 int fd; 17 int fd;
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 457475f98414..fd9a15b318af 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -3,15 +3,15 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/irqreturn.h" 6#include <linux/irqreturn.h>
7#include "linux/kd.h" 7#include <linux/kd.h>
8#include "linux/sched.h" 8#include <linux/sched.h>
9#include "linux/slab.h" 9#include <linux/slab.h>
10#include "chan.h" 10#include "chan.h"
11#include "irq_kern.h" 11#include <irq_kern.h>
12#include "irq_user.h" 12#include <irq_user.h>
13#include "kern_util.h" 13#include <kern_util.h>
14#include "os.h" 14#include <os.h>
15 15
16#define LINE_BUFSIZE 4096 16#define LINE_BUFSIZE 4096
17 17
diff --git a/arch/um/drivers/line.h b/arch/um/drivers/line.h
index bae95611e7ab..138a14526d9c 100644
--- a/arch/um/drivers/line.h
+++ b/arch/um/drivers/line.h
@@ -6,12 +6,12 @@
6#ifndef __LINE_H__ 6#ifndef __LINE_H__
7#define __LINE_H__ 7#define __LINE_H__
8 8
9#include "linux/list.h" 9#include <linux/list.h>
10#include "linux/workqueue.h" 10#include <linux/workqueue.h>
11#include "linux/tty.h" 11#include <linux/tty.h>
12#include "linux/interrupt.h" 12#include <linux/interrupt.h>
13#include "linux/spinlock.h" 13#include <linux/spinlock.h>
14#include "linux/mutex.h" 14#include <linux/mutex.h>
15#include "chan_user.h" 15#include "chan_user.h"
16#include "mconsole_kern.h" 16#include "mconsole_kern.h"
17 17
diff --git a/arch/um/drivers/mconsole.h b/arch/um/drivers/mconsole.h
index c139ae1d6826..8b22535c62ce 100644
--- a/arch/um/drivers/mconsole.h
+++ b/arch/um/drivers/mconsole.h
@@ -12,7 +12,7 @@
12#define u32 uint32_t 12#define u32 uint32_t
13#endif 13#endif
14 14
15#include "sysdep/ptrace.h" 15#include <sysdep/ptrace.h>
16 16
17#define MCONSOLE_MAGIC (0xcafebabe) 17#define MCONSOLE_MAGIC (0xcafebabe)
18#define MCONSOLE_MAX_DATA (512) 18#define MCONSOLE_MAX_DATA (512)
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 9efeb6da48bc..79ccfe6c7078 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -27,13 +27,13 @@
27#include <asm/uaccess.h> 27#include <asm/uaccess.h>
28#include <asm/switch_to.h> 28#include <asm/switch_to.h>
29 29
30#include "init.h" 30#include <init.h>
31#include "irq_kern.h" 31#include <irq_kern.h>
32#include "irq_user.h" 32#include <irq_user.h>
33#include "kern_util.h" 33#include <kern_util.h>
34#include "mconsole.h" 34#include "mconsole.h"
35#include "mconsole_kern.h" 35#include "mconsole_kern.h"
36#include "os.h" 36#include <os.h>
37 37
38static int do_unlink_socket(struct notifier_block *notifier, 38static int do_unlink_socket(struct notifier_block *notifier,
39 unsigned long what, void *data) 39 unsigned long what, void *data)
diff --git a/arch/um/drivers/mconsole_kern.h b/arch/um/drivers/mconsole_kern.h
index d2fe07e78958..7a0c6a1ad1d4 100644
--- a/arch/um/drivers/mconsole_kern.h
+++ b/arch/um/drivers/mconsole_kern.h
@@ -6,7 +6,7 @@
6#ifndef __MCONSOLE_KERN_H__ 6#ifndef __MCONSOLE_KERN_H__
7#define __MCONSOLE_KERN_H__ 7#define __MCONSOLE_KERN_H__
8 8
9#include "linux/list.h" 9#include <linux/list.h>
10#include "mconsole.h" 10#include "mconsole.h"
11 11
12struct mconsole_entry { 12struct mconsole_entry {
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c
index c0ef803c7c70..62145c276167 100644
--- a/arch/um/drivers/mmapper_kern.c
+++ b/arch/um/drivers/mmapper_kern.c
@@ -18,7 +18,7 @@
18#include <linux/mm.h> 18#include <linux/mm.h>
19 19
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include "mem_user.h" 21#include <mem_user.h>
22 22
23/* These are set in mmapper_init, which is called at boot time */ 23/* These are set in mmapper_init, which is called at boot time */
24static unsigned long mmapper_size; 24static unsigned long mmapper_size;
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 458d324f062d..b1314ebf1f72 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -18,12 +18,12 @@
18#include <linux/skbuff.h> 18#include <linux/skbuff.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include "init.h" 21#include <init.h>
22#include "irq_kern.h" 22#include <irq_kern.h>
23#include "irq_user.h" 23#include <irq_user.h>
24#include "mconsole_kern.h" 24#include "mconsole_kern.h"
25#include "net_kern.h" 25#include <net_kern.h>
26#include "net_user.h" 26#include <net_user.h>
27 27
28#define DRIVER_NAME "uml-netdev" 28#define DRIVER_NAME "uml-netdev"
29 29
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c
index 05090c37fa84..cd14157b556d 100644
--- a/arch/um/drivers/net_user.c
+++ b/arch/um/drivers/net_user.c
@@ -11,9 +11,9 @@
11#include <string.h> 11#include <string.h>
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 "os.h" 15#include <os.h>
16#include "um_malloc.h" 16#include <um_malloc.h>
17 17
18int tap_open_common(void *dev, char *gate_addr) 18int tap_open_common(void *dev, char *gate_addr)
19{ 19{
diff --git a/arch/um/drivers/null.c b/arch/um/drivers/null.c
index 2b45a1446c86..10495747ce8e 100644
--- a/arch/um/drivers/null.c
+++ b/arch/um/drivers/null.c
@@ -7,7 +7,7 @@
7#include <errno.h> 7#include <errno.h>
8#include <fcntl.h> 8#include <fcntl.h>
9#include "chan_user.h" 9#include "chan_user.h"
10#include "os.h" 10#include <os.h>
11 11
12/* This address is used only as a unique identifier */ 12/* This address is used only as a unique identifier */
13static int null_chan; 13static int null_chan;
diff --git a/arch/um/drivers/pcap_kern.c b/arch/um/drivers/pcap_kern.c
index 2860525f8ff6..be0fb57bd1d7 100644
--- a/arch/um/drivers/pcap_kern.c
+++ b/arch/um/drivers/pcap_kern.c
@@ -3,9 +3,9 @@
3 * Licensed under the GPL. 3 * Licensed under the GPL.
4 */ 4 */
5 5
6#include "linux/init.h" 6#include <linux/init.h>
7#include <linux/netdevice.h> 7#include <linux/netdevice.h>
8#include "net_kern.h" 8#include <net_kern.h>
9#include "pcap_user.h" 9#include "pcap_user.h"
10 10
11struct pcap_init { 11struct pcap_init {
diff --git a/arch/um/drivers/pcap_user.c b/arch/um/drivers/pcap_user.c
index 702a75b190ee..c07b9c752c86 100644
--- a/arch/um/drivers/pcap_user.c
+++ b/arch/um/drivers/pcap_user.c
@@ -7,9 +7,9 @@
7#include <pcap.h> 7#include <pcap.h>
8#include <string.h> 8#include <string.h>
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 "um_malloc.h" 12#include <um_malloc.h>
13 13
14#define PCAP_FD(p) (*(int *)(p)) 14#define PCAP_FD(p) (*(int *)(p))
15 15
diff --git a/arch/um/drivers/pcap_user.h b/arch/um/drivers/pcap_user.h
index d8ba6153f912..1ca7c764cc63 100644
--- a/arch/um/drivers/pcap_user.h
+++ b/arch/um/drivers/pcap_user.h
@@ -3,7 +3,7 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "net_user.h" 6#include <net_user.h>
7 7
8struct pcap_data { 8struct pcap_data {
9 char *host_if; 9 char *host_if;
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c
index 1d83d50236e1..40ca5cc275e9 100644
--- a/arch/um/drivers/port_kern.c
+++ b/arch/um/drivers/port_kern.c
@@ -3,16 +3,16 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/completion.h" 6#include <linux/completion.h>
7#include "linux/interrupt.h" 7#include <linux/interrupt.h>
8#include "linux/list.h" 8#include <linux/list.h>
9#include "linux/mutex.h" 9#include <linux/mutex.h>
10#include "linux/slab.h" 10#include <linux/slab.h>
11#include "linux/workqueue.h" 11#include <linux/workqueue.h>
12#include "asm/atomic.h" 12#include <asm/atomic.h>
13#include "init.h" 13#include <init.h>
14#include "irq_kern.h" 14#include <irq_kern.h>
15#include "os.h" 15#include <os.h>
16#include "port.h" 16#include "port.h"
17 17
18struct port_list { 18struct port_list {
diff --git a/arch/um/drivers/port_user.c b/arch/um/drivers/port_user.c
index 7b010b76ddf0..9a8e1b64c22e 100644
--- a/arch/um/drivers/port_user.c
+++ b/arch/um/drivers/port_user.c
@@ -10,9 +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 "os.h" 13#include <os.h>
14#include "port.h" 14#include "port.h"
15#include "um_malloc.h" 15#include <um_malloc.h>
16 16
17struct port_chan { 17struct port_chan {
18 int raw; 18 int raw;
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
index cff2b75d31fd..f1fcc2cedb5e 100644
--- a/arch/um/drivers/pty.c
+++ b/arch/um/drivers/pty.c
@@ -12,8 +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 "os.h" 15#include <os.h>
16#include "um_malloc.h" 16#include <um_malloc.h>
17 17
18struct pty_chan { 18struct pty_chan {
19 void (*announce)(char *dev_name, int dev); 19 void (*announce)(char *dev_name, int dev);
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c
index e32c6aa6396f..9e3a72205827 100644
--- a/arch/um/drivers/random.c
+++ b/arch/um/drivers/random.c
@@ -13,8 +13,8 @@
13#include <linux/miscdevice.h> 13#include <linux/miscdevice.h>
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <asm/uaccess.h> 15#include <asm/uaccess.h>
16#include "irq_kern.h" 16#include <irq_kern.h>
17#include "os.h" 17#include <os.h>
18 18
19/* 19/*
20 * core module and version information 20 * core module and version information
diff --git a/arch/um/drivers/slip_common.c b/arch/um/drivers/slip_common.c
index e89cfc68fc3e..f597fa7c91d3 100644
--- a/arch/um/drivers/slip_common.c
+++ b/arch/um/drivers/slip_common.c
@@ -1,6 +1,6 @@
1#include <string.h> 1#include <string.h>
2#include "slip_common.h" 2#include "slip_common.h"
3#include "net_user.h" 3#include <net_user.h>
4 4
5int slip_proto_read(int fd, void *buf, int len, struct slip_proto *slip) 5int slip_proto_read(int fd, void *buf, int len, struct slip_proto *slip)
6{ 6{
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c
index dd2aadc14af0..ed5249fc0574 100644
--- a/arch/um/drivers/slip_kern.c
+++ b/arch/um/drivers/slip_kern.c
@@ -6,7 +6,7 @@
6#include <linux/if_arp.h> 6#include <linux/if_arp.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/netdevice.h> 8#include <linux/netdevice.h>
9#include "net_kern.h" 9#include <net_kern.h>
10#include "slip.h" 10#include "slip.h"
11 11
12struct slip_init { 12struct slip_init {
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index 932b4d69bec2..55c290d925f3 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -11,10 +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 "net_user.h" 14#include <net_user.h>
15#include "os.h" 15#include <os.h>
16#include "slip.h" 16#include "slip.h"
17#include "um_malloc.h" 17#include <um_malloc.h>
18 18
19static int slip_user_init(void *data, void *dev) 19static int slip_user_init(void *data, void *dev)
20{ 20{
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c
index e376284f0fb7..4ef11ca7cacf 100644
--- a/arch/um/drivers/slirp_kern.c
+++ b/arch/um/drivers/slirp_kern.c
@@ -4,11 +4,11 @@
4 */ 4 */
5 5
6#include <linux/if_arp.h> 6#include <linux/if_arp.h>
7#include "linux/init.h" 7#include <linux/init.h>
8#include <linux/netdevice.h> 8#include <linux/netdevice.h>
9#include <linux/string.h> 9#include <linux/string.h>
10#include "net_kern.h" 10#include <net_kern.h>
11#include "net_user.h" 11#include <net_user.h>
12#include "slirp.h" 12#include "slirp.h"
13 13
14struct slirp_init { 14struct slirp_init {
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c
index db4adb639ff8..c999d187abb9 100644
--- a/arch/um/drivers/slirp_user.c
+++ b/arch/um/drivers/slirp_user.c
@@ -7,8 +7,8 @@
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 "net_user.h" 10#include <net_user.h>
11#include "os.h" 11#include <os.h>
12#include "slirp.h" 12#include "slirp.h"
13 13
14static int slirp_user_init(void *data, void *dev) 14static int slirp_user_init(void *data, void *dev)
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index 7e86f0070123..16fdd0a0f9d6 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -3,19 +3,19 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/fs.h" 6#include <linux/fs.h>
7#include "linux/tty.h" 7#include <linux/tty.h>
8#include "linux/tty_driver.h" 8#include <linux/tty_driver.h>
9#include "linux/major.h" 9#include <linux/major.h>
10#include "linux/mm.h" 10#include <linux/mm.h>
11#include "linux/init.h" 11#include <linux/init.h>
12#include "linux/console.h" 12#include <linux/console.h>
13#include "asm/termbits.h" 13#include <asm/termbits.h>
14#include "asm/irq.h" 14#include <asm/irq.h>
15#include "ssl.h" 15#include "ssl.h"
16#include "chan.h" 16#include "chan.h"
17#include "init.h" 17#include <init.h>
18#include "irq_user.h" 18#include <irq_user.h>
19#include "mconsole_kern.h" 19#include "mconsole_kern.h"
20 20
21static const int ssl_version = 1; 21static const int ssl_version = 1;
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 929b99a261f3..827777af3f6d 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -3,27 +3,27 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/posix_types.h" 6#include <linux/posix_types.h>
7#include "linux/tty.h" 7#include <linux/tty.h>
8#include "linux/tty_flip.h" 8#include <linux/tty_flip.h>
9#include "linux/types.h" 9#include <linux/types.h>
10#include "linux/major.h" 10#include <linux/major.h>
11#include "linux/kdev_t.h" 11#include <linux/kdev_t.h>
12#include "linux/console.h" 12#include <linux/console.h>
13#include "linux/string.h" 13#include <linux/string.h>
14#include "linux/sched.h" 14#include <linux/sched.h>
15#include "linux/list.h" 15#include <linux/list.h>
16#include "linux/init.h" 16#include <linux/init.h>
17#include "linux/interrupt.h" 17#include <linux/interrupt.h>
18#include "linux/slab.h" 18#include <linux/slab.h>
19#include "linux/hardirq.h" 19#include <linux/hardirq.h>
20#include "asm/current.h" 20#include <asm/current.h>
21#include "asm/irq.h" 21#include <asm/irq.h>
22#include "stdio_console.h" 22#include "stdio_console.h"
23#include "chan.h" 23#include "chan.h"
24#include "irq_user.h" 24#include <irq_user.h>
25#include "mconsole_kern.h" 25#include "mconsole_kern.h"
26#include "init.h" 26#include <init.h>
27 27
28#define MAX_TTYS (16) 28#define MAX_TTYS (16)
29 29
diff --git a/arch/um/drivers/tty.c b/arch/um/drivers/tty.c
index a97391f9ec54..eaa201bca5ed 100644
--- a/arch/um/drivers/tty.c
+++ b/arch/um/drivers/tty.c
@@ -7,8 +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 "os.h" 10#include <os.h>
11#include "um_malloc.h" 11#include <um_malloc.h>
12 12
13struct tty_chan { 13struct tty_chan {
14 char *dev; 14 char *dev;
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 0643e5bc9f41..41bf72073ccc 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -33,12 +33,12 @@
33#include <linux/platform_device.h> 33#include <linux/platform_device.h>
34#include <linux/scatterlist.h> 34#include <linux/scatterlist.h>
35#include <asm/tlbflush.h> 35#include <asm/tlbflush.h>
36#include "kern_util.h" 36#include <kern_util.h>
37#include "mconsole_kern.h" 37#include "mconsole_kern.h"
38#include "init.h" 38#include <init.h>
39#include "irq_kern.h" 39#include <irq_kern.h>
40#include "ubd.h" 40#include "ubd.h"
41#include "os.h" 41#include <os.h>
42#include "cow.h" 42#include "cow.h"
43 43
44enum ubd_req { UBD_READ, UBD_WRITE }; 44enum ubd_req { UBD_READ, UBD_WRITE };
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c
index ffe02c431dea..a703e45d8aac 100644
--- a/arch/um/drivers/ubd_user.c
+++ b/arch/um/drivers/ubd_user.c
@@ -19,7 +19,7 @@
19#include <byteswap.h> 19#include <byteswap.h>
20 20
21#include "ubd.h" 21#include "ubd.h"
22#include "os.h" 22#include <os.h>
23 23
24void ignore_sigwinch_sig(void) 24void ignore_sigwinch_sig(void)
25{ 25{
diff --git a/arch/um/drivers/umcast.h b/arch/um/drivers/umcast.h
index 6f8c0fe890fb..c190c6440911 100644
--- a/arch/um/drivers/umcast.h
+++ b/arch/um/drivers/umcast.h
@@ -6,7 +6,7 @@
6#ifndef __DRIVERS_UMCAST_H 6#ifndef __DRIVERS_UMCAST_H
7#define __DRIVERS_UMCAST_H 7#define __DRIVERS_UMCAST_H
8 8
9#include "net_user.h" 9#include <net_user.h>
10 10
11struct umcast_data { 11struct umcast_data {
12 char *addr; 12 char *addr;
diff --git a/arch/um/drivers/umcast_kern.c b/arch/um/drivers/umcast_kern.c
index 42dab11d2ecf..f5ba6e377913 100644
--- a/arch/um/drivers/umcast_kern.c
+++ b/arch/um/drivers/umcast_kern.c
@@ -11,10 +11,10 @@
11 * Licensed under the GPL. 11 * Licensed under the GPL.
12 */ 12 */
13 13
14#include "linux/init.h" 14#include <linux/init.h>
15#include <linux/netdevice.h> 15#include <linux/netdevice.h>
16#include "umcast.h" 16#include "umcast.h"
17#include "net_kern.h" 17#include <net_kern.h>
18 18
19struct umcast_init { 19struct umcast_init {
20 char *addr; 20 char *addr;
diff --git a/arch/um/drivers/umcast_user.c b/arch/um/drivers/umcast_user.c
index 010fa2d849ec..6074184bb51b 100644
--- a/arch/um/drivers/umcast_user.c
+++ b/arch/um/drivers/umcast_user.c
@@ -16,8 +16,8 @@
16#include <errno.h> 16#include <errno.h>
17#include <netinet/in.h> 17#include <netinet/in.h>
18#include "umcast.h" 18#include "umcast.h"
19#include "net_user.h" 19#include <net_user.h>
20#include "um_malloc.h" 20#include <um_malloc.h>
21 21
22static struct sockaddr_in *new_addr(char *addr, unsigned short port) 22static struct sockaddr_in *new_addr(char *addr, unsigned short port)
23{ 23{
diff --git a/arch/um/drivers/vde_kern.c b/arch/um/drivers/vde_kern.c
index 1b852bffdebc..6a365fadc7c4 100644
--- a/arch/um/drivers/vde_kern.c
+++ b/arch/um/drivers/vde_kern.c
@@ -7,10 +7,10 @@
7 * 7 *
8 */ 8 */
9 9
10#include "linux/init.h" 10#include <linux/init.h>
11#include <linux/netdevice.h> 11#include <linux/netdevice.h>
12#include "net_kern.h" 12#include <net_kern.h>
13#include "net_user.h" 13#include <net_user.h>
14#include "vde.h" 14#include "vde.h"
15 15
16static void vde_init(struct net_device *dev, void *data) 16static void vde_init(struct net_device *dev, void *data)
diff --git a/arch/um/drivers/vde_user.c b/arch/um/drivers/vde_user.c
index b8c286748d3d..64cb630d1157 100644
--- a/arch/um/drivers/vde_user.c
+++ b/arch/um/drivers/vde_user.c
@@ -6,8 +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 "net_user.h" 9#include <net_user.h>
10#include "um_malloc.h" 10#include <um_malloc.h>
11#include "vde.h" 11#include "vde.h"
12 12
13static 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 969110e56487..20e30be44795 100644
--- a/arch/um/drivers/xterm.c
+++ b/arch/um/drivers/xterm.c
@@ -11,8 +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 "os.h" 14#include <os.h>
15#include "um_malloc.h" 15#include <um_malloc.h>
16#include "xterm.h" 16#include "xterm.h"
17 17
18struct xterm_chan { 18struct xterm_chan {
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c
index e3031e69445d..e8f9957bfbf6 100644
--- a/arch/um/drivers/xterm_kern.c
+++ b/arch/um/drivers/xterm_kern.c
@@ -7,8 +7,8 @@
7#include <linux/completion.h> 7#include <linux/completion.h>
8#include <linux/irqreturn.h> 8#include <linux/irqreturn.h>
9#include <asm/irq.h> 9#include <asm/irq.h>
10#include "irq_kern.h" 10#include <irq_kern.h>
11#include "os.h" 11#include <os.h>
12 12
13struct xterm_wait { 13struct xterm_wait {
14 struct completion ready; 14 struct completion ready;
diff --git a/arch/um/include/asm/dma.h b/arch/um/include/asm/dma.h
index 9f6139a8a525..f88c5860520b 100644
--- a/arch/um/include/asm/dma.h
+++ b/arch/um/include/asm/dma.h
@@ -1,7 +1,7 @@
1#ifndef __UM_DMA_H 1#ifndef __UM_DMA_H
2#define __UM_DMA_H 2#define __UM_DMA_H
3 3
4#include "asm/io.h" 4#include <asm/io.h>
5 5
6extern unsigned long uml_physmem; 6extern unsigned long uml_physmem;
7 7
diff --git a/arch/um/include/asm/mmu.h b/arch/um/include/asm/mmu.h
index 53e8b498ebba..da705448590f 100644
--- a/arch/um/include/asm/mmu.h
+++ b/arch/um/include/asm/mmu.h
@@ -6,7 +6,7 @@
6#ifndef __ARCH_UM_MMU_H 6#ifndef __ARCH_UM_MMU_H
7#define __ARCH_UM_MMU_H 7#define __ARCH_UM_MMU_H
8 8
9#include "mm_id.h" 9#include <mm_id.h>
10#include <asm/mm_context.h> 10#include <asm/mm_context.h>
11 11
12typedef struct mm_context { 12typedef struct mm_context {
diff --git a/arch/um/include/asm/page.h b/arch/um/include/asm/page.h
index 7cfc3cedce84..5ff53d9185f7 100644
--- a/arch/um/include/asm/page.h
+++ b/arch/um/include/asm/page.h
@@ -99,7 +99,7 @@ extern unsigned long uml_physmem;
99 99
100#define __va_space (8*1024*1024) 100#define __va_space (8*1024*1024)
101 101
102#include "mem.h" 102#include <mem.h>
103 103
104/* Cast to unsigned long before casting to void * to avoid a warning from 104/* Cast to unsigned long before casting to void * to avoid a warning from
105 * mmap_kmem about cutting a long long down to a void *. Not sure that 105 * mmap_kmem about cutting a long long down to a void *. Not sure that
diff --git a/arch/um/include/asm/pgtable.h b/arch/um/include/asm/pgtable.h
index 5888f1b83477..ae02909a1875 100644
--- a/arch/um/include/asm/pgtable.h
+++ b/arch/um/include/asm/pgtable.h
@@ -23,9 +23,9 @@
23 pte_present gives true */ 23 pte_present gives true */
24 24
25#ifdef CONFIG_3_LEVEL_PGTABLES 25#ifdef CONFIG_3_LEVEL_PGTABLES
26#include "asm/pgtable-3level.h" 26#include <asm/pgtable-3level.h>
27#else 27#else
28#include "asm/pgtable-2level.h" 28#include <asm/pgtable-2level.h>
29#endif 29#endif
30 30
31extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 31extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h
index 33a6a2423bd2..24e97be814bc 100644
--- a/arch/um/include/asm/processor-generic.h
+++ b/arch/um/include/asm/processor-generic.h
@@ -10,9 +10,9 @@ struct pt_regs;
10 10
11struct task_struct; 11struct task_struct;
12 12
13#include "asm/ptrace.h" 13#include <asm/ptrace.h>
14#include "registers.h" 14#include <registers.h>
15#include "sysdep/archsetjmp.h" 15#include <sysdep/archsetjmp.h>
16 16
17#include <linux/prefetch.h> 17#include <linux/prefetch.h>
18 18
diff --git a/arch/um/include/asm/ptrace-generic.h b/arch/um/include/asm/ptrace-generic.h
index 442f1d025dc2..cb9b3c47ca8e 100644
--- a/arch/um/include/asm/ptrace-generic.h
+++ b/arch/um/include/asm/ptrace-generic.h
@@ -9,7 +9,7 @@
9#ifndef __ASSEMBLY__ 9#ifndef __ASSEMBLY__
10 10
11#include <asm/ptrace-abi.h> 11#include <asm/ptrace-abi.h>
12#include "sysdep/ptrace.h" 12#include <sysdep/ptrace.h>
13 13
14struct pt_regs { 14struct pt_regs {
15 struct uml_pt_regs regs; 15 struct uml_pt_regs regs;
diff --git a/arch/um/include/asm/smp.h b/arch/um/include/asm/smp.h
index 4a4b09d4f366..e4507938d8cf 100644
--- a/arch/um/include/asm/smp.h
+++ b/arch/um/include/asm/smp.h
@@ -3,9 +3,9 @@
3 3
4#ifdef CONFIG_SMP 4#ifdef CONFIG_SMP
5 5
6#include "linux/bitops.h" 6#include <linux/bitops.h>
7#include "asm/current.h" 7#include <asm/current.h>
8#include "linux/cpumask.h" 8#include <linux/cpumask.h>
9 9
10#define raw_smp_processor_id() (current_thread->cpu) 10#define raw_smp_processor_id() (current_thread->cpu)
11 11
diff --git a/arch/um/include/shared/sysrq.h b/arch/um/include/asm/sysrq.h
index c8d332b56b98..c8d332b56b98 100644
--- a/arch/um/include/shared/sysrq.h
+++ b/arch/um/include/asm/sysrq.h
diff --git a/arch/um/include/shared/arch.h b/arch/um/include/shared/arch.h
index 2de92a08a76b..4f46abda060d 100644
--- a/arch/um/include/shared/arch.h
+++ b/arch/um/include/shared/arch.h
@@ -6,7 +6,7 @@
6#ifndef __ARCH_H__ 6#ifndef __ARCH_H__
7#define __ARCH_H__ 7#define __ARCH_H__
8 8
9#include "sysdep/ptrace.h" 9#include <sysdep/ptrace.h>
10 10
11extern void arch_check_bugs(void); 11extern void arch_check_bugs(void);
12extern int arch_fixup(unsigned long address, struct uml_pt_regs *regs); 12extern int arch_fixup(unsigned long address, struct uml_pt_regs *regs);
diff --git a/arch/um/include/shared/as-layout.h b/arch/um/include/shared/as-layout.h
index 86daa5461815..694c792bab4e 100644
--- a/arch/um/include/shared/as-layout.h
+++ b/arch/um/include/shared/as-layout.h
@@ -35,7 +35,7 @@
35 35
36#ifndef __ASSEMBLY__ 36#ifndef __ASSEMBLY__
37 37
38#include "sysdep/ptrace.h" 38#include <sysdep/ptrace.h>
39 39
40struct cpu_task { 40struct cpu_task {
41 int pid; 41 int pid;
diff --git a/arch/um/include/shared/irq_kern.h b/arch/um/include/shared/irq_kern.h
index 7a5bfa6291b8..e05bd667de15 100644
--- a/arch/um/include/shared/irq_kern.h
+++ b/arch/um/include/shared/irq_kern.h
@@ -6,8 +6,8 @@
6#ifndef __IRQ_KERN_H__ 6#ifndef __IRQ_KERN_H__
7#define __IRQ_KERN_H__ 7#define __IRQ_KERN_H__
8 8
9#include "linux/interrupt.h" 9#include <linux/interrupt.h>
10#include "asm/ptrace.h" 10#include <asm/ptrace.h>
11 11
12extern int um_request_irq(unsigned int irq, int fd, int type, 12extern int um_request_irq(unsigned int irq, int fd, int type,
13 irq_handler_t handler, 13 irq_handler_t handler,
diff --git a/arch/um/include/shared/irq_user.h b/arch/um/include/shared/irq_user.h
index 2b6d703925b5..df5633053957 100644
--- a/arch/um/include/shared/irq_user.h
+++ b/arch/um/include/shared/irq_user.h
@@ -6,7 +6,7 @@
6#ifndef __IRQ_USER_H__ 6#ifndef __IRQ_USER_H__
7#define __IRQ_USER_H__ 7#define __IRQ_USER_H__
8 8
9#include "sysdep/ptrace.h" 9#include <sysdep/ptrace.h>
10 10
11struct irq_fd { 11struct irq_fd {
12 struct irq_fd *next; 12 struct irq_fd *next;
diff --git a/arch/um/include/shared/kern_util.h b/arch/um/include/shared/kern_util.h
index af6b6dc868ba..83a91f976330 100644
--- a/arch/um/include/shared/kern_util.h
+++ b/arch/um/include/shared/kern_util.h
@@ -6,8 +6,8 @@
6#ifndef __KERN_UTIL_H__ 6#ifndef __KERN_UTIL_H__
7#define __KERN_UTIL_H__ 7#define __KERN_UTIL_H__
8 8
9#include "sysdep/ptrace.h" 9#include <sysdep/ptrace.h>
10#include "sysdep/faultinfo.h" 10#include <sysdep/faultinfo.h>
11 11
12struct siginfo; 12struct siginfo;
13 13
diff --git a/arch/um/include/shared/longjmp.h b/arch/um/include/shared/longjmp.h
index e860bc5848e0..9bdddf4c405b 100644
--- a/arch/um/include/shared/longjmp.h
+++ b/arch/um/include/shared/longjmp.h
@@ -1,8 +1,8 @@
1#ifndef __UML_LONGJMP_H 1#ifndef __UML_LONGJMP_H
2#define __UML_LONGJMP_H 2#define __UML_LONGJMP_H
3 3
4#include "sysdep/archsetjmp.h" 4#include <sysdep/archsetjmp.h>
5#include "os.h" 5#include <os.h>
6 6
7extern int setjmp(jmp_buf); 7extern int setjmp(jmp_buf);
8extern void longjmp(jmp_buf, int); 8extern void longjmp(jmp_buf, int);
diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h
index 89b686c1a3ea..44883049c11d 100644
--- a/arch/um/include/shared/os.h
+++ b/arch/um/include/shared/os.h
@@ -7,9 +7,9 @@
7#define __OS_H__ 7#define __OS_H__
8 8
9#include <stdarg.h> 9#include <stdarg.h>
10#include "irq_user.h" 10#include <irq_user.h>
11#include "longjmp.h" 11#include <longjmp.h>
12#include "mm_id.h" 12#include <mm_id.h>
13 13
14#define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) 14#define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR))
15 15
diff --git a/arch/um/include/shared/registers.h b/arch/um/include/shared/registers.h
index f1e0aa56c52a..f5b76355ad71 100644
--- a/arch/um/include/shared/registers.h
+++ b/arch/um/include/shared/registers.h
@@ -6,8 +6,8 @@
6#ifndef __REGISTERS_H 6#ifndef __REGISTERS_H
7#define __REGISTERS_H 7#define __REGISTERS_H
8 8
9#include "sysdep/ptrace.h" 9#include <sysdep/ptrace.h>
10#include "sysdep/archsetjmp.h" 10#include <sysdep/archsetjmp.h>
11 11
12extern int save_fp_registers(int pid, unsigned long *fp_regs); 12extern int save_fp_registers(int pid, unsigned long *fp_regs);
13extern int restore_fp_registers(int pid, unsigned long *fp_regs); 13extern int restore_fp_registers(int pid, unsigned long *fp_regs);
diff --git a/arch/um/include/shared/skas/skas.h b/arch/um/include/shared/skas/skas.h
index 64d2c7443306..c45df961c874 100644
--- a/arch/um/include/shared/skas/skas.h
+++ b/arch/um/include/shared/skas/skas.h
@@ -6,7 +6,7 @@
6#ifndef __SKAS_H 6#ifndef __SKAS_H
7#define __SKAS_H 7#define __SKAS_H
8 8
9#include "sysdep/ptrace.h" 9#include <sysdep/ptrace.h>
10 10
11extern int userspace_pid[]; 11extern int userspace_pid[];
12extern int proc_mm, ptrace_faultinfo, ptrace_ldt; 12extern int proc_mm, ptrace_faultinfo, ptrace_ldt;
diff --git a/arch/um/include/shared/skas_ptrace.h b/arch/um/include/shared/skas_ptrace.h
index 3d31bbacd016..630a9c92b93c 100644
--- a/arch/um/include/shared/skas_ptrace.h
+++ b/arch/um/include/shared/skas_ptrace.h
@@ -9,6 +9,6 @@
9#define PTRACE_FAULTINFO 52 9#define PTRACE_FAULTINFO 52
10#define PTRACE_SWITCH_MM 55 10#define PTRACE_SWITCH_MM 55
11 11
12#include "sysdep/skas_ptrace.h" 12#include <sysdep/skas_ptrace.h>
13 13
14#endif 14#endif
diff --git a/arch/um/kernel/asm-offsets.c b/arch/um/kernel/asm-offsets.c
index 91ea538e1612..1fb12235ab9c 100644
--- a/arch/um/kernel/asm-offsets.c
+++ b/arch/um/kernel/asm-offsets.c
@@ -1 +1 @@
#include "sysdep/kernel-offsets.h" #include <sysdep/kernel-offsets.h>
diff --git a/arch/um/kernel/config.c.in b/arch/um/kernel/config.c.in
index b7a43feafde7..972bf1659564 100644
--- a/arch/um/kernel/config.c.in
+++ b/arch/um/kernel/config.c.in
@@ -5,7 +5,7 @@
5 5
6#include <stdio.h> 6#include <stdio.h>
7#include <stdlib.h> 7#include <stdlib.h>
8#include "init.h" 8#include <init.h>
9 9
10static __initdata const char *config[] = { 10static __initdata const char *config[] = {
11"CONFIG" 11"CONFIG"
diff --git a/arch/um/kernel/dyn.lds.S b/arch/um/kernel/dyn.lds.S
index a3cab6d3ae02..fb8fd6fb6563 100644
--- a/arch/um/kernel/dyn.lds.S
+++ b/arch/um/kernel/dyn.lds.S
@@ -89,7 +89,7 @@ SECTIONS
89 89
90 .kstrtab : { *(.kstrtab) } 90 .kstrtab : { *(.kstrtab) }
91 91
92 #include "asm/common.lds.S" 92 #include <asm/common.lds.S>
93 93
94 init.data : { INIT_DATA } 94 init.data : { INIT_DATA }
95 95
diff --git a/arch/um/kernel/early_printk.c b/arch/um/kernel/early_printk.c
index ec649bf72f68..49480f092456 100644
--- a/arch/um/kernel/early_printk.c
+++ b/arch/um/kernel/early_printk.c
@@ -9,7 +9,7 @@
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/console.h> 10#include <linux/console.h>
11#include <linux/init.h> 11#include <linux/init.h>
12#include "os.h" 12#include <os.h>
13 13
14static void early_console_write(struct console *con, const char *s, unsigned int n) 14static void early_console_write(struct console *con, const char *s, unsigned int n)
15{ 15{
diff --git a/arch/um/kernel/exec.c b/arch/um/kernel/exec.c
index 8c82786da823..de66c421ae9d 100644
--- a/arch/um/kernel/exec.c
+++ b/arch/um/kernel/exec.c
@@ -12,10 +12,10 @@
12#include <asm/current.h> 12#include <asm/current.h>
13#include <asm/processor.h> 13#include <asm/processor.h>
14#include <asm/uaccess.h> 14#include <asm/uaccess.h>
15#include "as-layout.h" 15#include <as-layout.h>
16#include "mem_user.h" 16#include <mem_user.h>
17#include "skas.h" 17#include <skas.h>
18#include "os.h" 18#include <os.h>
19#include "internal.h" 19#include "internal.h"
20 20
21void flush_thread(void) 21void flush_thread(void)
diff --git a/arch/um/kernel/gmon_syms.c b/arch/um/kernel/gmon_syms.c
index e9bcf247bcee..1bf61266da8e 100644
--- a/arch/um/kernel/gmon_syms.c
+++ b/arch/um/kernel/gmon_syms.c
@@ -3,7 +3,7 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/module.h" 6#include <linux/module.h>
7 7
8extern void __bb_init_func(void *) __attribute__((weak)); 8extern void __bb_init_func(void *) __attribute__((weak));
9EXPORT_SYMBOL(__bb_init_func); 9EXPORT_SYMBOL(__bb_init_func);
diff --git a/arch/um/kernel/gprof_syms.c b/arch/um/kernel/gprof_syms.c
index e2f043d0de6c..74ddb44288a3 100644
--- a/arch/um/kernel/gprof_syms.c
+++ b/arch/um/kernel/gprof_syms.c
@@ -3,7 +3,7 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/module.h" 6#include <linux/module.h>
7 7
8extern void mcount(void); 8extern void mcount(void);
9EXPORT_SYMBOL(mcount); 9EXPORT_SYMBOL(mcount);
diff --git a/arch/um/kernel/initrd.c b/arch/um/kernel/initrd.c
index 10cc18f729fd..55cead809b18 100644
--- a/arch/um/kernel/initrd.c
+++ b/arch/um/kernel/initrd.c
@@ -3,12 +3,12 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/init.h" 6#include <linux/init.h>
7#include "linux/bootmem.h" 7#include <linux/bootmem.h>
8#include "linux/initrd.h" 8#include <linux/initrd.h>
9#include "asm/types.h" 9#include <asm/types.h>
10#include "init.h" 10#include <init.h>
11#include "os.h" 11#include <os.h>
12 12
13/* Changed by uml_initrd_setup, which is a setup */ 13/* Changed by uml_initrd_setup, which is a setup */
14static char *initrd __initdata = NULL; 14static char *initrd __initdata = NULL;
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 9883026f0730..36e12f0cefd5 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -5,17 +5,17 @@
5 * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar 5 * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
6 */ 6 */
7 7
8#include "linux/cpumask.h" 8#include <linux/cpumask.h>
9#include "linux/hardirq.h" 9#include <linux/hardirq.h>
10#include "linux/interrupt.h" 10#include <linux/interrupt.h>
11#include "linux/kernel_stat.h" 11#include <linux/kernel_stat.h>
12#include "linux/module.h" 12#include <linux/module.h>
13#include "linux/sched.h" 13#include <linux/sched.h>
14#include "linux/seq_file.h" 14#include <linux/seq_file.h>
15#include "linux/slab.h" 15#include <linux/slab.h>
16#include "as-layout.h" 16#include <as-layout.h>
17#include "kern_util.h" 17#include <kern_util.h>
18#include "os.h" 18#include <os.h>
19 19
20/* 20/*
21 * This list is accessed under irq_lock, except in sigio_handler, 21 * This list is accessed under irq_lock, except in sigio_handler,
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c
index e17bea0b22e1..543c04756939 100644
--- a/arch/um/kernel/ksyms.c
+++ b/arch/um/kernel/ksyms.c
@@ -4,7 +4,7 @@
4 */ 4 */
5 5
6#include <linux/module.h> 6#include <linux/module.h>
7#include "os.h" 7#include <os.h>
8 8
9EXPORT_SYMBOL(set_signals); 9EXPORT_SYMBOL(set_signals);
10EXPORT_SYMBOL(get_signals); 10EXPORT_SYMBOL(get_signals);
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index ebb86b218445..5abcbfbe7e25 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -12,12 +12,12 @@
12#include <linux/slab.h> 12#include <linux/slab.h>
13#include <asm/fixmap.h> 13#include <asm/fixmap.h>
14#include <asm/page.h> 14#include <asm/page.h>
15#include "as-layout.h" 15#include <as-layout.h>
16#include "init.h" 16#include <init.h>
17#include "kern.h" 17#include <kern.h>
18#include "kern_util.h" 18#include <kern_util.h>
19#include "mem_user.h" 19#include <mem_user.h>
20#include "os.h" 20#include <os.h>
21 21
22/* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */ 22/* allocated in paging_init, zeroed in mem_init, and unchanged thereafter */
23unsigned long *empty_zero_page = NULL; 23unsigned long *empty_zero_page = NULL;
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
index c5f5afa50745..41f53240e794 100644
--- a/arch/um/kernel/process.c
+++ b/arch/um/kernel/process.c
@@ -23,10 +23,10 @@
23#include <asm/pgtable.h> 23#include <asm/pgtable.h>
24#include <asm/mmu_context.h> 24#include <asm/mmu_context.h>
25#include <asm/uaccess.h> 25#include <asm/uaccess.h>
26#include "as-layout.h" 26#include <as-layout.h>
27#include "kern_util.h" 27#include <kern_util.h>
28#include "os.h" 28#include <os.h>
29#include "skas.h" 29#include <skas.h>
30 30
31/* 31/*
32 * This is a per-cpu array. A processor only modifies its entry and it only 32 * This is a per-cpu array. A processor only modifies its entry and it only
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c
index 3d15243ce692..ced8903921ae 100644
--- a/arch/um/kernel/reboot.c
+++ b/arch/um/kernel/reboot.c
@@ -3,13 +3,13 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/sched.h" 6#include <linux/sched.h>
7#include "linux/spinlock.h" 7#include <linux/spinlock.h>
8#include "linux/slab.h" 8#include <linux/slab.h>
9#include "linux/oom.h" 9#include <linux/oom.h>
10#include "kern_util.h" 10#include <kern_util.h>
11#include "os.h" 11#include <os.h>
12#include "skas.h" 12#include <skas.h>
13 13
14void (*pm_power_off)(void); 14void (*pm_power_off)(void);
15 15
diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio.c
index c88211139a51..b5e0cbb34382 100644
--- a/arch/um/kernel/sigio.c
+++ b/arch/um/kernel/sigio.c
@@ -4,9 +4,9 @@
4 */ 4 */
5 5
6#include <linux/interrupt.h> 6#include <linux/interrupt.h>
7#include "irq_kern.h" 7#include <irq_kern.h>
8#include "os.h" 8#include <os.h>
9#include "sigio.h" 9#include <sigio.h>
10 10
11/* Protected by sigio_lock() called from write_sigio_workaround */ 11/* Protected by sigio_lock() called from write_sigio_workaround */
12static int sigio_irq_fd = -1; 12static int sigio_irq_fd = -1;
diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
index cc9c2350e417..db18eb6124e1 100644
--- a/arch/um/kernel/signal.c
+++ b/arch/um/kernel/signal.c
@@ -9,8 +9,8 @@
9#include <asm/siginfo.h> 9#include <asm/siginfo.h>
10#include <asm/signal.h> 10#include <asm/signal.h>
11#include <asm/unistd.h> 11#include <asm/unistd.h>
12#include "frame_kern.h" 12#include <frame_kern.h>
13#include "kern_util.h" 13#include <kern_util.h>
14 14
15EXPORT_SYMBOL(block_signals); 15EXPORT_SYMBOL(block_signals);
16EXPORT_SYMBOL(unblock_signals); 16EXPORT_SYMBOL(unblock_signals);
diff --git a/arch/um/kernel/skas/clone.c b/arch/um/kernel/skas/clone.c
index e1fd066a3525..289771dadf81 100644
--- a/arch/um/kernel/skas/clone.c
+++ b/arch/um/kernel/skas/clone.c
@@ -7,10 +7,10 @@
7#include <sched.h> 7#include <sched.h>
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 "ptrace_user.h" 11#include <ptrace_user.h>
12#include "stub-data.h" 12#include <stub-data.h>
13#include "sysdep/stub.h" 13#include <sysdep/stub.h>
14 14
15/* 15/*
16 * This is in a separate file because it needs to be compiled with any 16 * This is in a separate file because it needs to be compiled with any
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index 0a49ef0c2bf4..ff03067a3b14 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -3,14 +3,14 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/mm.h" 6#include <linux/mm.h>
7#include "linux/sched.h" 7#include <linux/sched.h>
8#include "linux/slab.h" 8#include <linux/slab.h>
9#include "asm/pgalloc.h" 9#include <asm/pgalloc.h>
10#include "asm/pgtable.h" 10#include <asm/pgtable.h>
11#include "as-layout.h" 11#include <as-layout.h>
12#include "os.h" 12#include <os.h>
13#include "skas.h" 13#include <skas.h>
14 14
15extern int __syscall_stub_start; 15extern int __syscall_stub_start;
16 16
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c
index 0a9e57e7446b..4da11b3c8ddb 100644
--- a/arch/um/kernel/skas/process.c
+++ b/arch/um/kernel/skas/process.c
@@ -3,12 +3,12 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/init.h" 6#include <linux/init.h>
7#include "linux/sched.h" 7#include <linux/sched.h>
8#include "as-layout.h" 8#include <as-layout.h>
9#include "kern.h" 9#include <kern.h>
10#include "os.h" 10#include <os.h>
11#include "skas.h" 11#include <skas.h>
12 12
13int new_mm(unsigned long stack) 13int new_mm(unsigned long stack)
14{ 14{
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c
index 86368a025a96..c0681e097432 100644
--- a/arch/um/kernel/skas/syscall.c
+++ b/arch/um/kernel/skas/syscall.c
@@ -3,11 +3,11 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/kernel.h" 6#include <linux/kernel.h>
7#include "linux/ptrace.h" 7#include <linux/ptrace.h>
8#include "kern_util.h" 8#include <kern_util.h>
9#include "sysdep/ptrace.h" 9#include <sysdep/ptrace.h>
10#include "sysdep/syscalls.h" 10#include <sysdep/syscalls.h>
11 11
12extern int syscall_table_size; 12extern int syscall_table_size;
13#define NR_SYSCALLS (syscall_table_size / sizeof(void *)) 13#define NR_SYSCALLS (syscall_table_size / sizeof(void *))
diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c
index cd7df79c6a56..1d3e0c17340b 100644
--- a/arch/um/kernel/skas/uaccess.c
+++ b/arch/um/kernel/skas/uaccess.c
@@ -11,8 +11,8 @@
11#include <asm/current.h> 11#include <asm/current.h>
12#include <asm/page.h> 12#include <asm/page.h>
13#include <asm/pgtable.h> 13#include <asm/pgtable.h>
14#include "kern_util.h" 14#include <kern_util.h>
15#include "os.h" 15#include <os.h>
16 16
17pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr) 17pte_t *virt_to_pte(struct mm_struct *mm, unsigned long addr)
18{ 18{
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index a02b7e9e6b94..5c8c3ea7db7b 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -3,24 +3,24 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/percpu.h" 6#include <linux/percpu.h>
7#include "asm/pgalloc.h" 7#include <asm/pgalloc.h>
8#include "asm/tlb.h" 8#include <asm/tlb.h>
9 9
10#ifdef CONFIG_SMP 10#ifdef CONFIG_SMP
11 11
12#include "linux/sched.h" 12#include <linux/sched.h>
13#include "linux/module.h" 13#include <linux/module.h>
14#include "linux/threads.h" 14#include <linux/threads.h>
15#include "linux/interrupt.h" 15#include <linux/interrupt.h>
16#include "linux/err.h" 16#include <linux/err.h>
17#include "linux/hardirq.h" 17#include <linux/hardirq.h>
18#include "asm/smp.h" 18#include <asm/smp.h>
19#include "asm/processor.h" 19#include <asm/processor.h>
20#include "asm/spinlock.h" 20#include <asm/spinlock.h>
21#include "kern.h" 21#include <kern.h>
22#include "irq_user.h" 22#include <irq_user.h>
23#include "os.h" 23#include <os.h>
24 24
25/* Per CPU bogomips and other parameters 25/* Per CPU bogomips and other parameters
26 * The only piece used here is the ipi pipe, which is set before SMP is 26 * The only piece used here is the ipi pipe, which is set before SMP is
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c
index a4c6d8eee74c..10808bda3671 100644
--- a/arch/um/kernel/syscall.c
+++ b/arch/um/kernel/syscall.c
@@ -3,16 +3,16 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/file.h" 6#include <linux/file.h>
7#include "linux/fs.h" 7#include <linux/fs.h>
8#include "linux/mm.h" 8#include <linux/mm.h>
9#include "linux/sched.h" 9#include <linux/sched.h>
10#include "linux/utsname.h" 10#include <linux/utsname.h>
11#include "linux/syscalls.h" 11#include <linux/syscalls.h>
12#include "asm/current.h" 12#include <asm/current.h>
13#include "asm/mman.h" 13#include <asm/mman.h>
14#include "asm/uaccess.h" 14#include <asm/uaccess.h>
15#include "asm/unistd.h" 15#include <asm/unistd.h>
16#include "internal.h" 16#include "internal.h"
17 17
18long sys_fork(void) 18long sys_fork(void)
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c
index 0960de54495a..e562ff80409a 100644
--- a/arch/um/kernel/sysrq.c
+++ b/arch/um/kernel/sysrq.c
@@ -7,7 +7,7 @@
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include "sysrq.h" 10#include <asm/sysrq.h>
11 11
12/* Catch non-i386 SUBARCH's. */ 12/* Catch non-i386 SUBARCH's. */
13#if !defined(CONFIG_UML_X86) || defined(CONFIG_64BIT) 13#if !defined(CONFIG_UML_X86) || defined(CONFIG_64BIT)
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 5f76d4ba151c..117568d4f64a 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -10,8 +10,8 @@
10#include <linux/threads.h> 10#include <linux/threads.h>
11#include <asm/irq.h> 11#include <asm/irq.h>
12#include <asm/param.h> 12#include <asm/param.h>
13#include "kern_util.h" 13#include <kern_util.h>
14#include "os.h" 14#include <os.h>
15 15
16void timer_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs) 16void timer_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
17{ 17{
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
index f819af951c19..9472079471bb 100644
--- a/arch/um/kernel/tlb.c
+++ b/arch/um/kernel/tlb.c
@@ -8,10 +8,10 @@
8#include <linux/sched.h> 8#include <linux/sched.h>
9#include <asm/pgtable.h> 9#include <asm/pgtable.h>
10#include <asm/tlbflush.h> 10#include <asm/tlbflush.h>
11#include "as-layout.h" 11#include <as-layout.h>
12#include "mem_user.h" 12#include <mem_user.h>
13#include "os.h" 13#include <os.h>
14#include "skas.h" 14#include <skas.h>
15 15
16struct host_vm_change { 16struct host_vm_change {
17 struct host_vm_op { 17 struct host_vm_op {
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index 0f00e9c82080..089f3987e273 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -10,11 +10,11 @@
10#include <asm/current.h> 10#include <asm/current.h>
11#include <asm/pgtable.h> 11#include <asm/pgtable.h>
12#include <asm/tlbflush.h> 12#include <asm/tlbflush.h>
13#include "arch.h" 13#include <arch.h>
14#include "as-layout.h" 14#include <as-layout.h>
15#include "kern_util.h" 15#include <kern_util.h>
16#include "os.h" 16#include <os.h>
17#include "skas.h" 17#include <skas.h>
18 18
19/* 19/*
20 * Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by 20 * Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 4db8770906ca..87df5e3acc26 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -14,13 +14,13 @@
14#include <asm/pgtable.h> 14#include <asm/pgtable.h>
15#include <asm/processor.h> 15#include <asm/processor.h>
16#include <asm/setup.h> 16#include <asm/setup.h>
17#include "as-layout.h" 17#include <as-layout.h>
18#include "arch.h" 18#include <arch.h>
19#include "init.h" 19#include <init.h>
20#include "kern.h" 20#include <kern.h>
21#include "kern_util.h" 21#include <kern_util.h>
22#include "mem_user.h" 22#include <mem_user.h>
23#include "os.h" 23#include <os.h>
24 24
25#define DEFAULT_COMMAND_LINE "root=98:0" 25#define DEFAULT_COMMAND_LINE "root=98:0"
26 26
diff --git a/arch/um/kernel/umid.c b/arch/um/kernel/umid.c
index 81e07e2be3ae..f6cc3bd61781 100644
--- a/arch/um/kernel/umid.c
+++ b/arch/um/kernel/umid.c
@@ -4,9 +4,9 @@
4 */ 4 */
5 5
6#include <asm/errno.h> 6#include <asm/errno.h>
7#include "init.h" 7#include <init.h>
8#include "kern.h" 8#include <kern.h>
9#include "os.h" 9#include <os.h>
10 10
11/* Changed by set_umid_arg */ 11/* Changed by set_umid_arg */
12static int umid_inited = 0; 12static int umid_inited = 0;
diff --git a/arch/um/kernel/uml.lds.S b/arch/um/kernel/uml.lds.S
index fbd99402d4d2..ff65fb4f1a95 100644
--- a/arch/um/kernel/uml.lds.S
+++ b/arch/um/kernel/uml.lds.S
@@ -60,7 +60,7 @@ SECTIONS
60 PROVIDE_HIDDEN(__rela_iplt_end = .); 60 PROVIDE_HIDDEN(__rela_iplt_end = .);
61 } 61 }
62 62
63 #include "asm/common.lds.S" 63 #include <asm/common.lds.S>
64 64
65 init.data : { INIT_DATA } 65 init.data : { INIT_DATA }
66 .data : 66 .data :
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index c5d039e1ff3b..3a6bc2af0961 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -9,10 +9,10 @@
9#include <errno.h> 9#include <errno.h>
10#include <sys/time.h> 10#include <sys/time.h>
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_util.h" 14#include <kern_util.h>
15#include "os.h" 15#include <os.h>
16 16
17struct aio_thread_req { 17struct aio_thread_req {
18 enum aio_type type; 18 enum aio_type type;
diff --git a/arch/um/os-Linux/drivers/etap.h b/arch/um/os-Linux/drivers/etap.h
index ddffd41c3f3f..54183a679fdd 100644
--- a/arch/um/os-Linux/drivers/etap.h
+++ b/arch/um/os-Linux/drivers/etap.h
@@ -6,7 +6,7 @@
6#ifndef __DRIVERS_ETAP_H 6#ifndef __DRIVERS_ETAP_H
7#define __DRIVERS_ETAP_H 7#define __DRIVERS_ETAP_H
8 8
9#include "net_user.h" 9#include <net_user.h>
10 10
11struct ethertap_data { 11struct ethertap_data {
12 char *dev_name; 12 char *dev_name;
diff --git a/arch/um/os-Linux/drivers/ethertap_kern.c b/arch/um/os-Linux/drivers/ethertap_kern.c
index 7f6f9a71aae4..f424600a583f 100644
--- a/arch/um/os-Linux/drivers/ethertap_kern.c
+++ b/arch/um/os-Linux/drivers/ethertap_kern.c
@@ -9,7 +9,7 @@
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/netdevice.h> 10#include <linux/netdevice.h>
11#include "etap.h" 11#include "etap.h"
12#include "net_kern.h" 12#include <net_kern.h>
13 13
14struct ethertap_init { 14struct ethertap_init {
15 char *dev_name; 15 char *dev_name;
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c
index db3d6481375a..b39b6696ac58 100644
--- a/arch/um/os-Linux/drivers/ethertap_user.c
+++ b/arch/um/os-Linux/drivers/ethertap_user.c
@@ -13,9 +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 "os.h" 16#include <os.h>
17#include "net_user.h" 17#include <net_user.h>
18#include "um_malloc.h" 18#include <um_malloc.h>
19 19
20#define MAX_PACKET ETH_MAX_PACKET 20#define MAX_PACKET ETH_MAX_PACKET
21 21
diff --git a/arch/um/os-Linux/drivers/tuntap.h b/arch/um/os-Linux/drivers/tuntap.h
index f17c31586c84..7367354ac8df 100644
--- a/arch/um/os-Linux/drivers/tuntap.h
+++ b/arch/um/os-Linux/drivers/tuntap.h
@@ -6,7 +6,7 @@
6#ifndef __UM_TUNTAP_H 6#ifndef __UM_TUNTAP_H
7#define __UM_TUNTAP_H 7#define __UM_TUNTAP_H
8 8
9#include "net_user.h" 9#include <net_user.h>
10 10
11struct tuntap_data { 11struct tuntap_data {
12 char *dev_name; 12 char *dev_name;
diff --git a/arch/um/os-Linux/drivers/tuntap_kern.c b/arch/um/os-Linux/drivers/tuntap_kern.c
index 4048800e4696..d9d56e5810fe 100644
--- a/arch/um/os-Linux/drivers/tuntap_kern.c
+++ b/arch/um/os-Linux/drivers/tuntap_kern.c
@@ -7,7 +7,7 @@
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/skbuff.h> 8#include <linux/skbuff.h>
9#include <asm/errno.h> 9#include <asm/errno.h>
10#include "net_kern.h" 10#include <net_kern.h>
11#include "tuntap.h" 11#include "tuntap.h"
12 12
13struct tuntap_init { 13struct tuntap_init {
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c
index a2aacffdd907..14126d9176aa 100644
--- a/arch/um/os-Linux/drivers/tuntap_user.c
+++ b/arch/um/os-Linux/drivers/tuntap_user.c
@@ -13,8 +13,8 @@
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_util.h" 16#include <kern_util.h>
17#include "os.h" 17#include <os.h>
18#include "tuntap.h" 18#include "tuntap.h"
19 19
20static int tuntap_user_init(void *data, void *dev) 20static int tuntap_user_init(void *data, void *dev)
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
index d895271ad6f7..1a365ddc4d02 100644
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -9,9 +9,9 @@
9 */ 9 */
10#include <elf.h> 10#include <elf.h>
11#include <stddef.h> 11#include <stddef.h>
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 15
16typedef Elf32_auxv_t elf_auxv_t; 16typedef Elf32_auxv_t elf_auxv_t;
17 17
diff --git a/arch/um/os-Linux/execvp.c b/arch/um/os-Linux/execvp.c
index 66e583a4031b..8fb25ca07c46 100644
--- a/arch/um/os-Linux/execvp.c
+++ b/arch/um/os-Linux/execvp.c
@@ -27,12 +27,12 @@
27#include <limits.h> 27#include <limits.h>
28 28
29#ifndef TEST 29#ifndef TEST
30#include "um_malloc.h" 30#include <um_malloc.h>
31#else 31#else
32#include <stdio.h> 32#include <stdio.h>
33#define um_kmalloc malloc 33#define um_kmalloc malloc
34#endif 34#endif
35#include "os.h" 35#include <os.h>
36 36
37/* Execute FILE, searching in the `PATH' environment variable if it contains 37/* Execute FILE, searching in the `PATH' environment variable if it contains
38 no slashes, with arguments ARGV and environment from `environ'. */ 38 no slashes, with arguments ARGV and environment from `environ'. */
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index b049a63bb74b..c17bd6f7d674 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -13,7 +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 "os.h" 16#include <os.h>
17 17
18static void copy_stat(struct uml_stat *dst, const struct stat64 *src) 18static void copy_stat(struct uml_stat *dst, const struct stat64 *src)
19{ 19{
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index cf26c4a9a43a..e3ee4a51ef63 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -10,9 +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_util.h" 13#include <kern_util.h>
14#include "os.h" 14#include <os.h>
15#include "um_malloc.h" 15#include <um_malloc.h>
16 16
17struct helper_data { 17struct helper_data {
18 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 9a49908b576c..b9afb74b79ad 100644
--- a/arch/um/os-Linux/irq.c
+++ b/arch/um/os-Linux/irq.c
@@ -8,9 +8,9 @@
8#include <poll.h> 8#include <poll.h>
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 "os.h" 12#include <os.h>
13#include "um_malloc.h" 13#include <um_malloc.h>
14 14
15/* 15/*
16 * Locked by irq_lock in arch/um/kernel/irq.c. Changed by os_create_pollfd 16 * 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 7a86dd516eb1..749c96da7b99 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -10,11 +10,11 @@
10#include <signal.h> 10#include <signal.h>
11#include <string.h> 11#include <string.h>
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_util.h" 15#include <kern_util.h>
16#include "os.h" 16#include <os.h>
17#include "um_malloc.h" 17#include <um_malloc.h>
18 18
19#define PGD_BOUND (4 * 1024 * 1024) 19#define PGD_BOUND (4 * 1024 * 1024)
20#define STACKSIZE (8 * 1024 * 1024) 20#define STACKSIZE (8 * 1024 * 1024)
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c
index 8e421e1d6d36..ba4398056fe9 100644
--- a/arch/um/os-Linux/mem.c
+++ b/arch/um/os-Linux/mem.c
@@ -13,8 +13,8 @@
13#include <sys/stat.h> 13#include <sys/stat.h>
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 "os.h" 17#include <os.h>
18 18
19/* Modified by which_tmpdir, which is called during early boot */ 19/* Modified by which_tmpdir, which is called during early boot */
20static 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 307f173e7f82..162bea3d91b2 100644
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -12,10 +12,10 @@
12#include <sys/ptrace.h> 12#include <sys/ptrace.h>
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 "longjmp.h" 16#include <longjmp.h>
17#include "os.h" 17#include <os.h>
18#include "skas_ptrace.h" 18#include <skas_ptrace.h>
19 19
20#define ARBITRARY_ADDR -1 20#define ARBITRARY_ADDR -1
21#define FAILURE_PID -1 21#define FAILURE_PID -1
diff --git a/arch/um/os-Linux/registers.c b/arch/um/os-Linux/registers.c
index b866b9e3bef9..2ff8d4fe83c4 100644
--- a/arch/um/os-Linux/registers.c
+++ b/arch/um/os-Linux/registers.c
@@ -7,9 +7,9 @@
7#include <errno.h> 7#include <errno.h>
8#include <string.h> 8#include <string.h>
9#include <sys/ptrace.h> 9#include <sys/ptrace.h>
10#include "sysdep/ptrace.h" 10#include <sysdep/ptrace.h>
11#include "sysdep/ptrace_user.h" 11#include <sysdep/ptrace_user.h>
12#include "registers.h" 12#include <registers.h>
13 13
14int save_registers(int pid, struct uml_pt_regs *regs) 14int save_registers(int pid, struct uml_pt_regs *regs)
15{ 15{
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index 3c161218c671..8b61cc0e82c8 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -11,11 +11,11 @@
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_util.h" 14#include <kern_util.h>
15#include "init.h" 15#include <init.h>
16#include "os.h" 16#include <os.h>
17#include "sigio.h" 17#include <sigio.h>
18#include "um_malloc.h" 18#include <um_malloc.h>
19 19
20/* 20/*
21 * Protected by sigio_lock(), also used by sigio_cleanup, which is an 21 * 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 6366ce904b9b..b1469fe93295 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -9,10 +9,10 @@
9#include <errno.h> 9#include <errno.h>
10#include <signal.h> 10#include <signal.h>
11#include <strings.h> 11#include <strings.h>
12#include "as-layout.h" 12#include <as-layout.h>
13#include "kern_util.h" 13#include <kern_util.h>
14#include "os.h" 14#include <os.h>
15#include "sysdep/mcontext.h" 15#include <sysdep/mcontext.h>
16#include "internal.h" 16#include "internal.h"
17 17
18void (*sig_info[NSIG])(int, siginfo_t *, struct uml_pt_regs *) = { 18void (*sig_info[NSIG])(int, siginfo_t *, struct uml_pt_regs *) = {
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c
index 90b310d29179..689b18db798f 100644
--- a/arch/um/os-Linux/skas/mem.c
+++ b/arch/um/os-Linux/skas/mem.c
@@ -8,16 +8,16 @@
8#include <errno.h> 8#include <errno.h>
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 "as-layout.h" 12#include <as-layout.h>
13#include "mm_id.h" 13#include <mm_id.h>
14#include "os.h" 14#include <os.h>
15#include "proc_mm.h" 15#include <proc_mm.h>
16#include "ptrace_user.h" 16#include <ptrace_user.h>
17#include "registers.h" 17#include <registers.h>
18#include "skas.h" 18#include <skas.h>
19#include "sysdep/ptrace.h" 19#include <sysdep/ptrace.h>
20#include "sysdep/stub.h" 20#include <sysdep/stub.h>
21 21
22extern unsigned long batch_syscall_stub, __syscall_stub_start; 22extern unsigned long batch_syscall_stub, __syscall_stub_start;
23 23
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index d93bb40499f7..4625949bf1e4 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -11,17 +11,17 @@
11#include <sys/mman.h> 11#include <sys/mman.h>
12#include <sys/wait.h> 12#include <sys/wait.h>
13#include <asm/unistd.h> 13#include <asm/unistd.h>
14#include "as-layout.h" 14#include <as-layout.h>
15#include "init.h" 15#include <init.h>
16#include "kern_util.h" 16#include <kern_util.h>
17#include "mem.h" 17#include <mem.h>
18#include "os.h" 18#include <os.h>
19#include "proc_mm.h" 19#include <proc_mm.h>
20#include "ptrace_user.h" 20#include <ptrace_user.h>
21#include "registers.h" 21#include <registers.h>
22#include "skas.h" 22#include <skas.h>
23#include "skas_ptrace.h" 23#include <skas_ptrace.h>
24#include "sysdep/stub.h" 24#include <sysdep/stub.h>
25 25
26int is_skas_winch(int pid, int fd, void *data) 26int is_skas_winch(int pid, int fd, void *data)
27{ 27{
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index 425162e22af5..da4b9e9999fd 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -16,13 +16,13 @@
16#include <sys/stat.h> 16#include <sys/stat.h>
17#include <sys/wait.h> 17#include <sys/wait.h>
18#include <asm/unistd.h> 18#include <asm/unistd.h>
19#include "init.h" 19#include <init.h>
20#include "os.h" 20#include <os.h>
21#include "mem_user.h" 21#include <mem_user.h>
22#include "ptrace_user.h" 22#include <ptrace_user.h>
23#include "registers.h" 23#include <registers.h>
24#include "skas.h" 24#include <skas.h>
25#include "skas_ptrace.h" 25#include <skas_ptrace.h>
26 26
27static void ptrace_child(void) 27static void ptrace_child(void)
28{ 28{
diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
index 0748fe0c8a73..fac388cb464f 100644
--- a/arch/um/os-Linux/time.c
+++ b/arch/um/os-Linux/time.c
@@ -8,8 +8,8 @@
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_util.h" 11#include <kern_util.h>
12#include "os.h" 12#include <os.h>
13#include "internal.h" 13#include "internal.h"
14 14
15int set_interval(void) 15int set_interval(void)
diff --git a/arch/um/os-Linux/tty.c b/arch/um/os-Linux/tty.c
index dd12b99dcb59..721d8afa329b 100644
--- a/arch/um/os-Linux/tty.c
+++ b/arch/um/os-Linux/tty.c
@@ -7,8 +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_util.h" 10#include <kern_util.h>
11#include "os.h" 11#include <os.h>
12 12
13struct grantpt_info { 13struct grantpt_info {
14 int fd; 14 int fd;
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index 4832eb519f8d..c1dc89261f67 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -12,8 +12,8 @@
12#include <string.h> 12#include <string.h>
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 "os.h" 16#include <os.h>
17 17
18#define UML_DIR "~/.uml/" 18#define UML_DIR "~/.uml/"
19 19
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
index 73926fa3f96b..db4a034aeee1 100644
--- a/arch/um/os-Linux/user_syms.c
+++ b/arch/um/os-Linux/user_syms.c
@@ -1,5 +1,5 @@
1#include "linux/types.h" 1#include <linux/types.h>
2#include "linux/module.h" 2#include <linux/module.h>
3 3
4/* Some of this are builtin function (some are not but could in the future), 4/* Some of this are builtin function (some are not but could in the future),
5 * so I *must* declare good prototypes for them and then EXPORT them. 5 * so I *must* declare good prototypes for them and then EXPORT them.
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c
index 9e3b43bb84c9..492ef5e6e166 100644
--- a/arch/um/os-Linux/util.c
+++ b/arch/um/os-Linux/util.c
@@ -13,7 +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 "os.h" 16#include <os.h>
17 17
18void stack_protections(unsigned long address) 18void stack_protections(unsigned long address)
19{ 19{
diff --git a/arch/um/sys-ppc/miscthings.c b/arch/um/sys-ppc/miscthings.c
index 1c11aed9c719..25908d26ce07 100644
--- a/arch/um/sys-ppc/miscthings.c
+++ b/arch/um/sys-ppc/miscthings.c
@@ -1,6 +1,6 @@
1#include "linux/threads.h" 1#include <linux/threads.h>
2#include "linux/stddef.h" // for NULL 2#include <linux/stddef.h> // for NULL
3#include "linux/elf.h" // for AT_NULL 3#include <linux/elf.h> // for AT_NULL
4 4
5/* The following function nicked from arch/ppc/kernel/process.c and 5/* The following function nicked from arch/ppc/kernel/process.c and
6 * adapted slightly */ 6 * adapted slightly */
diff --git a/arch/um/sys-ppc/ptrace.c b/arch/um/sys-ppc/ptrace.c
index 66ef155248f1..8245df41b201 100644
--- a/arch/um/sys-ppc/ptrace.c
+++ b/arch/um/sys-ppc/ptrace.c
@@ -1,4 +1,4 @@
1#include "linux/sched.h" 1#include <linux/sched.h>
2#include "asm/ptrace.h" 2#include "asm/ptrace.h"
3 3
4int putreg(struct task_struct *child, unsigned long regno, 4int putreg(struct task_struct *child, unsigned long regno,
diff --git a/arch/um/sys-ppc/ptrace_user.c b/arch/um/sys-ppc/ptrace_user.c
index 224d2403c37b..4601b9296aa7 100644
--- a/arch/um/sys-ppc/ptrace_user.c
+++ b/arch/um/sys-ppc/ptrace_user.c
@@ -1,6 +1,6 @@
1#include <errno.h> 1#include <errno.h>
2#include <asm/ptrace.h> 2#include <asm/ptrace.h>
3#include "sysdep/ptrace.h" 3#include <sysdep/ptrace.h>
4 4
5int ptrace_getregs(long pid, unsigned long *regs_out) 5int ptrace_getregs(long pid, unsigned long *regs_out)
6{ 6{
diff --git a/arch/um/sys-ppc/shared/sysdep/ptrace.h b/arch/um/sys-ppc/shared/sysdep/ptrace.h
index 0e3230e937e1..efe0c1a3ea9c 100644
--- a/arch/um/sys-ppc/shared/sysdep/ptrace.h
+++ b/arch/um/sys-ppc/shared/sysdep/ptrace.h
@@ -5,7 +5,7 @@
5#ifndef __SYS_PTRACE_PPC_H 5#ifndef __SYS_PTRACE_PPC_H
6#define __SYS_PTRACE_PPC_H 6#define __SYS_PTRACE_PPC_H
7 7
8#include "linux/types.h" 8#include <linux/types.h>
9 9
10/* the following taken from <asm-ppc/ptrace.h> */ 10/* the following taken from <asm-ppc/ptrace.h> */
11 11
diff --git a/arch/um/sys-ppc/sigcontext.c b/arch/um/sys-ppc/sigcontext.c
index 40694d0f3d15..aac6c83fe44e 100644
--- a/arch/um/sys-ppc/sigcontext.c
+++ b/arch/um/sys-ppc/sigcontext.c
@@ -1,4 +1,4 @@
1#include "asm/ptrace.h" 1#include "asm/ptrace.h"
2#include "asm/sigcontext.h" 2#include "asm/sigcontext.h"
3#include "sysdep/ptrace.h" 3#include <sysdep/ptrace.h>
4 4
diff --git a/arch/um/sys-ppc/sysrq.c b/arch/um/sys-ppc/sysrq.c
index 2f816f1a0ff4..f889449f9285 100644
--- a/arch/um/sys-ppc/sysrq.c
+++ b/arch/um/sys-ppc/sysrq.c
@@ -3,8 +3,8 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/kernel.h" 6#include <linux/kernel.h>
7#include "linux/smp.h" 7#include <linux/smp.h>
8#include "asm/ptrace.h" 8#include "asm/ptrace.h"
9#include "sysrq.h" 9#include "sysrq.h"
10 10
diff --git a/arch/x86/um/asm/checksum.h b/arch/x86/um/asm/checksum.h
index b6efe2381b5d..4b181b74454f 100644
--- a/arch/x86/um/asm/checksum.h
+++ b/arch/x86/um/asm/checksum.h
@@ -1,6 +1,150 @@
1#ifndef __UM_CHECKSUM_H 1#ifndef __UM_CHECKSUM_H
2#define __UM_CHECKSUM_H 2#define __UM_CHECKSUM_H
3 3
4#include <linux/string.h>
5#include <linux/in6.h>
6
7/*
8 * computes the checksum of a memory block at buff, length len,
9 * and adds in "sum" (32-bit)
10 *
11 * returns a 32-bit number suitable for feeding into itself
12 * or csum_tcpudp_magic
13 *
14 * this function must be called with even lengths, except
15 * for the last fragment, which may be odd
16 *
17 * it's best to have buff aligned on a 32-bit boundary
18 */
19extern __wsum csum_partial(const void *buff, int len, __wsum sum);
20
21/*
22 * Note: when you get a NULL pointer exception here this means someone
23 * passed in an incorrect kernel address to one of these functions.
24 *
25 * If you use these functions directly please don't forget the
26 * access_ok().
27 */
28
29static __inline__
30__wsum csum_partial_copy_nocheck(const void *src, void *dst,
31 int len, __wsum sum)
32{
33 memcpy(dst, src, len);
34 return csum_partial(dst, len, sum);
35}
36
37/*
38 * the same as csum_partial, but copies from src while it
39 * checksums, and handles user-space pointer exceptions correctly, when needed.
40 *
41 * here even more important to align src and dst on a 32-bit (or even
42 * better 64-bit) boundary
43 */
44
45static __inline__
46__wsum csum_partial_copy_from_user(const void __user *src, void *dst,
47 int len, __wsum sum, int *err_ptr)
48{
49 if (copy_from_user(dst, src, len)) {
50 *err_ptr = -EFAULT;
51 return (__force __wsum)-1;
52 }
53
54 return csum_partial(dst, len, sum);
55}
56
57/**
58 * csum_fold - Fold and invert a 32bit checksum.
59 * sum: 32bit unfolded sum
60 *
61 * Fold a 32bit running checksum to 16bit and invert it. This is usually
62 * the last step before putting a checksum into a packet.
63 * Make sure not to mix with 64bit checksums.
64 */
65static inline __sum16 csum_fold(__wsum sum)
66{
67 __asm__(
68 " addl %1,%0\n"
69 " adcl $0xffff,%0"
70 : "=r" (sum)
71 : "r" ((__force u32)sum << 16),
72 "0" ((__force u32)sum & 0xffff0000)
73 );
74 return (__force __sum16)(~(__force u32)sum >> 16);
75}
76
77/**
78 * csum_tcpup_nofold - Compute an IPv4 pseudo header checksum.
79 * @saddr: source address
80 * @daddr: destination address
81 * @len: length of packet
82 * @proto: ip protocol of packet
83 * @sum: initial sum to be added in (32bit unfolded)
84 *
85 * Returns the pseudo header checksum the input data. Result is
86 * 32bit unfolded.
87 */
88static inline __wsum
89csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
90 unsigned short proto, __wsum sum)
91{
92 asm(" addl %1, %0\n"
93 " adcl %2, %0\n"
94 " adcl %3, %0\n"
95 " adcl $0, %0\n"
96 : "=r" (sum)
97 : "g" (daddr), "g" (saddr), "g" ((len + proto) << 8), "0" (sum));
98 return sum;
99}
100
101/*
102 * computes the checksum of the TCP/UDP pseudo-header
103 * returns a 16-bit checksum, already complemented
104 */
105static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
106 unsigned short len,
107 unsigned short proto,
108 __wsum sum)
109{
110 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
111}
112
113/**
114 * ip_fast_csum - Compute the IPv4 header checksum efficiently.
115 * iph: ipv4 header
116 * ihl: length of header / 4
117 */
118static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
119{
120 unsigned int sum;
121
122 asm( " movl (%1), %0\n"
123 " subl $4, %2\n"
124 " jbe 2f\n"
125 " addl 4(%1), %0\n"
126 " adcl 8(%1), %0\n"
127 " adcl 12(%1), %0\n"
128 "1: adcl 16(%1), %0\n"
129 " lea 4(%1), %1\n"
130 " decl %2\n"
131 " jne 1b\n"
132 " adcl $0, %0\n"
133 " movl %0, %2\n"
134 " shrl $16, %0\n"
135 " addw %w2, %w0\n"
136 " adcl $0, %0\n"
137 " notl %0\n"
138 "2:"
139 /* Since the input registers which are loaded with iph and ipl
140 are modified, we must also specify them as outputs, or gcc
141 will assume they contain their original values. */
142 : "=r" (sum), "=r" (iph), "=r" (ihl)
143 : "1" (iph), "2" (ihl)
144 : "memory");
145 return (__force __sum16)sum;
146}
147
4#ifdef CONFIG_X86_32 148#ifdef CONFIG_X86_32
5# include "checksum_32.h" 149# include "checksum_32.h"
6#else 150#else
diff --git a/arch/x86/um/asm/checksum_32.h b/arch/x86/um/asm/checksum_32.h
index caab74252e27..ab77b6f9a4bf 100644
--- a/arch/x86/um/asm/checksum_32.h
+++ b/arch/x86/um/asm/checksum_32.h
@@ -5,145 +5,6 @@
5#ifndef __UM_SYSDEP_CHECKSUM_H 5#ifndef __UM_SYSDEP_CHECKSUM_H
6#define __UM_SYSDEP_CHECKSUM_H 6#define __UM_SYSDEP_CHECKSUM_H
7 7
8#include "linux/in6.h"
9#include "linux/string.h"
10
11/*
12 * computes the checksum of a memory block at buff, length len,
13 * and adds in "sum" (32-bit)
14 *
15 * returns a 32-bit number suitable for feeding into itself
16 * or csum_tcpudp_magic
17 *
18 * this function must be called with even lengths, except
19 * for the last fragment, which may be odd
20 *
21 * it's best to have buff aligned on a 32-bit boundary
22 */
23__wsum csum_partial(const void *buff, int len, __wsum sum);
24
25/*
26 * Note: when you get a NULL pointer exception here this means someone
27 * passed in an incorrect kernel address to one of these functions.
28 *
29 * If you use these functions directly please don't forget the
30 * access_ok().
31 */
32
33static __inline__
34__wsum csum_partial_copy_nocheck(const void *src, void *dst,
35 int len, __wsum sum)
36{
37 memcpy(dst, src, len);
38 return csum_partial(dst, len, sum);
39}
40
41/*
42 * the same as csum_partial, but copies from src while it
43 * checksums, and handles user-space pointer exceptions correctly, when needed.
44 *
45 * here even more important to align src and dst on a 32-bit (or even
46 * better 64-bit) boundary
47 */
48
49static __inline__
50__wsum csum_partial_copy_from_user(const void __user *src, void *dst,
51 int len, __wsum sum, int *err_ptr)
52{
53 if (copy_from_user(dst, src, len)) {
54 *err_ptr = -EFAULT;
55 return (__force __wsum)-1;
56 }
57
58 return csum_partial(dst, len, sum);
59}
60
61/*
62 * This is a version of ip_compute_csum() optimized for IP headers,
63 * which always checksum on 4 octet boundaries.
64 *
65 * By Jorge Cwik <jorge@laser.satlink.net>, adapted for linux by
66 * Arnt Gulbrandsen.
67 */
68static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
69{
70 unsigned int sum;
71
72 __asm__ __volatile__(
73 "movl (%1), %0 ;\n"
74 "subl $4, %2 ;\n"
75 "jbe 2f ;\n"
76 "addl 4(%1), %0 ;\n"
77 "adcl 8(%1), %0 ;\n"
78 "adcl 12(%1), %0 ;\n"
79"1: adcl 16(%1), %0 ;\n"
80 "lea 4(%1), %1 ;\n"
81 "decl %2 ;\n"
82 "jne 1b ;\n"
83 "adcl $0, %0 ;\n"
84 "movl %0, %2 ;\n"
85 "shrl $16, %0 ;\n"
86 "addw %w2, %w0 ;\n"
87 "adcl $0, %0 ;\n"
88 "notl %0 ;\n"
89"2: ;\n"
90 /* Since the input registers which are loaded with iph and ipl
91 are modified, we must also specify them as outputs, or gcc
92 will assume they contain their original values. */
93 : "=r" (sum), "=r" (iph), "=r" (ihl)
94 : "1" (iph), "2" (ihl)
95 : "memory");
96 return (__force __sum16)sum;
97}
98
99/*
100 * Fold a partial checksum
101 */
102
103static inline __sum16 csum_fold(__wsum sum)
104{
105 __asm__(
106 "addl %1, %0 ;\n"
107 "adcl $0xffff, %0 ;\n"
108 : "=r" (sum)
109 : "r" ((__force u32)sum << 16),
110 "0" ((__force u32)sum & 0xffff0000)
111 );
112 return (__force __sum16)(~(__force u32)sum >> 16);
113}
114
115static inline __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
116 unsigned short len,
117 unsigned short proto,
118 __wsum sum)
119{
120 __asm__(
121 "addl %1, %0 ;\n"
122 "adcl %2, %0 ;\n"
123 "adcl %3, %0 ;\n"
124 "adcl $0, %0 ;\n"
125 : "=r" (sum)
126 : "g" (daddr), "g"(saddr), "g"((len + proto) << 8), "0"(sum));
127 return sum;
128}
129
130/*
131 * computes the checksum of the TCP/UDP pseudo-header
132 * returns a 16-bit checksum, already complemented
133 */
134static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
135 unsigned short len,
136 unsigned short proto,
137 __wsum sum)
138{
139 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
140}
141
142/*
143 * this routine is used for miscellaneous IP-like checksums, mainly
144 * in icmp.c
145 */
146
147static inline __sum16 ip_compute_csum(const void *buff, int len) 8static inline __sum16 ip_compute_csum(const void *buff, int len)
148{ 9{
149 return csum_fold (csum_partial(buff, len, 0)); 10 return csum_fold (csum_partial(buff, len, 0));
@@ -198,4 +59,3 @@ static __inline__ __wsum csum_and_copy_to_user(const void *src,
198} 59}
199 60
200#endif 61#endif
201
diff --git a/arch/x86/um/asm/checksum_64.h b/arch/x86/um/asm/checksum_64.h
index a5be9031ea85..7b6cd1921573 100644
--- a/arch/x86/um/asm/checksum_64.h
+++ b/arch/x86/um/asm/checksum_64.h
@@ -5,131 +5,6 @@
5#ifndef __UM_SYSDEP_CHECKSUM_H 5#ifndef __UM_SYSDEP_CHECKSUM_H
6#define __UM_SYSDEP_CHECKSUM_H 6#define __UM_SYSDEP_CHECKSUM_H
7 7
8#include "linux/string.h"
9#include "linux/in6.h"
10#include "asm/uaccess.h"
11
12extern __wsum csum_partial(const void *buff, int len, __wsum sum);
13
14/*
15 * Note: when you get a NULL pointer exception here this means someone
16 * passed in an incorrect kernel address to one of these functions.
17 *
18 * If you use these functions directly please don't forget the
19 * access_ok().
20 */
21
22static __inline__
23__wsum csum_partial_copy_nocheck(const void *src, void *dst,
24 int len, __wsum sum)
25{
26 memcpy(dst, src, len);
27 return(csum_partial(dst, len, sum));
28}
29
30static __inline__
31__wsum csum_partial_copy_from_user(const void __user *src,
32 void *dst, int len, __wsum sum,
33 int *err_ptr)
34{
35 if (copy_from_user(dst, src, len)) {
36 *err_ptr = -EFAULT;
37 return (__force __wsum)-1;
38 }
39 return csum_partial(dst, len, sum);
40}
41
42/**
43 * csum_fold - Fold and invert a 32bit checksum.
44 * sum: 32bit unfolded sum
45 *
46 * Fold a 32bit running checksum to 16bit and invert it. This is usually
47 * the last step before putting a checksum into a packet.
48 * Make sure not to mix with 64bit checksums.
49 */
50static inline __sum16 csum_fold(__wsum sum)
51{
52 __asm__(
53 " addl %1,%0\n"
54 " adcl $0xffff,%0"
55 : "=r" (sum)
56 : "r" ((__force u32)sum << 16),
57 "0" ((__force u32)sum & 0xffff0000)
58 );
59 return (__force __sum16)(~(__force u32)sum >> 16);
60}
61
62/**
63 * csum_tcpup_nofold - Compute an IPv4 pseudo header checksum.
64 * @saddr: source address
65 * @daddr: destination address
66 * @len: length of packet
67 * @proto: ip protocol of packet
68 * @sum: initial sum to be added in (32bit unfolded)
69 *
70 * Returns the pseudo header checksum the input data. Result is
71 * 32bit unfolded.
72 */
73static inline __wsum
74csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len,
75 unsigned short proto, __wsum sum)
76{
77 asm(" addl %1, %0\n"
78 " adcl %2, %0\n"
79 " adcl %3, %0\n"
80 " adcl $0, %0\n"
81 : "=r" (sum)
82 : "g" (daddr), "g" (saddr), "g" ((len + proto) << 8), "0" (sum));
83 return sum;
84}
85
86/*
87 * computes the checksum of the TCP/UDP pseudo-header
88 * returns a 16-bit checksum, already complemented
89 */
90static inline __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
91 unsigned short len,
92 unsigned short proto,
93 __wsum sum)
94{
95 return csum_fold(csum_tcpudp_nofold(saddr,daddr,len,proto,sum));
96}
97
98/**
99 * ip_fast_csum - Compute the IPv4 header checksum efficiently.
100 * iph: ipv4 header
101 * ihl: length of header / 4
102 */
103static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
104{
105 unsigned int sum;
106
107 asm( " movl (%1), %0\n"
108 " subl $4, %2\n"
109 " jbe 2f\n"
110 " addl 4(%1), %0\n"
111 " adcl 8(%1), %0\n"
112 " adcl 12(%1), %0\n"
113 "1: adcl 16(%1), %0\n"
114 " lea 4(%1), %1\n"
115 " decl %2\n"
116 " jne 1b\n"
117 " adcl $0, %0\n"
118 " movl %0, %2\n"
119 " shrl $16, %0\n"
120 " addw %w2, %w0\n"
121 " adcl $0, %0\n"
122 " notl %0\n"
123 "2:"
124 /* Since the input registers which are loaded with iph and ipl
125 are modified, we must also specify them as outputs, or gcc
126 will assume they contain their original values. */
127 : "=r" (sum), "=r" (iph), "=r" (ihl)
128 : "1" (iph), "2" (ihl)
129 : "memory");
130 return (__force __sum16)sum;
131}
132
133static inline unsigned add32_with_carry(unsigned a, unsigned b) 8static inline unsigned add32_with_carry(unsigned a, unsigned b)
134{ 9{
135 asm("addl %2,%0\n\t" 10 asm("addl %2,%0\n\t"
diff --git a/arch/x86/um/asm/elf.h b/arch/x86/um/asm/elf.h
index 0e07adc8cbe4..0feee2fd5077 100644
--- a/arch/x86/um/asm/elf.h
+++ b/arch/x86/um/asm/elf.h
@@ -6,7 +6,7 @@
6#define __UM_ELF_X86_H 6#define __UM_ELF_X86_H
7 7
8#include <asm/user.h> 8#include <asm/user.h>
9#include "skas.h" 9#include <skas.h>
10 10
11#ifdef CONFIG_X86_32 11#ifdef CONFIG_X86_32
12 12
diff --git a/arch/x86/um/asm/ptrace.h b/arch/x86/um/asm/ptrace.h
index e72cd0df5ba3..755133258c45 100644
--- a/arch/x86/um/asm/ptrace.h
+++ b/arch/x86/um/asm/ptrace.h
@@ -1,11 +1,13 @@
1#ifndef __UM_X86_PTRACE_H 1#ifndef __UM_X86_PTRACE_H
2#define __UM_X86_PTRACE_H 2#define __UM_X86_PTRACE_H
3 3
4#ifdef CONFIG_X86_32 4#include <linux/compiler.h>
5# include "ptrace_32.h" 5#ifndef CONFIG_X86_32
6#else 6#define __FRAME_OFFSETS /* Needed to get the R* macros */
7# include "ptrace_64.h"
8#endif 7#endif
8#include <asm/ptrace-generic.h>
9
10#define user_mode(r) UPT_IS_USER(&(r)->regs)
9 11
10#define PT_REGS_AX(r) UPT_AX(&(r)->regs) 12#define PT_REGS_AX(r) UPT_AX(&(r)->regs)
11#define PT_REGS_BX(r) UPT_BX(&(r)->regs) 13#define PT_REGS_BX(r) UPT_BX(&(r)->regs)
@@ -36,4 +38,52 @@ static inline long regs_return_value(struct pt_regs *regs)
36{ 38{
37 return PT_REGS_AX(regs); 39 return PT_REGS_AX(regs);
38} 40}
41
42/*
43 * Forward declaration to avoid including sysdep/tls.h, which causes a
44 * circular include, and compilation failures.
45 */
46struct user_desc;
47
48#ifdef CONFIG_X86_32
49
50#define HOST_AUDIT_ARCH AUDIT_ARCH_I386
51
52extern int ptrace_get_thread_area(struct task_struct *child, int idx,
53 struct user_desc __user *user_desc);
54
55extern int ptrace_set_thread_area(struct task_struct *child, int idx,
56 struct user_desc __user *user_desc);
57
58#else
59
60#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
61
62#define PT_REGS_R8(r) UPT_R8(&(r)->regs)
63#define PT_REGS_R9(r) UPT_R9(&(r)->regs)
64#define PT_REGS_R10(r) UPT_R10(&(r)->regs)
65#define PT_REGS_R11(r) UPT_R11(&(r)->regs)
66#define PT_REGS_R12(r) UPT_R12(&(r)->regs)
67#define PT_REGS_R13(r) UPT_R13(&(r)->regs)
68#define PT_REGS_R14(r) UPT_R14(&(r)->regs)
69#define PT_REGS_R15(r) UPT_R15(&(r)->regs)
70
71#include <asm/errno.h>
72
73static inline int ptrace_get_thread_area(struct task_struct *child, int idx,
74 struct user_desc __user *user_desc)
75{
76 return -ENOSYS;
77}
78
79static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
80 struct user_desc __user *user_desc)
81{
82 return -ENOSYS;
83}
84
85extern long arch_prctl(struct task_struct *task, int code,
86 unsigned long __user *addr);
87
88#endif
39#endif /* __UM_X86_PTRACE_H */ 89#endif /* __UM_X86_PTRACE_H */
diff --git a/arch/x86/um/asm/ptrace_32.h b/arch/x86/um/asm/ptrace_32.h
deleted file mode 100644
index 2cf225351b65..000000000000
--- a/arch/x86/um/asm/ptrace_32.h
+++ /dev/null
@@ -1,28 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __UM_PTRACE_I386_H
7#define __UM_PTRACE_I386_H
8
9#define HOST_AUDIT_ARCH AUDIT_ARCH_I386
10
11#include "linux/compiler.h"
12#include "asm/ptrace-generic.h"
13
14#define user_mode(r) UPT_IS_USER(&(r)->regs)
15
16/*
17 * Forward declaration to avoid including sysdep/tls.h, which causes a
18 * circular include, and compilation failures.
19 */
20struct user_desc;
21
22extern int ptrace_get_thread_area(struct task_struct *child, int idx,
23 struct user_desc __user *user_desc);
24
25extern int ptrace_set_thread_area(struct task_struct *child, int idx,
26 struct user_desc __user *user_desc);
27
28#endif
diff --git a/arch/x86/um/asm/ptrace_64.h b/arch/x86/um/asm/ptrace_64.h
deleted file mode 100644
index ea7bff394320..000000000000
--- a/arch/x86/um/asm/ptrace_64.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * Copyright 2003 PathScale, Inc.
3 *
4 * Licensed under the GPL
5 */
6
7#ifndef __UM_PTRACE_X86_64_H
8#define __UM_PTRACE_X86_64_H
9
10#include "linux/compiler.h"
11#include "asm/errno.h"
12
13#define __FRAME_OFFSETS /* Needed to get the R* macros */
14#include "asm/ptrace-generic.h"
15
16#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
17
18#define PT_REGS_R8(r) UPT_R8(&(r)->regs)
19#define PT_REGS_R9(r) UPT_R9(&(r)->regs)
20#define PT_REGS_R10(r) UPT_R10(&(r)->regs)
21#define PT_REGS_R11(r) UPT_R11(&(r)->regs)
22#define PT_REGS_R12(r) UPT_R12(&(r)->regs)
23#define PT_REGS_R13(r) UPT_R13(&(r)->regs)
24#define PT_REGS_R14(r) UPT_R14(&(r)->regs)
25#define PT_REGS_R15(r) UPT_R15(&(r)->regs)
26
27/* XXX */
28#define user_mode(r) UPT_IS_USER(&(r)->regs)
29
30struct user_desc;
31
32static inline int ptrace_get_thread_area(struct task_struct *child, int idx,
33 struct user_desc __user *user_desc)
34{
35 return -ENOSYS;
36}
37
38static inline int ptrace_set_thread_area(struct task_struct *child, int idx,
39 struct user_desc __user *user_desc)
40{
41 return -ENOSYS;
42}
43
44extern long arch_prctl(struct task_struct *task, int code,
45 unsigned long __user *addr);
46#endif
diff --git a/arch/x86/um/bugs_32.c b/arch/x86/um/bugs_32.c
index 17d88cf2c6c4..33daff4dade4 100644
--- a/arch/x86/um/bugs_32.c
+++ b/arch/x86/um/bugs_32.c
@@ -4,9 +4,9 @@
4 */ 4 */
5 5
6#include <signal.h> 6#include <signal.h>
7#include "kern_util.h" 7#include <kern_util.h>
8#include "longjmp.h" 8#include <longjmp.h>
9#include "sysdep/ptrace.h" 9#include <sysdep/ptrace.h>
10#include <generated/asm-offsets.h> 10#include <generated/asm-offsets.h>
11 11
12/* Set during early boot */ 12/* Set during early boot */
diff --git a/arch/x86/um/bugs_64.c b/arch/x86/um/bugs_64.c
index 44e02ba2a265..8cc8256c698d 100644
--- a/arch/x86/um/bugs_64.c
+++ b/arch/x86/um/bugs_64.c
@@ -4,7 +4,7 @@
4 * Licensed under the GPL 4 * Licensed under the GPL
5 */ 5 */
6 6
7#include "sysdep/ptrace.h" 7#include <sysdep/ptrace.h>
8 8
9void arch_check_bugs(void) 9void arch_check_bugs(void)
10{ 10{
diff --git a/arch/x86/um/fault.c b/arch/x86/um/fault.c
index d670f68532f4..8784ab30d91b 100644
--- a/arch/x86/um/fault.c
+++ b/arch/x86/um/fault.c
@@ -3,7 +3,7 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "sysdep/ptrace.h" 6#include <sysdep/ptrace.h>
7 7
8/* These two are from asm-um/uaccess.h and linux/module.h, check them. */ 8/* These two are from asm-um/uaccess.h and linux/module.h, check them. */
9struct exception_table_entry 9struct exception_table_entry
diff --git a/arch/x86/um/ldt.c b/arch/x86/um/ldt.c
index 26b0e39d2ce9..8e08176f0bcb 100644
--- a/arch/x86/um/ldt.c
+++ b/arch/x86/um/ldt.c
@@ -7,11 +7,11 @@
7#include <linux/sched.h> 7#include <linux/sched.h>
8#include <linux/slab.h> 8#include <linux/slab.h>
9#include <asm/unistd.h> 9#include <asm/unistd.h>
10#include "os.h" 10#include <os.h>
11#include "proc_mm.h" 11#include <proc_mm.h>
12#include "skas.h" 12#include <skas.h>
13#include "skas_ptrace.h" 13#include <skas_ptrace.h>
14#include "sysdep/tls.h" 14#include <sysdep/tls.h>
15 15
16extern int modify_ldt(int func, void *ptr, unsigned long bytecount); 16extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
17 17
diff --git a/arch/x86/um/mem_64.c b/arch/x86/um/mem_64.c
index 546518727a73..c6492e75797b 100644
--- a/arch/x86/um/mem_64.c
+++ b/arch/x86/um/mem_64.c
@@ -1,6 +1,6 @@
1#include "linux/mm.h" 1#include <linux/mm.h>
2#include "asm/page.h" 2#include <asm/page.h>
3#include "asm/mman.h" 3#include <asm/mman.h>
4 4
5const char *arch_vma_name(struct vm_area_struct *vma) 5const char *arch_vma_name(struct vm_area_struct *vma)
6{ 6{
diff --git a/arch/x86/um/os-Linux/registers.c b/arch/x86/um/os-Linux/registers.c
index 0cdbb86b012b..41bfe84e11ab 100644
--- a/arch/x86/um/os-Linux/registers.c
+++ b/arch/x86/um/os-Linux/registers.c
@@ -9,8 +9,8 @@
9#ifdef __i386__ 9#ifdef __i386__
10#include <sys/user.h> 10#include <sys/user.h>
11#endif 11#endif
12#include "longjmp.h" 12#include <longjmp.h>
13#include "sysdep/ptrace_user.h" 13#include <sysdep/ptrace_user.h>
14 14
15int save_fp_registers(int pid, unsigned long *fp_regs) 15int save_fp_registers(int pid, unsigned long *fp_regs)
16{ 16{
diff --git a/arch/x86/um/os-Linux/task_size.c b/arch/x86/um/os-Linux/task_size.c
index efb16c5c9bcf..8502ad30e61b 100644
--- a/arch/x86/um/os-Linux/task_size.c
+++ b/arch/x86/um/os-Linux/task_size.c
@@ -2,7 +2,7 @@
2#include <stdlib.h> 2#include <stdlib.h>
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 6
7#ifdef __i386__ 7#ifdef __i386__
8 8
diff --git a/arch/x86/um/os-Linux/tls.c b/arch/x86/um/os-Linux/tls.c
index 82276b6071af..9d94b3b76c74 100644
--- a/arch/x86/um/os-Linux/tls.c
+++ b/arch/x86/um/os-Linux/tls.c
@@ -5,7 +5,7 @@
5#include <sys/syscall.h> 5#include <sys/syscall.h>
6#include <unistd.h> 6#include <unistd.h>
7 7
8#include "sysdep/tls.h" 8#include <sysdep/tls.h>
9 9
10#ifndef PTRACE_GET_THREAD_AREA 10#ifndef PTRACE_GET_THREAD_AREA
11#define PTRACE_GET_THREAD_AREA 25 11#define PTRACE_GET_THREAD_AREA 25
diff --git a/arch/x86/um/ptrace_32.c b/arch/x86/um/ptrace_32.c
index 3b949daa095c..ce3dd4f36f3f 100644
--- a/arch/x86/um/ptrace_32.c
+++ b/arch/x86/um/ptrace_32.c
@@ -3,10 +3,10 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/mm.h" 6#include <linux/mm.h>
7#include "linux/sched.h" 7#include <linux/sched.h>
8#include "asm/uaccess.h" 8#include <asm/uaccess.h>
9#include "skas.h" 9#include <skas.h>
10 10
11extern int arch_switch_tls(struct task_struct *to); 11extern int arch_switch_tls(struct task_struct *to);
12 12
diff --git a/arch/x86/um/ptrace_user.c b/arch/x86/um/ptrace_user.c
index 3960ca1dd35a..617885b18992 100644
--- a/arch/x86/um/ptrace_user.c
+++ b/arch/x86/um/ptrace_user.c
@@ -4,7 +4,7 @@
4 */ 4 */
5 5
6#include <errno.h> 6#include <errno.h>
7#include "ptrace_user.h" 7#include <ptrace_user.h>
8 8
9int ptrace_getregs(long pid, unsigned long *regs_out) 9int ptrace_getregs(long pid, unsigned long *regs_out)
10{ 10{
diff --git a/arch/x86/um/shared/sysdep/ptrace.h b/arch/x86/um/shared/sysdep/ptrace.h
index 6ce2d76eb908..eb9356904ad3 100644
--- a/arch/x86/um/shared/sysdep/ptrace.h
+++ b/arch/x86/um/shared/sysdep/ptrace.h
@@ -2,7 +2,7 @@
2#define __SYSDEP_X86_PTRACE_H 2#define __SYSDEP_X86_PTRACE_H
3 3
4#include <generated/user_constants.h> 4#include <generated/user_constants.h>
5#include "sysdep/faultinfo.h" 5#include <sysdep/faultinfo.h>
6 6
7#define MAX_REG_OFFSET (UM_FRAME_SIZE) 7#define MAX_REG_OFFSET (UM_FRAME_SIZE)
8#define MAX_REG_NR ((MAX_REG_OFFSET) / sizeof(unsigned long)) 8#define MAX_REG_NR ((MAX_REG_OFFSET) / sizeof(unsigned long))
diff --git a/arch/x86/um/shared/sysdep/stub.h b/arch/x86/um/shared/sysdep/stub.h
index bd161e300102..3f55e5bd3cec 100644
--- a/arch/x86/um/shared/sysdep/stub.h
+++ b/arch/x86/um/shared/sysdep/stub.h
@@ -1,8 +1,8 @@
1#include <asm/unistd.h> 1#include <asm/unistd.h>
2#include <sys/mman.h> 2#include <sys/mman.h>
3#include <signal.h> 3#include <signal.h>
4#include "as-layout.h" 4#include <as-layout.h>
5#include "stub-data.h" 5#include <stub-data.h>
6 6
7#ifdef __i386__ 7#ifdef __i386__
8#include "stub_32.h" 8#include "stub_32.h"
diff --git a/arch/x86/um/shared/sysdep/syscalls_32.h b/arch/x86/um/shared/sysdep/syscalls_32.h
index 05cb796aecb5..8436079be914 100644
--- a/arch/x86/um/shared/sysdep/syscalls_32.h
+++ b/arch/x86/um/shared/sysdep/syscalls_32.h
@@ -3,8 +3,8 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "asm/unistd.h" 6#include <asm/unistd.h>
7#include "sysdep/ptrace.h" 7#include <sysdep/ptrace.h>
8 8
9typedef long syscall_handler_t(struct pt_regs); 9typedef long syscall_handler_t(struct pt_regs);
10 10
diff --git a/arch/x86/um/signal.c b/arch/x86/um/signal.c
index ba7363ecf896..bdaa08cfbcf4 100644
--- a/arch/x86/um/signal.c
+++ b/arch/x86/um/signal.c
@@ -11,8 +11,8 @@
11#include <asm/unistd.h> 11#include <asm/unistd.h>
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13#include <asm/ucontext.h> 13#include <asm/ucontext.h>
14#include "frame_kern.h" 14#include <frame_kern.h>
15#include "skas.h" 15#include <skas.h>
16 16
17#ifdef CONFIG_X86_32 17#ifdef CONFIG_X86_32
18 18
diff --git a/arch/x86/um/stub_32.S b/arch/x86/um/stub_32.S
index 54a36ec20cb7..b972649d3a18 100644
--- a/arch/x86/um/stub_32.S
+++ b/arch/x86/um/stub_32.S
@@ -1,4 +1,4 @@
1#include "as-layout.h" 1#include <as-layout.h>
2 2
3 .globl syscall_stub 3 .globl syscall_stub
4.section .__syscall_stub, "ax" 4.section .__syscall_stub, "ax"
diff --git a/arch/x86/um/stub_64.S b/arch/x86/um/stub_64.S
index 20e4a96a6dcb..7160b20172d0 100644
--- a/arch/x86/um/stub_64.S
+++ b/arch/x86/um/stub_64.S
@@ -1,4 +1,4 @@
1#include "as-layout.h" 1#include <as-layout.h>
2 2
3 .globl syscall_stub 3 .globl syscall_stub
4.section .__syscall_stub, "ax" 4.section .__syscall_stub, "ax"
diff --git a/arch/x86/um/stub_segv.c b/arch/x86/um/stub_segv.c
index b7450bd22e7d..1518d2805ae8 100644
--- a/arch/x86/um/stub_segv.c
+++ b/arch/x86/um/stub_segv.c
@@ -3,9 +3,9 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "sysdep/stub.h" 6#include <sysdep/stub.h>
7#include "sysdep/faultinfo.h" 7#include <sysdep/faultinfo.h>
8#include "sysdep/mcontext.h" 8#include <sysdep/mcontext.h>
9 9
10void __attribute__ ((__section__ (".__syscall_stub"))) 10void __attribute__ ((__section__ (".__syscall_stub")))
11stub_segv_handler(int sig, siginfo_t *info, void *p) 11stub_segv_handler(int sig, siginfo_t *info, void *p)
diff --git a/arch/x86/um/sysrq_32.c b/arch/x86/um/sysrq_32.c
index 2d5cc51e9bef..c9bee5b8c0d3 100644
--- a/arch/x86/um/sysrq_32.c
+++ b/arch/x86/um/sysrq_32.c
@@ -3,12 +3,12 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/kernel.h" 6#include <linux/kernel.h>
7#include "linux/smp.h" 7#include <linux/smp.h>
8#include "linux/sched.h" 8#include <linux/sched.h>
9#include "linux/kallsyms.h" 9#include <linux/kallsyms.h>
10#include "asm/ptrace.h" 10#include <asm/ptrace.h>
11#include "sysrq.h" 11#include <asm/sysrq.h>
12 12
13/* This is declared by <linux/sched.h> */ 13/* This is declared by <linux/sched.h> */
14void show_regs(struct pt_regs *regs) 14void show_regs(struct pt_regs *regs)
diff --git a/arch/x86/um/sysrq_64.c b/arch/x86/um/sysrq_64.c
index 08258f179969..a0e7fb1134a0 100644
--- a/arch/x86/um/sysrq_64.c
+++ b/arch/x86/um/sysrq_64.c
@@ -10,7 +10,7 @@
10#include <linux/utsname.h> 10#include <linux/utsname.h>
11#include <asm/current.h> 11#include <asm/current.h>
12#include <asm/ptrace.h> 12#include <asm/ptrace.h>
13#include "sysrq.h" 13#include <asm/sysrq.h>
14 14
15void __show_regs(struct pt_regs *regs) 15void __show_regs(struct pt_regs *regs)
16{ 16{
diff --git a/arch/x86/um/tls_32.c b/arch/x86/um/tls_32.c
index baba84f8ecb8..5f5feff3d24c 100644
--- a/arch/x86/um/tls_32.c
+++ b/arch/x86/um/tls_32.c
@@ -3,12 +3,12 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include "linux/percpu.h" 6#include <linux/percpu.h>
7#include "linux/sched.h" 7#include <linux/sched.h>
8#include "asm/uaccess.h" 8#include <asm/uaccess.h>
9#include "os.h" 9#include <os.h>
10#include "skas.h" 10#include <skas.h>
11#include "sysdep/tls.h" 11#include <sysdep/tls.h>
12 12
13/* 13/*
14 * If needed we can detect when it's uninitialized. 14 * If needed we can detect when it's uninitialized.
diff --git a/arch/x86/um/tls_64.c b/arch/x86/um/tls_64.c
index f7ba46200ecd..d22363cb854e 100644
--- a/arch/x86/um/tls_64.c
+++ b/arch/x86/um/tls_64.c
@@ -1,4 +1,4 @@
1#include "linux/sched.h" 1#include <linux/sched.h>
2 2
3void clear_flushed_tls(struct task_struct *task) 3void clear_flushed_tls(struct task_struct *task)
4{ 4{
diff --git a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h
index 1fe731337f07..9c88da0e855a 100644
--- a/fs/hostfs/hostfs.h
+++ b/fs/hostfs/hostfs.h
@@ -1,7 +1,7 @@
1#ifndef __UM_FS_HOSTFS 1#ifndef __UM_FS_HOSTFS
2#define __UM_FS_HOSTFS 2#define __UM_FS_HOSTFS
3 3
4#include "os.h" 4#include <os.h>
5 5
6/* 6/*
7 * These are exactly the same definitions as in fs.h, but the names are 7 * These are exactly the same definitions as in fs.h, but the names are
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 6c9f3a9d5e21..457addc5c91f 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -16,8 +16,8 @@
16#include <linux/mount.h> 16#include <linux/mount.h>
17#include <linux/namei.h> 17#include <linux/namei.h>
18#include "hostfs.h" 18#include "hostfs.h"
19#include "init.h" 19#include <init.h>
20#include "kern.h" 20#include <kern.h>
21 21
22struct hostfs_inode_info { 22struct hostfs_inode_info {
23 int fd; 23 int fd;
@@ -848,9 +848,11 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
848 attr->ia_size != i_size_read(inode)) { 848 attr->ia_size != i_size_read(inode)) {
849 int error; 849 int error;
850 850
851 error = vmtruncate(inode, attr->ia_size); 851 error = inode_newsize_ok(inode, attr->ia_size);
852 if (err) 852 if (error)
853 return err; 853 return error;
854
855 truncate_setsize(inode, attr->ia_size);
854 } 856 }
855 857
856 setattr_copy(inode, attr); 858 setattr_copy(inode, attr);
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
index a74ad0d371c2..67838f3aa20a 100644
--- a/fs/hostfs/hostfs_user.c
+++ b/fs/hostfs/hostfs_user.c
@@ -15,7 +15,6 @@
15#include <sys/types.h> 15#include <sys/types.h>
16#include <sys/vfs.h> 16#include <sys/vfs.h>
17#include "hostfs.h" 17#include "hostfs.h"
18#include "os.h"
19#include <utime.h> 18#include <utime.h>
20 19
21static void stat64_to_hostfs(const struct stat64 *buf, struct hostfs_stat *p) 20static void stat64_to_hostfs(const struct stat64 *buf, struct hostfs_stat *p)
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c
index c1dffe47fde2..78f21f8dc2ec 100644
--- a/fs/hppfs/hppfs.c
+++ b/fs/hppfs/hppfs.c
@@ -18,7 +18,7 @@
18#include <linux/pid_namespace.h> 18#include <linux/pid_namespace.h>
19#include <linux/namei.h> 19#include <linux/namei.h>
20#include <asm/uaccess.h> 20#include <asm/uaccess.h>
21#include "os.h" 21#include <os.h>
22 22
23static struct inode *get_inode(struct super_block *, struct dentry *); 23static struct inode *get_inode(struct super_block *, struct dentry *);
24 24
@@ -674,7 +674,7 @@ static struct inode *get_inode(struct super_block *sb, struct dentry *dentry)
674 674
675 if (!inode) { 675 if (!inode) {
676 dput(dentry); 676 dput(dentry);
677 return ERR_PTR(-ENOMEM); 677 return NULL;
678 } 678 }
679 679
680 if (S_ISDIR(dentry->d_inode->i_mode)) { 680 if (S_ISDIR(dentry->d_inode->i_mode)) {