Skip to contentSkip to conversation

xen: PV on HVM: support PV spinlocks

DISCUSSION Josip Rodin 2 participants 2 messages Oct 2, 2010 – Oct 4, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

I was just reading
http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commitdiff;h=a16a1a93b92ef09c4d759fc711c7f17b658176ec

And there's a chunk that says:

+static void xen_hvm_spinlock_init(void)
+{
+ if (!xen_have_vector_callback)
+ return
+ xen_init_lock_cpu(0);
+ xen_init_spinlocks();
+}

The return statement doesn't have a semicolon after it, so it will instead take xen_init_lock_cpu(0) as its argument, and the xen_init_spinlocks() call will never happen.

Signature · 1 line
     2. That which causes joy or happiness.
#1 lore raw
Quoted 15 lines · Josip Rodin

Hi,

I was just reading
http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commitdiff;h=a16a1a93b92ef09c4d759fc711c7f17b658176ec

And there's a chunk that says:

(quoted diff) +7 -0
+static void xen_hvm_spinlock_init(void)
+{
+       if (!xen_have_vector_callback)
+               return
+       xen_init_lock_cpu(0);
+       xen_init_spinlocks();
+}
Quoted 4 lines

The return statement doesn't have a semicolon after it, so it will instead take xen_init_lock_cpu(0) as its argument, and the xen_init_spinlocks() call will never happen.

Well spotted!! I fixed this issue (and another spinlock initialization problem I found after that) and force-pushed both 2.6.32-pvhvm and 2.6.35-rc5-pvhvm-v7.