Revert "xen: in do_softirq() sample smp_processor_id() only once."
authorWei Liu <wei.liu2@citrix.com>
Thu, 31 Aug 2017 15:28:49 +0000 (16:28 +0100)
committerWei Liu <wei.liu2@citrix.com>
Thu, 31 Aug 2017 15:32:37 +0000 (16:32 +0100)
This reverts commit 57450cfe48b56db90166c52d45a411a9279a12e1.

This breaks arm tests.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
xen/common/softirq.c

index 67c84ba379dbff2401eef948ba59056a1662cd3f..ac12cf85e51572b9c7b8d3f03f2923fbd506a3fe 100644 (file)
@@ -27,12 +27,16 @@ static DEFINE_PER_CPU(unsigned int, batching);
 
 static void __do_softirq(unsigned long ignore_mask)
 {
-    unsigned int i, cpu = smp_processor_id();
+    unsigned int i, cpu;
     unsigned long pending;
 
     for ( ; ; )
     {
-        ASSERT(cpu == smp_processor_id());
+        /*
+         * Initialise @cpu on every iteration: SCHEDULE_SOFTIRQ may move
+         * us to another processor.
+         */
+        cpu = smp_processor_id();
 
         if ( rcu_pending(cpu) )
             rcu_check_callbacks(cpu);