All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [patch] restore do_mmap_pgoff() semantics
@ 2003-10-30 15:57 Gerd Knorr
  2003-10-30 16:03 ` [uml-devel] [patch] fixmap fix Gerd Knorr
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Gerd Knorr @ 2003-10-30 15:57 UTC (permalink / raw)
  To: Jeff Dike, uml devel

  Hi,

This patch makes do_mmap_pgoff behave as usual and intruduces a
new __do_mmap_pgoff function with the additional struct mm_struct
argument for the callers which need it.

Point of doing that is to allow a kernel tree with uml patch applied
still build non-uml kernels.

  Gerd

diff -u linux-2.6.0-test3/arch/um/kernel/syscall_kern.c linux/arch/um/kernel/syscall_kern.c
--- linux-2.6.0-test3/arch/um/kernel/syscall_kern.c	2003-08-22 09:41:46.000000000 +0000
+++ linux/arch/um/kernel/syscall_kern.c	2003-08-22 09:42:05.000000000 +0000
@@ -81,7 +81,7 @@
 	}
 
 	down_write(&mm->mmap_sem);
-	error = do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
+	error = __do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
 	up_write(&mm->mmap_sem);
 
 	if (file)
diff -u linux-2.6.0-test3/include/linux/mm.h linux/include/linux/mm.h
--- linux-2.6.0-test3/include/linux/mm.h	2003-08-22 08:36:13.000000000 +0000
+++ linux/include/linux/mm.h	2003-08-22 09:40:09.000000000 +0000
@@ -516,10 +516,18 @@
 
 extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
 
-extern unsigned long do_mmap_pgoff(struct mm_struct *mm, struct file *file, 
-				   unsigned long addr, unsigned long len,
-				   unsigned long prot, unsigned long flag,
-				   unsigned long pgoff);
+extern unsigned long __do_mmap_pgoff(struct mm_struct *mm,
+	struct file *file, unsigned long addr,
+	unsigned long len, unsigned long prot,
+	unsigned long flag, unsigned long pgoff);
+
+static inline unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+	unsigned long len, unsigned long prot,
+	unsigned long flag, unsigned long pgoff)
+{
+	return __do_mmap_pgoff(current->mm, file, addr, len,
+		               prot, flag, pgoff);
+}
 
 static inline unsigned long do_mmap(struct file *file, unsigned long addr,
 	unsigned long len, unsigned long prot,
@@ -529,8 +537,7 @@
 	if ((offset + PAGE_ALIGN(len)) < offset)
 		goto out;
 	if (!(offset & ~PAGE_MASK))
-		ret = do_mmap_pgoff(current->mm, file, addr, len, prot, flag, 
-				    offset >> PAGE_SHIFT);
+		ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT);
 out:
 	return ret;
 }
diff -u linux-2.6.0-test3/mm/mmap.c linux/mm/mmap.c
--- linux-2.6.0-test3/mm/mmap.c	2003-08-22 09:52:40.000000000 +0000
+++ linux/mm/mmap.c	2003-08-22 09:52:48.000000000 +0000
@@ -457,7 +457,7 @@
  * The caller must hold down_write(current->mm->mmap_sem).
  */
 
-unsigned long do_mmap_pgoff(struct mm_struct *mm, struct file * file, 
+unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file * file, 
 			    unsigned long addr, unsigned long len,
 			    unsigned long prot, unsigned long flags,
 			    unsigned long pgoff)


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [uml-devel] [patch] fixmap fix
  2003-10-30 15:57 [uml-devel] [patch] restore do_mmap_pgoff() semantics Gerd Knorr
@ 2003-10-30 16:03 ` Gerd Knorr
  2003-10-30 16:05 ` [uml-devel] [patch] serial console support Gerd Knorr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Gerd Knorr @ 2003-10-30 16:03 UTC (permalink / raw)
  To: Jeff Dike, uml devel

  Hi,

This patch just adds a #ifdef for those archs which don't
have FIXADDR_START defined ...

  Gerd

--- linux-2.6.0-test9/mm/memory.c.fix	2003-10-27 15:53:16.000000000 +0100
+++ linux-2.6.0-test9/mm/memory.c	2003-10-27 15:53:46.000000000 +0100
@@ -682,7 +682,7 @@
 	return page;
 }
 
-
+#ifdef FIXADDR_START
 static struct vm_area_struct fixmap_vma = {
 	/* Catch users - if there are any valid
 	   ones, we can make this be "&init_mm" or
@@ -700,6 +700,7 @@
 }
 
 __initcall(init_fixmap_vma);
+#endif
 
 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
 		unsigned long start, int len, int write, int force,


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [uml-devel] [patch] serial console support
  2003-10-30 15:57 [uml-devel] [patch] restore do_mmap_pgoff() semantics Gerd Knorr
  2003-10-30 16:03 ` [uml-devel] [patch] fixmap fix Gerd Knorr
@ 2003-10-30 16:05 ` Gerd Knorr
  2003-11-08 22:00   ` [uml-devel] " Jeff Dike
  2003-10-30 16:20 ` [uml-devel] [patch] kernel cmd line parser fix Gerd Knorr
  2003-10-30 16:29 ` [uml-devel] [patch] change ubd names Gerd Knorr
  3 siblings, 1 reply; 11+ messages in thread
From: Gerd Knorr @ 2003-10-30 16:05 UTC (permalink / raw)
  To: Jeff Dike, uml devel

  Hi,

This patch adds serial console support to the
uml virtual serial lines.

  Gerd

--- a/arch/um/drivers/ssl.c	2003-08-21 15:29:25.000000000 +0200
+++ b/arch/um/drivers/ssl.c	2003-09-11 13:22:03.000000000 +0200
@@ -10,6 +10,7 @@
 #include "linux/major.h"
 #include "linux/mm.h"
 #include "linux/init.h"
+#include "linux/console.h"
 #include "asm/termbits.h"
 #include "asm/irq.h"
 #include "line.h"
@@ -150,6 +151,8 @@
 	case TCSETSW:
 	case TCGETA:
 	case TIOCMGET:
+	case TCSBRK:
+	case TCSBRKP:
 		ret = -ENOIOCTLCMD;
 		break;
 	default:
@@ -213,6 +216,38 @@
  */
 static int ssl_init_done = 0;
 
+static void ssl_console_write(struct console *c, const char *string, 
+			      unsigned len)
+{
+	struct line *line = &serial_lines[c->index];
+
+	if(ssl_init_done)
+		down(&line->sem);
+	console_write_chan(&line->chan_list, string, len);
+	if(ssl_init_done)
+		up(&line->sem);
+}
+
+static struct tty_driver *ssl_console_device(struct console *c, int *index)
+{
+	*index = c->index;
+	return ssl_driver;
+}
+
+static int ssl_console_setup(struct console *co, char *options)
+{
+	return(0);
+}
+
+static struct console ssl_cons = {
+	name:		"ttyS",
+	write:		ssl_console_write,
+	device:		ssl_console_device,
+	setup:		ssl_console_setup,
+	flags:		CON_PRINTBUFFER,
+	index:		-1,
+};
+
 int ssl_init(void)
 {
 	char *new_title;
@@ -228,6 +263,7 @@
 	new_title = add_xterm_umid(opts.xterm_title);
 	if(new_title != NULL) opts.xterm_title = new_title;
 
+	register_console(&ssl_cons);
 	ssl_init_done = 1;
 	return(0);
 }


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [uml-devel] [patch] kernel cmd line parser fix
  2003-10-30 15:57 [uml-devel] [patch] restore do_mmap_pgoff() semantics Gerd Knorr
  2003-10-30 16:03 ` [uml-devel] [patch] fixmap fix Gerd Knorr
  2003-10-30 16:05 ` [uml-devel] [patch] serial console support Gerd Knorr
@ 2003-10-30 16:20 ` Gerd Knorr
  2003-10-30 16:29 ` [uml-devel] [patch] change ubd names Gerd Knorr
  3 siblings, 0 replies; 11+ messages in thread
From: Gerd Knorr @ 2003-10-30 16:20 UTC (permalink / raw)
  To: Jeff Dike, uml devel

  Hi,

This patch passes up the line_setup return value.  That makes
the kernel try the next __setup() handler in case line_setup
didn't manage to parse the argument, which is especially
important for the "console=ttyS0" argument (which is simply
ignored without this patch).

  Gerd

--- 2.6.0-test9/arch/um/drivers/stdio_console.c.arg	2003-10-30 15:02:53.000000000 +0100
+++ 2.6.0-test9/arch/um/drivers/stdio_console.c	2003-10-30 15:03:30.000000000 +0100
@@ -230,7 +230,8 @@
 
 static int console_chan_setup(char *str)
 {
-	line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1);
+	if (0 != line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1))
+		return 0;
 	return(1);
 }
 


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [uml-devel] [patch] change ubd names
  2003-10-30 15:57 [uml-devel] [patch] restore do_mmap_pgoff() semantics Gerd Knorr
                   ` (2 preceding siblings ...)
  2003-10-30 16:20 ` [uml-devel] [patch] kernel cmd line parser fix Gerd Knorr
@ 2003-10-30 16:29 ` Gerd Knorr
  2003-11-03  2:48   ` Jeff Dike
  3 siblings, 1 reply; 11+ messages in thread
From: Gerd Knorr @ 2003-10-30 16:29 UTC (permalink / raw)
  To: Jeff Dike, uml devel

  Hi,

This patch renames the virtual block devices from ubd0,1,2 to
ubda,b,c (in /proc/partitions).  This is how they are named
in 2.4 kernels.  And this is IMHO better to number devices that
way because (a) hd + sd use the same scheme and (b) it is much
less confusing if you create partitions on your virtual block
devices.

  Gerd

--- 2.6.0-test9/arch/um/drivers/ubd_kern.c.ubd	2003-10-30 12:08:33.000000000 +0100
+++ 2.6.0-test9/arch/um/drivers/ubd_kern.c	2003-10-30 12:09:11.000000000 +0100
@@ -528,7 +528,7 @@
 	disk->fops = &ubd_blops;
 	set_capacity(disk, size / 512);
 	if(major == MAJOR_NR){
-		sprintf(disk->disk_name, "ubd%d", unit);
+		sprintf(disk->disk_name, "ubd%c", 'a' + unit);
 		sprintf(disk->devfs_name, "ubd/disc%d", unit);
 		sprintf(from, "ubd/%d", unit);
 		sprintf(to, "disc%d/disc", unit);


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [uml-devel] [patch] change ubd names
  2003-10-30 16:29 ` [uml-devel] [patch] change ubd names Gerd Knorr
@ 2003-11-03  2:48   ` Jeff Dike
  2003-11-03 16:13     ` Adam Heath
  2003-11-04  8:37     ` Gerd Knorr
  0 siblings, 2 replies; 11+ messages in thread
From: Jeff Dike @ 2003-11-03  2:48 UTC (permalink / raw)
  To: Gerd Knorr; +Cc: uml devel

kraxel@bytesex.org said:
> This patch ....

Mostly, I like these.  But you are going to have to maintain the skas fix
yourself.  I've got skas4 working, which fixes all known issues with skas3,
including the patchability problems.  So, I'm not doing anything with skas3
any more.

If you think you can push that fixmap fix to Linus/Andrew, go right ahead.
Strictly speaking, that's not a UML fix.

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [uml-devel] [patch] change ubd names
  2003-11-03  2:48   ` Jeff Dike
@ 2003-11-03 16:13     ` Adam Heath
  2003-11-03 17:44       ` Jeff Dike
  2003-11-04  8:37     ` Gerd Knorr
  1 sibling, 1 reply; 11+ messages in thread
From: Adam Heath @ 2003-11-03 16:13 UTC (permalink / raw)
  To: Jeff Dike; +Cc: uml devel

On Sun, 2 Nov 2003, Jeff Dike wrote:

> kraxel@bytesex.org said:
> > This patch ....
>
> Mostly, I like these.  But you are going to have to maintain the skas fix
> yourself.  I've got skas4 working, which fixes all known issues with skas3,
> including the patchability problems.  So, I'm not doing anything with skas3
> any more.

Oooh, oooh.

When can the drooling public see skas4?



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [uml-devel] [patch] change ubd names
  2003-11-03 16:13     ` Adam Heath
@ 2003-11-03 17:44       ` Jeff Dike
  2003-11-03 23:00         ` Adam Heath
  0 siblings, 1 reply; 11+ messages in thread
From: Jeff Dike @ 2003-11-03 17:44 UTC (permalink / raw)
  To: Adam Heath; +Cc: uml devel

adam@doogie.org said:
> When can the drooling public see skas4? 

When I figure out what to do about the new system call numbers.

				Jeff



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [uml-devel] [patch] change ubd names
  2003-11-03 17:44       ` Jeff Dike
@ 2003-11-03 23:00         ` Adam Heath
  0 siblings, 0 replies; 11+ messages in thread
From: Adam Heath @ 2003-11-03 23:00 UTC (permalink / raw)
  To: Jeff Dike; +Cc: uml devel

On Mon, 3 Nov 2003, Jeff Dike wrote:

> adam@doogie.org said:
> > When can the drooling public see skas4?
>
> When I figure out what to do about the new system call numbers.

If that's all, I'd like to play with it now.



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [uml-devel] [patch] change ubd names
  2003-11-03  2:48   ` Jeff Dike
  2003-11-03 16:13     ` Adam Heath
@ 2003-11-04  8:37     ` Gerd Knorr
  1 sibling, 0 replies; 11+ messages in thread
From: Gerd Knorr @ 2003-11-04  8:37 UTC (permalink / raw)
  To: Jeff Dike; +Cc: uml devel

> Mostly, I like these.  But you are going to have to maintain the skas fix
> yourself.  I've got skas4 working, which fixes all known issues with skas3,
> including the patchability problems.  So, I'm not doing anything with skas3
> any more.

Fine.

> If you think you can push that fixmap fix to Linus/Andrew, go right ahead.
> Strictly speaking, that's not a UML fix.

Well, the block #ifdef'ed out comes from the -test9 uml patch ...

  Gerd

-- 
You have a new virus in /var/mail/kraxel


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [uml-devel] Re: [patch] serial console support
  2003-10-30 16:05 ` [uml-devel] [patch] serial console support Gerd Knorr
@ 2003-11-08 22:00   ` Jeff Dike
  0 siblings, 0 replies; 11+ messages in thread
From: Jeff Dike @ 2003-11-08 22:00 UTC (permalink / raw)
  To: Gerd Knorr; +Cc: uml devel

kraxel@bytesex.org said:
> This patch adds serial console support to the uml virtual serial
> lines. 

Applied, how do you test it?

BTW, it would be good to take this code, and merge it with its twin in 
stdio_console.c into line.c.  Those drivers are nearly identical, and this
patch makes them more so.

				Jeff



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-11-08 21:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 15:57 [uml-devel] [patch] restore do_mmap_pgoff() semantics Gerd Knorr
2003-10-30 16:03 ` [uml-devel] [patch] fixmap fix Gerd Knorr
2003-10-30 16:05 ` [uml-devel] [patch] serial console support Gerd Knorr
2003-11-08 22:00   ` [uml-devel] " Jeff Dike
2003-10-30 16:20 ` [uml-devel] [patch] kernel cmd line parser fix Gerd Knorr
2003-10-30 16:29 ` [uml-devel] [patch] change ubd names Gerd Knorr
2003-11-03  2:48   ` Jeff Dike
2003-11-03 16:13     ` Adam Heath
2003-11-03 17:44       ` Jeff Dike
2003-11-03 23:00         ` Adam Heath
2003-11-04  8:37     ` Gerd Knorr

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.