mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: blaisorblade_spam@yahoo.it
To: akpm@osdl.org
Cc: jdike@addtoit.com, linux-kernel@vger.kernel.org,
	user-mode-linux-devel@lists.sourceforge.net,
	blaisorblade_spam@yahoo.it, sonny@burdell.org
Subject: [patch 1/2] uml-patch-smp-compile
Date: Fri, 10 Sep 2004 19:15:40 +0200	[thread overview]
Message-ID: <20040910171541.09134C751@zion.localdomain> (raw)


From: Sonny Rao <sonny@burdell.org>
Make the SMP code compile, at least, to make testing possible, and remove
its dependency on CONFIG_BROKEN.

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

 uml-linux-2.6.8.1-paolo/arch/um/Kconfig           |    1 -
 uml-linux-2.6.8.1-paolo/arch/um/kernel/smp.c      |    8 +++++++-
 uml-linux-2.6.8.1-paolo/include/asm-um/smp.h      |    2 ++
 uml-linux-2.6.8.1-paolo/include/asm-um/spinlock.h |    6 ++++++
 4 files changed, 15 insertions(+), 2 deletions(-)

diff -puN arch/um/kernel/smp.c~uml-patch-smp-compile arch/um/kernel/smp.c
--- uml-linux-2.6.8.1/arch/um/kernel/smp.c~uml-patch-smp-compile	2004-08-29 14:40:54.845873936 +0200
+++ uml-linux-2.6.8.1-paolo/arch/um/kernel/smp.c	2004-08-29 14:40:54.849873328 +0200
@@ -29,9 +29,11 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_ga
 #include "os.h"
 
 /* CPU online map, set by smp_boot_cpus */
-unsigned long cpu_online_map = CPU_MASK_NONE;
+cpumask_t cpu_online_map = CPU_MASK_NONE;
+cpumask_t cpu_possible_map = CPU_MASK_NONE;
 
 EXPORT_SYMBOL(cpu_online_map);
+EXPORT_SYMBOL(cpu_possible_map);
 
 /* Per CPU bogomips and other parameters
  * The only piece used here is the ipi pipe, which is set before SMP is
@@ -126,6 +128,10 @@ void smp_prepare_cpus(unsigned int maxcp
 	struct task_struct *idle;
 	unsigned long waittime;
 	int err, cpu, me = smp_processor_id();
+	int i;
+
+	for (i = 0; i < ncpus; ++i)
+		cpu_set(i, cpu_possible_map);
 
 	cpu_clear(me, cpu_online_map);
 	cpu_set(me, cpu_online_map);
diff -puN include/asm-um/smp.h~uml-patch-smp-compile include/asm-um/smp.h
--- uml-linux-2.6.8.1/include/asm-um/smp.h~uml-patch-smp-compile	2004-08-29 14:40:54.846873784 +0200
+++ uml-linux-2.6.8.1-paolo/include/asm-um/smp.h	2004-08-29 14:40:54.850873176 +0200
@@ -9,6 +9,8 @@
 #include "linux/cpumask.h"
 
 extern cpumask_t cpu_online_map;
+extern cpumask_t cpu_possible_map;
+
 
 #define smp_processor_id() (current_thread->cpu)
 #define cpu_logical_map(n) (n)
diff -puN /dev/null include/asm-um/spinlock.h
--- /dev/null	2004-06-25 17:47:25.000000000 +0200
+++ uml-linux-2.6.8.1-paolo/include/asm-um/spinlock.h	2004-08-29 14:40:54.850873176 +0200
@@ -0,0 +1,6 @@
+#ifndef __UM_SPINLOCK_H
+#define __UM_SPINLOCK_H
+
+#include "asm/arch/spinlock.h"
+
+#endif
diff -puN arch/um/Kconfig~uml-patch-smp-compile arch/um/Kconfig
--- uml-linux-2.6.8.1/arch/um/Kconfig~uml-patch-smp-compile	2004-08-29 14:40:54.847873632 +0200
+++ uml-linux-2.6.8.1-paolo/arch/um/Kconfig	2004-08-29 14:40:54.850873176 +0200
@@ -155,7 +155,6 @@ config HOST_2G_2G
 
 config UML_SMP
 	bool "Symmetric multi-processing support"
-	depends on BROKEN
 	help
         This option enables UML SMP support.  UML implements virtual SMP by
         allowing as many processes to run simultaneously on the host as
_

                 reply	other threads:[~2004-09-10 18:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040910171541.09134C751@zion.localdomain \
    --to=blaisorblade_spam@yahoo.it \
    --cc=akpm@osdl.org \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sonny@burdell.org \
    --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

all inboxes | Powered by JetHome®