linux-um archives
 help / color / mirror / Atom feed
From: linuxram@us.ibm.com (Ram Pai)
To: user-mode-linux-devel@lists.sourceforge.net
Subject: [uml-devel] [RFC PATCH] fixes for some compilation errors
Date: Tue, 15 Nov 2005 15:30:06 -0800	[thread overview]
Message-ID: <20051115233006.GA31279@RAM> (raw)

The patches in the patch tarball at
http://user-mode-linux.sf.net/patches.html  for 2.6.15-rc1 kernel do not
apply cleanly.  Its the last patch constant-page-size which has the
issue.  There were some compilation issues too in

arch/um/include/tt/mode_kern_tt.h
arch/um/sys-i386/stub_segv.c
arch/um/kernel/skas/clone.c
arch/um/kernel/tt/process_kern.c

The following patch fixes them, but I am not sure if they are correct
Please check,
RP


 arch/um/include/tt/mode_kern_tt.h |    2 +-
 arch/um/kernel/skas/clone.c       |   12 +++++++-----
 arch/um/sys-i386/stub_segv.c      |    2 +-
 3 files changed, 9 insertions(+), 7 deletions(-)

Index: 2.6.15-rc1/arch/um/include/tt/mode_kern_tt.h
===================================================================
--- 2.6.15-rc1.orig/arch/um/include/tt/mode_kern_tt.h
+++ 2.6.15-rc1/arch/um/include/tt/mode_kern_tt.h
@@ -9,11 +9,11 @@
 #include "linux/sched.h"
 #include "asm/page.h"
 #include "asm/ptrace.h"
 #include "asm/uaccess.h"
 
-extern void *switch_to_tt(void *prev, void *next);
+extern void switch_to_tt(void *prev, void *next);
 extern void flush_thread_tt(void);
 extern void start_thread_tt(struct pt_regs *regs, unsigned long eip,
 			   unsigned long esp);
 extern int copy_thread_tt(int nr, unsigned long clone_flags, unsigned long sp,
 			  unsigned long stack_top, struct task_struct *p,
Index: 2.6.15-rc1/arch/um/sys-i386/stub_segv.c
===================================================================
--- 2.6.15-rc1.orig/arch/um/sys-i386/stub_segv.c
+++ 2.6.15-rc1/arch/um/sys-i386/stub_segv.c
@@ -2,11 +2,11 @@
  * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com)
  * Licensed under the GPL
  */
 
 #include <sys/select.h> /* The only way I can see to get sigset_t */
-#include <asm/signal.h>
+//#include <asm/signal.h>
 #include <asm/unistd.h>
 #include "uml-config.h"
 #include "sysdep/stub.h"
 #include "sysdep/sigcontext.h"
 #include "sysdep/faultinfo.h"
Index: 2.6.15-rc1/arch/um/kernel/skas/clone.c
===================================================================
--- 2.6.15-rc1.orig/arch/um/kernel/skas/clone.c
+++ 2.6.15-rc1/arch/um/kernel/skas/clone.c
@@ -7,10 +7,11 @@
 #include "ptrace_user.h"
 #include "skas.h"
 #include "stub-data.h"
 #include "uml-config.h"
 #include "sysdep/stub.h"
+#include "kern_constants.h"
 
 /* This is in a separate file because it needs to be compiled with any
  * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled
  */
 
@@ -18,29 +19,30 @@
 
 void __attribute__ ((__section__ (".__syscall_stub")))
 stub_clone_handler(void)
 {
 	long err;
+        struct stub_data *from = (struct stub_data *) UML_CONFIG_STUB_DATA;
 
 	err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
-			    UML_CONFIG_STUB_DATA + PAGE_SIZE / 2 -
+			    UML_CONFIG_STUB_DATA + UM_KERN_PAGE_SIZE / 2 -
 			    sizeof(void *));
 	if(err != 0)
 		goto out;
 
 	err = stub_syscall4(__NR_ptrace, PTRACE_TRACEME, 0, 0, 0);
 	if(err)
 		goto out;
 
 	err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
-			    (long) STUB_DATA(timer), 0);
+			    (long) &from->timer, 0);
 	if(err)
 		goto out;
 
-	err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA, PAGE_SIZE,
-			    PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED,
-			    STUB_DATA(fd), STUB_DATA(offset));
+	err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA,
+			    UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,
+			    MAP_FIXED | MAP_SHARED, from->fd, from->offset);
  out:
 	/* save current result. Parent: pid; child: retcode of mmap */
 	STUB_DATA(err) = err;
 	trap_myself();
 }




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

             reply	other threads:[~2005-11-15 23:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-15 23:30 Ram Pai [this message]
2005-11-16  1:23 ` [uml-devel] [RFC PATCH] fixes for some compilation errors Jeff Dike
2005-11-16 10:42   ` Ram Pai
2005-11-16 19:18     ` Jeff Dike
2005-11-17 22:43       ` Ram Pai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051115233006.GA31279@RAM \
    --to=linuxram@us.ibm.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox