[xen master] Revert "xen: in do_softirq() sample smp_processor_id() only once."

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen master] Revert "xen: in do_softirq() sample smp_processor_id() only once."

patchbot
commit ec39d5b4f1ce512f54fc96508f13d95ef6a15ce6
Author:     Wei Liu <[hidden email]>
AuthorDate: Thu Aug 31 16:28:49 2017 +0100
Commit:     Wei Liu <[hidden email]>
CommitDate: Thu Aug 31 16:32:37 2017 +0100

    Revert "xen: in do_softirq() sample smp_processor_id() only once."
   
    This reverts commit 57450cfe48b56db90166c52d45a411a9279a12e1.
   
    This breaks arm tests.
   
    Signed-off-by: Wei Liu <[hidden email]>
---
 xen/common/softirq.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/common/softirq.c b/xen/common/softirq.c
index 67c84ba..ac12cf8 100644
--- a/xen/common/softirq.c
+++ b/xen/common/softirq.c
@@ -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);
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog