All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [patch] 2.6 uml & CONFIG_SMP fix
@ 2004-02-05  0:26 Josef 'Jeff' Sipek
  2004-02-06 19:51 ` BlaisorBlade
  2004-02-12 18:53 ` [uml-devel] " Jeff Dike
  0 siblings, 2 replies; 4+ messages in thread
From: Josef 'Jeff' Sipek @ 2004-02-05  0:26 UTC (permalink / raw)
  To: jdike; +Cc: user-mode-linux-devel

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

diff -Nru a/arch/um/Makefile b/arch/um/Makefile
- --- a/arch/um/Makefile	Tue Feb  3 21:48:38 2004
+++ b/arch/um/Makefile	Tue Feb  3 21:48:38 2004
@@ -170,7 +170,7 @@
 	ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@)
 
 include/asm-um/arch:
- -	cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch
+	cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch && ln -sf arch/spinlock.h
 
 $(ARCH_DIR)/include/sysdep:
 	cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep
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;


- -- 
"Intellectuals solve problems; geniuses prevent them"
		- Albert Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAIY28wFP0+seVj/4RAr8dAKCrYt3JZg+cFUIoKGVNpgxX9pGuqwCfUFsM
vsjhr3DJcTBwzxkMwFNR+OU=
=GXuF
-----END PGP SIGNATURE-----



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

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

* Re: [uml-devel] [patch] 2.6 uml & CONFIG_SMP fix
  2004-02-05  0:26 [uml-devel] [patch] 2.6 uml & CONFIG_SMP fix Josef 'Jeff' Sipek
@ 2004-02-06 19:51 ` BlaisorBlade
  2004-02-12 18:53 ` [uml-devel] " Jeff Dike
  1 sibling, 0 replies; 4+ messages in thread
From: BlaisorBlade @ 2004-02-06 19:51 UTC (permalink / raw)
  To: Josef 'Jeff' Sipek; +Cc: user-mode-linux-devel

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

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

* [uml-devel] Re: [patch] 2.6 uml & CONFIG_SMP fix
  2004-02-05  0:26 [uml-devel] [patch] 2.6 uml & CONFIG_SMP fix Josef 'Jeff' Sipek
  2004-02-06 19:51 ` BlaisorBlade
@ 2004-02-12 18:53 ` Jeff Dike
  2004-02-14  2:15   ` Jeff Sipek
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Dike @ 2004-02-12 18:53 UTC (permalink / raw)
  To: Josef 'Jeff' Sipek; +Cc: user-mode-linux-devel

On Wed, Feb 04, 2004 at 07:26:29PM -0500, Josef 'Jeff' Sipek wrote:
> 	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.) 
> 

Applied, thanks.  The spinlock.h part wasn't exactly right - the thing to
do was create one that just includes the arch spinlock.h.  Although, I'm
not sure that symlinks are a bad idea in the case of those trivial headers.

				Jeff


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&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

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

* [uml-devel] Re: [patch] 2.6 uml & CONFIG_SMP fix
  2004-02-12 18:53 ` [uml-devel] " Jeff Dike
@ 2004-02-14  2:15   ` Jeff Sipek
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Sipek @ 2004-02-14  2:15 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 12 February 2004 13:53, Jeff Dike wrote:
> Applied, thanks.  The spinlock.h part wasn't exactly right - the thing to
> do was create one that just includes the arch spinlock.h.  Although, I'm
> not sure that symlinks are a bad idea in the case of those trivial headers.

That was a quick fix to make it compile. I have the next 9 days off, so I'll 
spend some quality time with the kernel :-)

Jeff.

- -- 
Please avoid sending me Word or PowerPoint attachments.
 See http://www.fsf.org/philosophy/no-word-attachments.html 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFALYSzwFP0+seVj/4RAnCEAJ48X2ZFFolqeCQTsV+iakquJMHBMwCdGpUB
r3rJMI3cJFXLEzy/3EFwWN8=
=LkAi
-----END PGP SIGNATURE-----



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&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

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

end of thread, other threads:[~2004-02-14  2:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-05  0:26 [uml-devel] [patch] 2.6 uml & CONFIG_SMP fix Josef 'Jeff' Sipek
2004-02-06 19:51 ` BlaisorBlade
2004-02-12 18:53 ` [uml-devel] " Jeff Dike
2004-02-14  2:15   ` Jeff Sipek

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.