WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] 2.6.11-rc2 SMP fixes

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] 2.6.11-rc2 SMP fixes
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Mon, 31 Jan 2005 15:33:54 -0500 (EST)
Delivery-date: Mon, 31 Jan 2005 20:36:14 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
This small patch was needed to make the xenU kernel compile
and boot in SMP mode.  There are a number of run-time warnings
left, which I will tackle later.

Signed-off-by: Rik van Riel <riel@xxxxxxxxxx>

--- linux-2.6.10/arch/xen/i386/kernel/smpboot.c.xensmp  2005-01-31 
15:32:11.260228265 -0500
+++ linux-2.6.10/arch/xen/i386/kernel/smpboot.c 2005-01-31 14:04:09.300916781 
-0500
@@ -437,9 +437,6 @@

 int cpucount;

-extern int cpu_idle(void);
-
-
 static irqreturn_t local_debug_interrupt(int irq, void *dev_id,
                                         struct pt_regs *regs)
 {
@@ -496,7 +493,9 @@
                        }
                }
        }
-       return cpu_idle();
+       cpu_idle();
+       /* Unreached, cpu_idle() never returns. */
+       return -1;
 }

 /*
--- linux-2.6.10/include/asm-xen/asm-i386/spinlock.h.xensmp     2005-01-31 
14:18:33.000000000 -0500
+++ linux-2.6.10/include/asm-xen/asm-i386/spinlock.h    2005-01-31 
14:19:54.693968423 -0500
@@ -212,6 +212,16 @@
 #define _raw_read_unlock(rw)           asm volatile("lock ; incl %0" :"=m" ((rw)->lock) 
: : "memory")
 #define _raw_write_unlock(rw)  asm volatile("lock ; addl $" RW_LOCK_BIAS_STR ",%0":"=m" 
((rw)->lock) : : "memory")

+static inline int _raw_read_trylock(rwlock_t *lock)
+{
+       atomic_t *count = (atomic_t *)lock;
+       atomic_dec(count);
+       if (atomic_read(count) >= 0)
+               return 1;
+       atomic_inc(count);
+       return 0;
+}
+
 static inline int _raw_write_trylock(rwlock_t *lock)
 {
        atomic_t *count = (atomic_t *)lock;


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] 2.6.11-rc2 SMP fixes, Rik van Riel <=