Skip to contentSkip to conversation

UML - Move headers to arch/um/include

PATCH In review Jeff Dike 1 participant 1 message Jan 15, 2006 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 5/11 UML - Move headers to arch/um/include

From: Gennady Sharapov <[email protected]>

The serial UML OS-abstraction layer patch (um/kernel dir).

This moves skas headers to arch/um/include.

arch/um/Makefile +1 -1
Index: linux-2.6.15-mm/arch/um/Makefile
===================================================================
@@ -32,7 +32,7 @@ um-modes-$(CONFIG_MODE_TT) += tt
 um-modes-$(CONFIG_MODE_SKAS) += skas
 
 MODE_INCLUDE	+= $(foreach mode,$(um-modes-y),\
-		   -I$(srctree)/$(ARCH_DIR)/kernel/$(mode)/include)
+		   -I$(srctree)/$(ARCH_DIR)/include/$(mode))
 
 MAKEFILES-INCL	+= $(foreach mode,$(um-modes-y),\
 		   $(srctree)/$(ARCH_DIR)/Makefile-$(mode))
arch/um/include/skas/mm_id.h new file +17 -0
Index: linux-2.6.15-mm/arch/um/include/skas/mm_id.h
===================================================================
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2005 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __MM_ID_H
+#define __MM_ID_H
+
+struct mm_id {
+	union {
+		int mm_fd;
+		int pid;
+	} u;
+	unsigned long stack;
+};
+
+#endif
arch/um/include/skas/mmu-skas.h new file +24 -0
Index: linux-2.6.15-mm/arch/um/include/skas/mmu-skas.h
===================================================================
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2002 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __SKAS_MMU_H
+#define __SKAS_MMU_H
+
+#include "linux/config.h"
+#include "mm_id.h"
+#include "asm/ldt.h"
+
+struct mmu_context_skas {
+	struct mm_id id;
+	unsigned long last_page_table;
+#ifdef CONFIG_3_LEVEL_PGTABLES
+	unsigned long last_pmd;
+#endif
+	uml_ldt_t ldt;
+};
+
+extern void switch_mm_skas(struct mm_id * mm_idp);
+
+#endif
arch/um/include/skas/mode-skas.h new file +22 -0
Index: linux-2.6.15-mm/arch/um/include/skas/mode-skas.h
===================================================================
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2002 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __MODE_SKAS_H__
+#define __MODE_SKAS_H__
+
+#include <sysdep/ptrace.h>
+
+extern unsigned long exec_regs[];
+extern unsigned long exec_fp_regs[];
+extern unsigned long exec_fpx_regs[];
+extern int have_fpx_regs;
+
+extern void sig_handler_common_skas(int sig, void *sc_ptr);
+extern void halt_skas(void);
+extern void reboot_skas(void);
+extern void kill_off_processes_skas(void);
+extern int is_skas_winch(int pid, int fd, void *data);
+
+#endif
arch/um/include/skas/mode_kern_skas.h new file +41 -0

41 lines not on this page · raw message

arch/um/include/skas/proc_mm.h new file +44 -0

44 lines not on this page · raw message

arch/um/include/skas/skas.h new file +49 -0

49 lines not on this page · raw message

arch/um/include/skas/stub-data.h new file +18 -0
Index: linux-2.6.15-mm/arch/um/include/skas/stub-data.h
===================================================================
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2005 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __STUB_DATA_H
+#define __STUB_DATA_H
+
+#include <sys/time.h>
+
+struct stub_data {
+	long offset;
+	int fd;
+	struct itimerval timer;
+	long err;
+};
+
+#endif
arch/um/include/skas/uaccess-skas.h new file +21 -0
Index: linux-2.6.15-mm/arch/um/include/skas/uaccess-skas.h
===================================================================
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2002 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __SKAS_UACCESS_H
+#define __SKAS_UACCESS_H
+
+#include "asm/errno.h"
+
+/* No SKAS-specific checking. */
+#define access_ok_skas(type, addr, size) 0
+
+extern int copy_from_user_skas(void *to, const void __user *from, int n);
+extern int copy_to_user_skas(void __user *to, const void *from, int n);
+extern int strncpy_from_user_skas(char *dst, const char __user *src, int count);
+extern int __clear_user_skas(void __user *mem, int len);
+extern int clear_user_skas(void __user *mem, int len);
+extern int strnlen_user_skas(const void __user *str, int len);
+
+#endif
arch/um/include/tt/debug.h new file +18 -0
Index: linux-2.6.15-mm/arch/um/include/tt/debug.h
===================================================================
@@ -0,0 +1,18 @@
+/*
+ * Copyright (C) 2000, 2001, 2002  Jeff Dike ([email protected]) and
+ * Lars Brinkhoff.
+ * Licensed under the GPL
+ */
+
+#ifndef __UML_TT_DEBUG_H
+#define __UML_TT_DEBUG_H
+
+extern int debugger_proxy(int status, pid_t pid);
+extern void child_proxy(pid_t pid, int status);
+extern void init_proxy (pid_t pid, int waiting, int status);
+extern int start_debugger(char *prog, int startup, int stop, int *debugger_fd);
+extern void fake_child_exit(void);
+extern int gdb_config(char *str);
+extern int gdb_remove(int unused);
+
+#endif
arch/um/include/tt/mmu-tt.h new file +12 -0
Index: linux-2.6.15-mm/arch/um/include/tt/mmu-tt.h
===================================================================
@@ -0,0 +1,12 @@
+/*
+ * Copyright (C) 2002 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __TT_MMU_H
+#define __TT_MMU_H
+
+struct mmu_context_tt {
+};
+
+#endif
arch/um/include/tt/mode-tt.h new file +23 -0
Index: linux-2.6.15-mm/arch/um/include/tt/mode-tt.h
===================================================================
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2002 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __MODE_TT_H__
+#define __MODE_TT_H__
+
+#include "sysdep/ptrace.h"
+
+enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB };
+
+extern int tracing_pid;
+
+extern int tracer(int (*init_proc)(void *), void *sp);
+extern void sig_handler_common_tt(int sig, void *sc);
+extern void syscall_handler_tt(int sig, union uml_pt_regs *regs);
+extern void reboot_tt(void);
+extern void halt_tt(void);
+extern int is_tracer_winch(int pid, int fd, void *data);
+extern void kill_off_processes_tt(void);
+
+#endif
arch/um/include/tt/mode_kern_tt.h new file +41 -0

41 lines not on this page · raw message

arch/um/include/tt/tt.h new file +36 -0
Index: linux-2.6.15-mm/arch/um/include/tt/tt.h
===================================================================
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2002 Jeff Dike ([email protected])
+ * Licensed under the GPL
+ */
+
+#ifndef __TT_H__
+#define __TT_H__
+
+#include "sysdep/ptrace.h"
+
+extern int gdb_pid;
+extern int debug;
+extern int debug_stop;
+extern int debug_trace;
+
+extern int honeypot;
+
+extern int fork_tramp(void *sig_stack);
+extern int do_proc_op(void *t, int proc_id);
+extern int tracer(int (*init_proc)(void *), void *sp);
+extern void attach_process(int pid);
+extern void tracer_panic(char *format, ...);
+extern void set_init_pid(int pid);
+extern int set_user_mode(void *task);
+extern void set_tracing(void *t, int tracing);
+extern int is_tracing(void *task);
+extern void syscall_handler(int sig, union uml_pt_regs *regs);
+extern void exit_kernel(int pid, void *task);
+extern void do_syscall(void *task, int pid, int local_using_sysemu);
+extern void do_sigtrap(void *task);
+extern int is_valid_pid(int pid);
+extern void remap_data(void *segment_start, void *segment_end, int w);
+extern long execute_syscall_tt(void *r);
+
+#endif
+
arch/um/include/tt/uaccess-tt.h new file +48 -0

48 lines not on this page · raw message

arch/um/kernel/skas/include/mm_id.h deleted +0 -17
Index: linux-2.6.15-mm/arch/um/kernel/skas/include/mm_id.h
===================================================================
@@ -1,17 +0,0 @@
-/*
- * Copyright (C) 2005 Jeff Dike ([email protected])
- * Licensed under the GPL
- */
-
-#ifndef __MM_ID_H
-#define __MM_ID_H
-
-struct mm_id {
-	union {
-		int mm_fd;
-		int pid;
-	} u;
-	unsigned long stack;
-};
-
-#endif
arch/um/kernel/skas/include/mmu-skas.h deleted +0 -35
Index: linux-2.6.15-mm/arch/um/kernel/skas/include/mmu-skas.h
===================================================================
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2002 Jeff Dike ([email protected])
- * Licensed under the GPL
- */
-
-#ifndef __SKAS_MMU_H
-#define __SKAS_MMU_H
-
-#include "linux/config.h"
-#include "mm_id.h"
-#include "asm/ldt.h"
-
-struct mmu_context_skas {
-	struct mm_id id;
-        unsigned long last_page_table;
-#ifdef CONFIG_3_LEVEL_PGTABLES
-        unsigned long last_pmd;
-#endif
-	uml_ldt_t ldt;
-};
-
-extern void switch_mm_skas(struct mm_id * mm_idp);
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
arch/um/kernel/skas/include/mode-skas.h deleted +0 -33
Index: linux-2.6.15-mm/arch/um/kernel/skas/include/mode-skas.h
===================================================================
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2002 Jeff Dike ([email protected])
- * Licensed under the GPL
- */
-
-#ifndef __MODE_SKAS_H__
-#define __MODE_SKAS_H__
-
-#include <sysdep/ptrace.h>
-
-extern unsigned long exec_regs[];
-extern unsigned long exec_fp_regs[];
-extern unsigned long exec_fpx_regs[];
-extern int have_fpx_regs;
-
-extern void sig_handler_common_skas(int sig, void *sc_ptr);
-extern void halt_skas(void);
-extern void reboot_skas(void);
-extern void kill_off_processes_skas(void);
-extern int is_skas_winch(int pid, int fd, void *data);
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
arch/um/kernel/skas/include/proc_mm.h deleted +0 -55

55 lines not on this page · raw message

arch/um/kernel/skas/include/skas.h deleted +0 -49

49 lines not on this page · raw message

arch/um/kernel/skas/include/stub-data.h deleted +0 -18
Index: linux-2.6.15-mm/arch/um/kernel/skas/include/stub-data.h
===================================================================
@@ -1,18 +0,0 @@
-/*
- * Copyright (C) 2005 Jeff Dike ([email protected])
- * Licensed under the GPL
- */
-
-#ifndef __STUB_DATA_H
-#define __STUB_DATA_H
-
-#include <sys/time.h>
-
-struct stub_data {
-	long offset;
-	int fd;
-	struct itimerval timer;
-	long err;
-};
-
-#endif
arch/um/kernel/skas/include/uaccess-skas.h deleted +0 -32
Index: linux-2.6.15-mm/arch/um/kernel/skas/include/uaccess-skas.h
===================================================================
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2002 Jeff Dike ([email protected])
- * Licensed under the GPL
- */
-
-#ifndef __SKAS_UACCESS_H
-#define __SKAS_UACCESS_H
-
-#include "asm/errno.h"
-
-/* No SKAS-specific checking. */
-#define access_ok_skas(type, addr, size) 0
-
-extern int copy_from_user_skas(void *to, const void __user *from, int n);
-extern int copy_to_user_skas(void __user *to, const void *from, int n);
-extern int strncpy_from_user_skas(char *dst, const char __user *src, int count);
-extern int __clear_user_skas(void __user *mem, int len);
-extern int clear_user_skas(void __user *mem, int len);
-extern int strnlen_user_skas(const void __user *str, int len);
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
arch/um/kernel/tt/include/debug.h deleted +0 -18
Index: linux-2.6.15-mm/arch/um/kernel/tt/include/debug.h
===================================================================
@@ -1,18 +0,0 @@
-/* 
- * Copyright (C) 2000, 2001, 2002  Jeff Dike ([email protected]) and
- * Lars Brinkhoff.
- * Licensed under the GPL
- */
-
-#ifndef __UML_TT_DEBUG_H
-#define __UML_TT_DEBUG_H
-
-extern int debugger_proxy(int status, pid_t pid);
-extern void child_proxy(pid_t pid, int status);
-extern void init_proxy (pid_t pid, int waiting, int status);
-extern int start_debugger(char *prog, int startup, int stop, int *debugger_fd);
-extern void fake_child_exit(void);
-extern int gdb_config(char *str);
-extern int gdb_remove(int unused);
-
-#endif
arch/um/kernel/tt/include/mmu-tt.h deleted +0 -23
Index: linux-2.6.15-mm/arch/um/kernel/tt/include/mmu-tt.h
===================================================================
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2002 Jeff Dike ([email protected])
- * Licensed under the GPL
- */
-
-#ifndef __TT_MMU_H
-#define __TT_MMU_H
-
-struct mmu_context_tt {
-};
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
arch/um/kernel/tt/include/tt.h deleted +0 -46

46 lines not on this page · raw message

arch/um/kernel/tt/include/uaccess-tt.h deleted +0 -59

59 lines not on this page · raw message

arch/um/kernel/skas/include/mode_kern-skas.h deleted +0 -52

52 lines not on this page · raw message

arch/um/include/mode_kern.h +2 -13
Index: linux-2.6.15-mm/arch/um/include/mode_kern.h
===================================================================
@@ -9,22 +9,11 @@
 #include "linux/config.h"
 
 #ifdef CONFIG_MODE_TT
-#include "mode_kern-tt.h"
+#include "mode_kern_tt.h"
 #endif
 
 #ifdef CONFIG_MODE_SKAS
-#include "mode_kern-skas.h"
+#include "mode_kern_skas.h"
 #endif
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel