Skip to contentSkip to conversation

UML - Move libc-dependent skas memory mapping code

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 6/11 UML - Move libc-dependent skas memory mapping code

From: Gennady Sharapov <[email protected]>

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

This moves all systemcalls from skas/mem_user.c file under os-Linux dir and join skas/mem_user.c and skas/mem.c files.

arch/um/include/os.h +17 -0
Index: linux-2.6.15-mm/arch/um/include/os.h
===================================================================
@@ -11,6 +11,7 @@
 #include "../os/include/file.h"
 #include "sysdep/ptrace.h"
 #include "kern_util.h"
+#include "skas/mm_id.h"
 
 #define OS_TYPE_FILE 1 
 #define OS_TYPE_DIR 2 
@@ -255,4 +256,20 @@ extern void user_time_init(void);
 extern void uml_idle_timer(void);
 extern unsigned long long os_nsecs(void);
 
+/* skas/mem.c */
+extern long run_syscall_stub(struct mm_id * mm_idp,
+			     int syscall, unsigned long *args, long expected,
+			     void **addr, int done);
+extern long syscall_stub_data(struct mm_id * mm_idp,
+			      unsigned long *data, int data_count,
+			      void **addr, void **stub_addr);
+extern int map(struct mm_id * mm_idp, unsigned long virt,
+	       unsigned long len, int r, int w, int x, int phys_fd,
+	       unsigned long long offset, int done, void **data);
+extern int unmap(struct mm_id * mm_idp, void *addr, unsigned long len,
+		 int done, void **data);
+extern int protect(struct mm_id * mm_idp, unsigned long addr,
+		   unsigned long len, int r, int w, int x, int done,
+		   void **data);
+
 #endif
arch/um/include/skas/skas.h +0 -14
Index: linux-2.6.15-mm/arch/um/include/skas/skas.h
===================================================================
@@ -24,14 +24,6 @@ extern void userspace(union uml_pt_regs 
 extern void new_thread_proc(void *stack, void (*handler)(int sig));
 extern void new_thread_handler(int sig);
 extern void handle_syscall(union uml_pt_regs *regs);
-extern int map(struct mm_id * mm_idp, unsigned long virt,
-	       unsigned long len, int r, int w, int x, int phys_fd,
-	       unsigned long long offset, int done, void **data);
-extern int unmap(struct mm_id * mm_idp, void *addr, unsigned long len,
-		 int done, void **data);
-extern int protect(struct mm_id * mm_idp, unsigned long addr,
-		   unsigned long len, int r, int w, int x, int done,
-		   void **data);
 extern void user_signal(int sig, union uml_pt_regs *regs, int pid);
 extern int new_mm(unsigned long stack);
 extern int start_userspace(unsigned long stub_stack);
@@ -39,11 +31,5 @@ extern int copy_context_skas0(unsigned l
 extern void get_skas_faultinfo(int pid, struct faultinfo * fi);
 extern long execute_syscall_skas(void *r);
 extern unsigned long current_stub_stack(void);
-extern long run_syscall_stub(struct mm_id * mm_idp,
-			     int syscall, unsigned long *args, long expected,
-			     void **addr, int done);
-extern long syscall_stub_data(struct mm_id * mm_idp,
-			      unsigned long *data, int data_count,
-			      void **addr, void **stub_addr);
 
 #endif
arch/um/kernel/skas/Makefile +2 -2
Index: linux-2.6.15-mm/arch/um/kernel/skas/Makefile
===================================================================
@@ -1,9 +1,9 @@
-# 
+#
 # Copyright (C) 2002 - 2004 Jeff Dike ([email protected])
 # Licensed under the GPL
 #
 
-obj-y := clone.o exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \
+obj-y := clone.o exec_kern.o mem.o mmu.o process.o process_kern.o \
 	syscall.o tlb.o uaccess.o
 
 USER_OBJS := process.o clone.o
arch/um/kernel/skas/mem_user.c deleted +0 -281

281 lines not on this page · raw message

arch/um/os-Linux/skas/Makefile +2 -2
Index: linux-2.6.15-mm/arch/um/os-Linux/skas/Makefile
===================================================================
@@ -3,8 +3,8 @@
 # Licensed under the GPL
 #
 
-obj-y := trap.o
+obj-y := mem.o trap.o
 
-USER_OBJS := trap.o
+USER_OBJS := mem.o trap.o
 
 include arch/um/scripts/Makefile.rules
arch/um/os-Linux/skas/mem.c new file +283 -0

283 lines not on this page · raw message

-------------------------------------------------------
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