linux-um archives
 help / color / mirror / Atom feed
From: BlaisorBlade <blaisorblade_spam@yahoo.it>
To: Josef 'Jeff' Sipek <jeffpc@optonline.net>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [patch] 2.6 uml & CONFIG_SMP fix
Date: Fri, 6 Feb 2004 20:51:54 +0100	[thread overview]
Message-ID: <200402062051.54602.blaisorblade_spam@yahoo.it> (raw)
In-Reply-To: <200402041926.39098.jeffpc@optonline.net>

Alle 01:26, giovedì 5 febbraio 2004, Josef 'Jeff' Sipek ha scritto:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
> 	yesterday, I finally got around to fixing the code. Right now, it
> compiles, but there are some warnings that I didn't take a look at.
> This patch makes it compile with CONFIG_SMP, nothing more.
> I tested the resulting binary, and it works well in tt (I did NOT test
> skas.)
>
> You should be able to pull the patch from
> http://kernel.bkbits.net:14690/jeffpc/uml-smp/ (I think that pulling via
> web is not working, I'll check later.)
>
> Jeff.

Without and with your patch, these warnings appear; they are some TODO needed 
to make SMP work actually.

arch/um/kernel/skas/process.c:372:2:
warning: #warning need cpu pid in switch_mm_skas

arch/um/kernel/skas/process.c:381:2:
warning: #warning need to loop over userspace_pids in kill_off_processes_skas

arch/um/kernel/skas/process_kern.c:179:2:
warning: #warning Need to look up userspace_pid by cpu

arch/um/kernel/skas/process_kern.c:185:2:
warning: #warning Need to look up userspace_pid by cpu

also, at arch/um/kernel/skas/process.c:98, NR_CPUS is defined as being 1, 
which actually disables SMP even with CONFIG_SMP enabled. If you try to 
change NR_CPUS to more than 1, you'll probably see (I guess since you also 
need to change some other code) that:
- more "kernel thread" should appear (thus 
- until you fix the code marked with those warning, the kernel will not work 
well. If you don't succeed in this. For now those warning don't hurt because 
SMP is not *actually* enabled.

But do not directly change that: NR_CPUS in the UML kernel comes from a lot of 
different sources that assign to it different values: mainly 
/usr/include/linux/threads.h and <source tree>/include/linux/threads.h and 
arch/um/kernel/skas/process.c. And they all disagree. I.e. kern_util includes 
"linux/threads.h", but depending on the file it is included in it includes 
the system version (/usr/include) or the kernel version - and this cannot 
change. Please fix that - copy the relevant lines from <source 
tree>/include/linux/threads.h to kern_util.h.

> diff -Nru a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
> - --- a/arch/um/kernel/irq.c	Tue Feb  3 21:48:38 2004
> +++ b/arch/um/kernel/irq.c	Tue Feb  3 21:48:38 2004
> @@ -584,7 +584,7 @@
>  					unsigned long count, void *data)
>  {
>  	int irq = (long) data, full_count = count, err;
> - -	cpumask_t new_value;
> +	cpumask_t new_value, tmp;
>
>  	if (!irq_desc[irq].handler->set_affinity)
>  		return -EIO;

That was removed because without CONFIG_SMP that is unused. So, give a look at 
arch/i386/kernel/irq.c and move the #ifdef CONFIG_SMP to the outer location 
(so to be around the whole irq_affinity_write_proc + the other similar 
stuff). If you have the time, there is a lot of other code to resync in those 
two files. Even moving the Uml specific stuff to another file and make the 
i386 work for both arch's (with proper #ifdef's, and remembering that it was 
*mostly copied*) would be very nice probably (there is a trick in the 
Makefiles to symlink files from other archs, like in the header you symlink).

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



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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:[~2004-02-07 15:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-05  0:26 [uml-devel] [patch] 2.6 uml & CONFIG_SMP fix Josef 'Jeff' Sipek
2004-02-06 19:51 ` BlaisorBlade [this message]
2004-02-12 18:53 ` [uml-devel] " Jeff Dike
2004-02-14  2:15   ` Jeff Sipek

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=200402062051.54602.blaisorblade_spam@yahoo.it \
    --to=blaisorblade_spam@yahoo.it \
    --cc=jeffpc@optonline.net \
    --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