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

[Xen-changelog] [xen-unstable] [IA64] fix {un}lock_ipi_calllock().

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] fix {un}lock_ipi_calllock().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 Dec 2008 03:50:39 -0800
Delivery-date: Mon, 01 Dec 2008 03:53:55 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1225776924 -32400
# Node ID 57c94bdbd6b3cd9246d108251c60f5ac9237ae02
# Parent  e75cb35c798beabee0b0ed4025ef82a39c702279
[IA64] fix {un}lock_ipi_calllock().

Now _raw_spin_lock() checks whether interrupt is masked or not.
If masked, it panics.
lock_ipi_calllock() violates the assumption.
This patch make lock_ipi_calllock() use spin_lock_irqsave()
instead of spin_lock_irq().

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/linux-xen/smp.c            |   15 +++++++++++++++
 xen/arch/ia64/linux-xen/smpboot.c        |   12 ++++++++++++
 xen/include/asm-ia64/linux-xen/asm/smp.h |    5 +++++
 3 files changed, 32 insertions(+)

diff -r e75cb35c798b -r 57c94bdbd6b3 xen/arch/ia64/linux-xen/smp.c
--- a/xen/arch/ia64/linux-xen/smp.c     Tue Nov 04 12:43:19 2008 +0900
+++ b/xen/arch/ia64/linux-xen/smp.c     Tue Nov 04 14:35:24 2008 +0900
@@ -101,6 +101,20 @@ static DEFINE_PER_CPU(u64, ipi_operation
 
 extern void cpu_halt (void);
 
+#ifdef XEN
+/* work around for spinlock irq check. */
+void
+lock_ipi_calllock(unsigned long *flags)
+{
+       spin_lock_irqsave(&call_lock, *flags);
+}
+
+void
+unlock_ipi_calllock(unsigned long flags)
+{
+       spin_unlock_irqrestore(&call_lock, flags);
+}
+#else
 void
 lock_ipi_calllock(void)
 {
@@ -112,6 +126,7 @@ unlock_ipi_calllock(void)
 {
        spin_unlock_irq(&call_lock);
 }
+#endif
 
 static void
 stop_this_cpu (void)
diff -r e75cb35c798b -r 57c94bdbd6b3 xen/arch/ia64/linux-xen/smpboot.c
--- a/xen/arch/ia64/linux-xen/smpboot.c Tue Nov 04 12:43:19 2008 +0900
+++ b/xen/arch/ia64/linux-xen/smpboot.c Tue Nov 04 14:35:24 2008 +0900
@@ -364,6 +364,10 @@ static void __devinit
 static void __devinit
 smp_callin (void)
 {
+#ifdef XEN
+       /* work around for spinlock irq assert. */
+       unsigned long flags;
+#endif
        int cpuid, phys_id;
        extern void ia64_init_itm(void);
 
@@ -382,9 +386,17 @@ smp_callin (void)
 
        fix_b0_for_bsp();
 
+#ifdef XEN
+       lock_ipi_calllock(&flags);
+#else
        lock_ipi_calllock();
+#endif
        cpu_set(cpuid, cpu_online_map);
+#ifdef XEN
+       unlock_ipi_calllock(flags);
+#else
        unlock_ipi_calllock();
+#endif
        per_cpu(cpu_state, cpuid) = CPU_ONLINE;
 
        smp_setup_percpu_timer();
diff -r e75cb35c798b -r 57c94bdbd6b3 xen/include/asm-ia64/linux-xen/asm/smp.h
--- a/xen/include/asm-ia64/linux-xen/asm/smp.h  Tue Nov 04 12:43:19 2008 +0900
+++ b/xen/include/asm-ia64/linux-xen/asm/smp.h  Tue Nov 04 14:35:24 2008 +0900
@@ -131,8 +131,13 @@ extern int smp_call_function_single (int
 extern int smp_call_function_single (int cpuid, void (*func) (void *info), 
void *info,
                                     int retry, int wait);
 extern void smp_send_reschedule (int cpu);
+#ifdef XEN
+extern void lock_ipi_calllock(unsigned long *flags);
+extern void unlock_ipi_calllock(unsigned long flags);
+#else
 extern void lock_ipi_calllock(void);
 extern void unlock_ipi_calllock(void);
+#endif
 extern void identify_siblings (struct cpuinfo_ia64 *);
 
 #else

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] fix {un}lock_ipi_calllock()., Xen patchbot-unstable <=