um: stop polluting the namespace with registers.h contents
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 20 Sep 2021 21:32:50 +0000 (21:32 +0000)
committerRichard Weinberger <richard@nod.at>
Tue, 21 Dec 2021 20:31:35 +0000 (21:31 +0100)
Only one extern in there is needed in processor-generic.h, and it's
not needed anywhere else.  So move it over there and get rid of
the include in processor-generic.h, adding includes of registers.h
to the few files that need the declarations in it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/include/asm/processor-generic.h
arch/um/include/shared/registers.h
arch/um/kernel/exec.c
arch/um/kernel/process.c
arch/x86/um/os-Linux/registers.c
arch/x86/um/ptrace_32.c
arch/x86/um/ptrace_64.c
arch/x86/um/signal.c
arch/x86/um/syscalls_64.c

index 579692a40a5560ffb6879a5376e909b6e4f76f27..6a4fe8b4e686b56052513a80e5cb08bde9cd1197 100644 (file)
@@ -11,7 +11,6 @@ struct pt_regs;
 struct task_struct;
 
 #include <asm/ptrace.h>
-#include <registers.h>
 #include <sysdep/archsetjmp.h>
 
 #include <linux/prefetch.h>
@@ -105,6 +104,7 @@ extern struct cpuinfo_um boot_cpu_data;
 #define current_cpu_data boot_cpu_data
 #define cache_line_size()      (boot_cpu_data.cache_alignment)
 
+extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
 #define KSTK_REG(tsk, reg) get_thread_reg(reg, &tsk->thread.switch_buf)
 extern unsigned long __get_wchan(struct task_struct *p);
 
index fbb709a222839132cec2a2bbf16c4467d88450e6..2f9c3ce5b45e8cfcc1eb4f67e14f5fbbd7615fe3 100644 (file)
@@ -7,7 +7,6 @@
 #define __REGISTERS_H
 
 #include <sysdep/ptrace.h>
-#include <sysdep/archsetjmp.h>
 
 extern int save_i387_registers(int pid, unsigned long *fp_regs);
 extern int restore_i387_registers(int pid, unsigned long *fp_regs);
@@ -19,7 +18,6 @@ extern int save_registers(int pid, struct uml_pt_regs *regs);
 extern int restore_pid_registers(int pid, struct uml_pt_regs *regs);
 extern int init_pid_registers(int pid);
 extern void get_safe_registers(unsigned long *regs, unsigned long *fp_regs);
-extern unsigned long get_thread_reg(int reg, jmp_buf *buf);
 extern int get_fp_registers(int pid, unsigned long *regs);
 extern int put_fp_registers(int pid, unsigned long *regs);
 
index 4d84981003419b7aa8d57de8f8f73238105b26e0..c85e40c72779f461e5d3d01c88818d5481308eca 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/uaccess.h>
 #include <as-layout.h>
 #include <mem_user.h>
+#include <registers.h>
 #include <skas.h>
 #include <os.h>
 
index 82107373ac7e9243ab2063b9828f5c3cddb13900..7055cd446155733c76b204205893af5534cf3a13 100644 (file)
@@ -31,6 +31,7 @@
 #include <kern_util.h>
 #include <os.h>
 #include <skas.h>
+#include <registers.h>
 #include <linux/time-internal.h>
 
 /*
index 3c423dfcd78bf0d7f96883266f15b50fd8ffa55c..df8f4b4bf98b9e109c0b4ee547bb3f93b03bad6e 100644 (file)
@@ -15,6 +15,7 @@
 #include <sys/uio.h>
 #include <asm/sigcontext.h>
 #include <linux/elf.h>
+#include <registers.h>
 
 int have_xstate_support;
 
index 2497bac560663150f49355f163c6fdadf44861a4..0bc4b73a9cdeab719e72026cdf823346cbdc985e 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/sched.h>
 #include <linux/uaccess.h>
 #include <asm/ptrace-abi.h>
+#include <registers.h>
 #include <skas.h>
 
 extern int arch_switch_tls(struct task_struct *to);
index 1401899dee9b2f03da1975e6cd90c933f1cd513a..289d0159b041e246660d16b65e545aa0f9d85f66 100644 (file)
@@ -11,6 +11,7 @@
 #define __FRAME_OFFSETS
 #include <asm/ptrace.h>
 #include <linux/uaccess.h>
+#include <registers.h>
 #include <asm/ptrace-abi.h>
 
 /*
index 7c11c9e5d7eaab730720847a8fe556716858068e..263e1d08f21605f8afe31632fc5f656003e4a06e 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/uaccess.h>
 #include <asm/ucontext.h>
 #include <frame_kern.h>
+#include <registers.h>
 #include <skas.h>
 
 #ifdef CONFIG_X86_32
index e768f54b118ce3c6aada9301dde97e1d1d163344..fe5323f0c42da6a2a81e881d6047357c5ef46a79 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/syscalls.h>
 #include <linux/uaccess.h>
 #include <asm/prctl.h> /* XXX This should get the constants from libc */
+#include <registers.h>
 #include <os.h>
 #include <registers.h>