linux-um archives
 help / color / mirror / Atom feed
From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Jeff Dike <jdike@addtoit.com>, David Jeffery <djeffery@britsys.net>
Subject: Re: [uml-devel] Unsent fixes by Andrew Morton
Date: Sun, 12 Sep 2004 17:54:27 +0200	[thread overview]
Message-ID: <200409121754.27163.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <20040911182615.GB2966@ccure.user-mode-linux.org>

[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]

On Saturday 11 September 2004 20:26, Jeff Dike wrote:
> > Also, Andrew Morton wrote some UML fixes (for scheduler bugs) on his own.
> > Did you already note this or you want them forwarded?

> I didn't see them, please send them over.

Here is his patch to the SMP code about forking the idle thread, which is only 
one, actually (sched-update).

Also, it seems that there is some other work that you sent to Andrew but 
didn't take to your own tree.

Quoting from changelogs:
"        convert all calls to open_private_file to dentry_open"
"        use the new get_signal_to_deliver interface"

Also, since you decided to define instruction_pointer (which gets the value 
from a pt_regs struct), what about fixing this, too, which is 
include/asm-um/processor-generic.h? 

#define current_text_addr() ((void *) 0)

Here's the i386 one:

It should be in processor-i386.h, because it's impossible to write it in C, 
IMHO:

/*
 * Default implementation of macro that returns current
 * instruction pointer ("program counter").
 */
#define current_text_addr() ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); 
pc; })

If it's Ok for you, apply the second patch. (add-current_text_addr).

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

[-- Attachment #2: uml-sched-update.patch --]
[-- Type: text/x-diff, Size: 1042 bytes --]



Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/um/kernel/smp.c |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -puN arch/um/kernel/smp.c~uml-sched-update arch/um/kernel/smp.c
--- 25/arch/um/kernel/smp.c~uml-sched-update	2004-08-05 22:11:21.564444232 -0700
+++ 25-akpm/arch/um/kernel/smp.c	2004-08-05 22:11:29.870181568 -0700
@@ -148,8 +148,7 @@ static struct task_struct *idle_thread(i
 
         current->thread.request.u.thread.proc = idle_proc;
         current->thread.request.u.thread.arg = (void *) cpu;
-	new_task = copy_process(CLONE_VM | CLONE_IDLETASK, 0, NULL, 0, NULL,
-				NULL);
+	new_task = fork_idle(cpu);
 	if(IS_ERR(new_task))
 		panic("copy_process failed in idle_thread, error = %ld",
 		      PTR_ERR(new_task));
@@ -161,7 +160,6 @@ static struct task_struct *idle_thread(i
 	CHOOSE_MODE(os_write_file(new_task->thread.mode.tt.switch_pipe[1], &c,
 			  sizeof(c)),
 		    ({ panic("skas mode doesn't support SMP"); }));
-	wake_up_forked_process(new_task);
 	return(new_task);
 }
 
_

[-- Attachment #3: uml-add-current_text_addr.patch --]
[-- Type: text/x-diff, Size: 1435 bytes --]



Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
---

 uml-linux-2.6.8.1-paolo/include/asm-um/processor-generic.h |    2 --
 uml-linux-2.6.8.1-paolo/include/asm-um/processor-i386.h    |    7 +++++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff -puN include/asm-um/processor-i386.h~uml-add-current_text_addr include/asm-um/processor-i386.h
--- uml-linux-2.6.8.1/include/asm-um/processor-i386.h~uml-add-current_text_addr	2004-09-12 17:48:20.172530912 +0200
+++ uml-linux-2.6.8.1-paolo/include/asm-um/processor-i386.h	2004-09-12 17:49:37.853721576 +0200
@@ -19,6 +19,13 @@ struct arch_thread {
 
 #include "asm/arch/user.h"
 
+/*
+ * Default implementation of macro that returns current
+ * instruction pointer ("program counter"). Stolen
+ * from asm-i386/processor.h
+ */
+#define current_text_addr() ({ void *pc; __asm__("movl $1f,%0\n1:":"=g" (pc)); pc; })
+
 #include "asm/processor-generic.h"
 
 #endif
diff -puN include/asm-um/processor-generic.h~uml-add-current_text_addr include/asm-um/processor-generic.h
--- uml-linux-2.6.8.1/include/asm-um/processor-generic.h~uml-add-current_text_addr	2004-09-12 17:49:26.244486448 +0200
+++ uml-linux-2.6.8.1-paolo/include/asm-um/processor-generic.h	2004-09-12 17:49:39.374490384 +0200
@@ -16,8 +16,6 @@ struct task_struct;
 
 struct mm_struct;
 
-#define current_text_addr() ((void *) 0)
-
 #define cpu_relax()   barrier()
 
 struct thread_struct {
_

      parent reply	other threads:[~2004-09-12 17:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26  2:06 [uml-devel] [PATCH] nptl/sys_clone fix for i386/ppc David Jeffery
2004-09-05 15:35 ` BlaisorBlade
2004-09-07 23:12 ` Michael Ralston
2004-09-10 23:52 ` Jeff Dike
2004-09-11 13:33   ` [uml-devel] " Sven Köhler
2004-09-11 14:18     ` Ralph Paßgang
2004-09-11 15:19     ` BlaisorBlade
2004-09-11 20:11       ` Sven Köhler
2004-09-12 18:19         ` BlaisorBlade
2004-09-11 15:45   ` [uml-devel] " BlaisorBlade
2004-09-11 18:26     ` Jeff Dike
2004-09-12 15:52       ` BlaisorBlade
2004-09-13  3:10         ` Jeff Dike
2004-09-13 18:50           ` BlaisorBlade
2004-09-12 15:54       ` BlaisorBlade [this message]

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=200409121754.27163.blaisorblade_spam@yahoo.it \
    --to=blaisorblade_spam@yahoo.it \
    --cc=djeffery@britsys.net \
    --cc=jdike@addtoit.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