x86, um: get rid of sysdep symlink

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 3af8c81..2e042b0 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -27,7 +27,7 @@
 #
 # These are cleaned up during mrproper. Please DO NOT fix it again, this is
 # the Correct Thing(tm) to do!
-ARCH_SYMLINKS = $(ARCH_DIR)/include/shared/sysdep $(ARCH_DIR)/os \
+ARCH_SYMLINKS = $(ARCH_DIR)/os \
 	$(SYMLINK_HEADERS) $(ARCH_DIR)/include/shared/uml-config.h
 
 MODE_INCLUDE	+= -I$(srctree)/$(ARCH_DIR)/include/shared/skas
@@ -39,7 +39,7 @@
 ARCH_INCLUDE	+= -I$(srctree)/$(ARCH_DIR)/include/shared
 KBUILD_CPPFLAGS	+= -I$(ARCH_DIR)/include # for SYMLINK_HEADERS
 endif
-SYS_DIR		:= $(ARCH_DIR)/include/shared/sysdep-$(SUBARCH)
+ARCH_INCLUDE	+= -I$(srctree)/$(ARCH_DIR)/sys-$(SUBARCH) # for sysdep
 
 # -Dvmap=kernel_vmap prevents anything from referencing the libpcap.o symbol so
 # named - it's a common symbol in libpcap, so we get a binary which crashes.
@@ -157,14 +157,6 @@
 	@echo '  MKDIR $@'
 	$(Q)mkdir -p $@
 
-$(ARCH_DIR)/include/shared/sysdep: $(objtree)/$(ARCH_DIR)/include/shared
-	@echo '  SYMLINK $@'
-ifneq ($(KBUILD_SRC),)
-	$(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/shared/sysdep-$(SUBARCH) $@
-else
-	$(Q)ln -fsn sysdep-$(SUBARCH) $@
-endif
-
 $(ARCH_DIR)/os:
 	@echo '  SYMLINK $@'
 ifneq ($(KBUILD_SRC),)
diff --git a/arch/um/include/shared/sysdep-x86_64/system.h b/arch/um/include/shared/sysdep-x86_64/system.h
deleted file mode 100644
index d1b93c4..0000000
--- a/arch/um/include/shared/sysdep-x86_64/system.h
+++ /dev/null
@@ -1,132 +0,0 @@
-#ifndef _ASM_X86_SYSTEM_H_
-#define _ASM_X86_SYSTEM_H_
-
-#include <asm/asm.h>
-#include <asm/segment.h>
-#include <asm/cpufeature.h>
-#include <asm/cmpxchg.h>
-#include <asm/nops.h>
-
-#include <linux/kernel.h>
-#include <linux/irqflags.h>
-
-/* entries in ARCH_DLINFO: */
-#ifdef CONFIG_IA32_EMULATION
-# define AT_VECTOR_SIZE_ARCH 2
-#else
-# define AT_VECTOR_SIZE_ARCH 1
-#endif
-
-extern unsigned long arch_align_stack(unsigned long sp);
-
-void default_idle(void);
-
-/*
- * Force strict CPU ordering.
- * And yes, this is required on UP too when we're talking
- * to devices.
- */
-#ifdef CONFIG_X86_32
-/*
- * Some non-Intel clones support out of order store. wmb() ceases to be a
- * nop for these.
- */
-#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2)
-#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
-#define wmb() alternative("lock; addl $0,0(%%esp)", "sfence", X86_FEATURE_XMM)
-#else
-#define mb() 	asm volatile("mfence":::"memory")
-#define rmb()	asm volatile("lfence":::"memory")
-#define wmb()	asm volatile("sfence" ::: "memory")
-#endif
-
-/**
- * read_barrier_depends - Flush all pending reads that subsequents reads
- * depend on.
- *
- * No data-dependent reads from memory-like regions are ever reordered
- * over this barrier.  All reads preceding this primitive are guaranteed
- * to access memory (but not necessarily other CPUs' caches) before any
- * reads following this primitive that depend on the data return by
- * any of the preceding reads.  This primitive is much lighter weight than
- * rmb() on most CPUs, and is never heavier weight than is
- * rmb().
- *
- * These ordering constraints are respected by both the local CPU
- * and the compiler.
- *
- * Ordering is not guaranteed by anything other than these primitives,
- * not even by data dependencies.  See the documentation for
- * memory_barrier() for examples and URLs to more information.
- *
- * For example, the following code would force ordering (the initial
- * value of "a" is zero, "b" is one, and "p" is "&a"):
- *
- * <programlisting>
- *	CPU 0				CPU 1
- *
- *	b = 2;
- *	memory_barrier();
- *	p = &b;				q = p;
- *					read_barrier_depends();
- *					d = *q;
- * </programlisting>
- *
- * because the read of "*q" depends on the read of "p" and these
- * two reads are separated by a read_barrier_depends().  However,
- * the following code, with the same initial values for "a" and "b":
- *
- * <programlisting>
- *	CPU 0				CPU 1
- *
- *	a = 2;
- *	memory_barrier();
- *	b = 3;				y = b;
- *					read_barrier_depends();
- *					x = a;
- * </programlisting>
- *
- * does not enforce ordering, since there is no data dependency between
- * the read of "a" and the read of "b".  Therefore, on some CPUs, such
- * as Alpha, "y" could be set to 3 and "x" to 0.  Use rmb()
- * in cases like this where there are no data dependencies.
- **/
-
-#define read_barrier_depends()	do { } while (0)
-
-#ifdef CONFIG_SMP
-#define smp_mb()	mb()
-#ifdef CONFIG_X86_PPRO_FENCE
-# define smp_rmb()	rmb()
-#else
-# define smp_rmb()	barrier()
-#endif
-#ifdef CONFIG_X86_OOSTORE
-# define smp_wmb() 	wmb()
-#else
-# define smp_wmb()	barrier()
-#endif
-#define smp_read_barrier_depends()	read_barrier_depends()
-#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
-#else
-#define smp_mb()	barrier()
-#define smp_rmb()	barrier()
-#define smp_wmb()	barrier()
-#define smp_read_barrier_depends()	do { } while (0)
-#define set_mb(var, value) do { var = value; barrier(); } while (0)
-#endif
-
-/*
- * Stop RDTSC speculation. This is needed when you need to use RDTSC
- * (or get_cycles or vread that possibly accesses the TSC) in a defined
- * code region.
- *
- * (Could use an alternative three way for this if there was one.)
- */
-static inline void rdtsc_barrier(void)
-{
-	alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
-	alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
-}
-
-#endif
diff --git a/arch/um/include/shared/sysdep-i386/archsetjmp.h b/arch/um/sys-i386/sysdep/archsetjmp.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/archsetjmp.h
rename to arch/um/sys-i386/sysdep/archsetjmp.h
diff --git a/arch/um/include/shared/sysdep-i386/barrier.h b/arch/um/sys-i386/sysdep/barrier.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/barrier.h
rename to arch/um/sys-i386/sysdep/barrier.h
diff --git a/arch/um/include/shared/sysdep-i386/checksum.h b/arch/um/sys-i386/sysdep/checksum.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/checksum.h
rename to arch/um/sys-i386/sysdep/checksum.h
diff --git a/arch/um/include/shared/sysdep-i386/faultinfo.h b/arch/um/sys-i386/sysdep/faultinfo.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/faultinfo.h
rename to arch/um/sys-i386/sysdep/faultinfo.h
diff --git a/arch/um/include/shared/sysdep-i386/host_ldt.h b/arch/um/sys-i386/sysdep/host_ldt.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/host_ldt.h
rename to arch/um/sys-i386/sysdep/host_ldt.h
diff --git a/arch/um/include/shared/sysdep-i386/kernel-offsets.h b/arch/um/sys-i386/sysdep/kernel-offsets.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/kernel-offsets.h
rename to arch/um/sys-i386/sysdep/kernel-offsets.h
diff --git a/arch/um/include/shared/sysdep-i386/ptrace.h b/arch/um/sys-i386/sysdep/ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/ptrace.h
rename to arch/um/sys-i386/sysdep/ptrace.h
diff --git a/arch/um/include/shared/sysdep-i386/ptrace_user.h b/arch/um/sys-i386/sysdep/ptrace_user.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/ptrace_user.h
rename to arch/um/sys-i386/sysdep/ptrace_user.h
diff --git a/arch/um/include/shared/sysdep-i386/sc.h b/arch/um/sys-i386/sysdep/sc.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/sc.h
rename to arch/um/sys-i386/sysdep/sc.h
diff --git a/arch/um/include/shared/sysdep-i386/sigcontext.h b/arch/um/sys-i386/sysdep/sigcontext.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/sigcontext.h
rename to arch/um/sys-i386/sysdep/sigcontext.h
diff --git a/arch/um/include/shared/sysdep-i386/skas_ptrace.h b/arch/um/sys-i386/sysdep/skas_ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/skas_ptrace.h
rename to arch/um/sys-i386/sysdep/skas_ptrace.h
diff --git a/arch/um/include/shared/sysdep-i386/stub.h b/arch/um/sys-i386/sysdep/stub.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/stub.h
rename to arch/um/sys-i386/sysdep/stub.h
diff --git a/arch/um/include/shared/sysdep-i386/syscalls.h b/arch/um/sys-i386/sysdep/syscalls.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/syscalls.h
rename to arch/um/sys-i386/sysdep/syscalls.h
diff --git a/arch/um/include/shared/sysdep-i386/system.h b/arch/um/sys-i386/sysdep/system.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/system.h
rename to arch/um/sys-i386/sysdep/system.h
diff --git a/arch/um/include/shared/sysdep-i386/tls.h b/arch/um/sys-i386/sysdep/tls.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/tls.h
rename to arch/um/sys-i386/sysdep/tls.h
diff --git a/arch/um/include/shared/sysdep-i386/vm-flags.h b/arch/um/sys-i386/sysdep/vm-flags.h
similarity index 100%
rename from arch/um/include/shared/sysdep-i386/vm-flags.h
rename to arch/um/sys-i386/sysdep/vm-flags.h
diff --git a/arch/um/include/shared/sysdep-ia64/ptrace.h b/arch/um/sys-ia64/sysdep/ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ia64/ptrace.h
rename to arch/um/sys-ia64/sysdep/ptrace.h
diff --git a/arch/um/include/shared/sysdep-ia64/sigcontext.h b/arch/um/sys-ia64/sysdep/sigcontext.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ia64/sigcontext.h
rename to arch/um/sys-ia64/sysdep/sigcontext.h
diff --git a/arch/um/include/shared/sysdep-ia64/skas_ptrace.h b/arch/um/sys-ia64/sysdep/skas_ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ia64/skas_ptrace.h
rename to arch/um/sys-ia64/sysdep/skas_ptrace.h
diff --git a/arch/um/include/shared/sysdep-ia64/syscalls.h b/arch/um/sys-ia64/sysdep/syscalls.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ia64/syscalls.h
rename to arch/um/sys-ia64/sysdep/syscalls.h
diff --git a/arch/um/include/shared/sysdep-ppc/ptrace.h b/arch/um/sys-ppc/sysdep/ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ppc/ptrace.h
rename to arch/um/sys-ppc/sysdep/ptrace.h
diff --git a/arch/um/include/shared/sysdep-ppc/sigcontext.h b/arch/um/sys-ppc/sysdep/sigcontext.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ppc/sigcontext.h
rename to arch/um/sys-ppc/sysdep/sigcontext.h
diff --git a/arch/um/include/shared/sysdep-ppc/skas_ptrace.h b/arch/um/sys-ppc/sysdep/skas_ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ppc/skas_ptrace.h
rename to arch/um/sys-ppc/sysdep/skas_ptrace.h
diff --git a/arch/um/include/shared/sysdep-ppc/syscalls.h b/arch/um/sys-ppc/sysdep/syscalls.h
similarity index 100%
rename from arch/um/include/shared/sysdep-ppc/syscalls.h
rename to arch/um/sys-ppc/sysdep/syscalls.h
diff --git a/arch/um/include/shared/sysdep-x86_64/archsetjmp.h b/arch/um/sys-x86_64/sysdep/archsetjmp.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/archsetjmp.h
rename to arch/um/sys-x86_64/sysdep/archsetjmp.h
diff --git a/arch/um/include/shared/sysdep-x86_64/barrier.h b/arch/um/sys-x86_64/sysdep/barrier.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/barrier.h
rename to arch/um/sys-x86_64/sysdep/barrier.h
diff --git a/arch/um/include/shared/sysdep-x86_64/checksum.h b/arch/um/sys-x86_64/sysdep/checksum.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/checksum.h
rename to arch/um/sys-x86_64/sysdep/checksum.h
diff --git a/arch/um/include/shared/sysdep-x86_64/faultinfo.h b/arch/um/sys-x86_64/sysdep/faultinfo.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/faultinfo.h
rename to arch/um/sys-x86_64/sysdep/faultinfo.h
diff --git a/arch/um/include/shared/sysdep-x86_64/host_ldt.h b/arch/um/sys-x86_64/sysdep/host_ldt.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/host_ldt.h
rename to arch/um/sys-x86_64/sysdep/host_ldt.h
diff --git a/arch/um/include/shared/sysdep-x86_64/kernel-offsets.h b/arch/um/sys-x86_64/sysdep/kernel-offsets.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/kernel-offsets.h
rename to arch/um/sys-x86_64/sysdep/kernel-offsets.h
diff --git a/arch/um/include/shared/sysdep-x86_64/ptrace.h b/arch/um/sys-x86_64/sysdep/ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/ptrace.h
rename to arch/um/sys-x86_64/sysdep/ptrace.h
diff --git a/arch/um/include/shared/sysdep-x86_64/ptrace_user.h b/arch/um/sys-x86_64/sysdep/ptrace_user.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/ptrace_user.h
rename to arch/um/sys-x86_64/sysdep/ptrace_user.h
diff --git a/arch/um/include/shared/sysdep-x86_64/sc.h b/arch/um/sys-x86_64/sysdep/sc.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/sc.h
rename to arch/um/sys-x86_64/sysdep/sc.h
diff --git a/arch/um/include/shared/sysdep-x86_64/sigcontext.h b/arch/um/sys-x86_64/sysdep/sigcontext.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/sigcontext.h
rename to arch/um/sys-x86_64/sysdep/sigcontext.h
diff --git a/arch/um/include/shared/sysdep-x86_64/skas_ptrace.h b/arch/um/sys-x86_64/sysdep/skas_ptrace.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/skas_ptrace.h
rename to arch/um/sys-x86_64/sysdep/skas_ptrace.h
diff --git a/arch/um/include/shared/sysdep-x86_64/stub.h b/arch/um/sys-x86_64/sysdep/stub.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/stub.h
rename to arch/um/sys-x86_64/sysdep/stub.h
diff --git a/arch/um/include/shared/sysdep-x86_64/syscalls.h b/arch/um/sys-x86_64/sysdep/syscalls.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/syscalls.h
rename to arch/um/sys-x86_64/sysdep/syscalls.h
diff --git a/arch/um/include/shared/sysdep-i386/system.h b/arch/um/sys-x86_64/sysdep/system.h
similarity index 100%
copy from arch/um/include/shared/sysdep-i386/system.h
copy to arch/um/sys-x86_64/sysdep/system.h
diff --git a/arch/um/include/shared/sysdep-x86_64/tls.h b/arch/um/sys-x86_64/sysdep/tls.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/tls.h
rename to arch/um/sys-x86_64/sysdep/tls.h
diff --git a/arch/um/include/shared/sysdep-x86_64/vm-flags.h b/arch/um/sys-x86_64/sysdep/vm-flags.h
similarity index 100%
rename from arch/um/include/shared/sysdep-x86_64/vm-flags.h
rename to arch/um/sys-x86_64/sysdep/vm-flags.h