present_mask handling fix for qemu
authorAkshay Giridhar <akshay87@vt.edu>
Mon, 22 Sep 2014 16:09:31 +0000 (12:09 -0400)
committerAkshay Giridhar <akshay87@vt.edu>
Mon, 22 Sep 2014 16:09:31 +0000 (12:09 -0400)
kernel/process_server.c
kernel/signal.c

index e566145..149565e 100644 (file)
@@ -9486,7 +9486,10 @@ static int __init process_server_init(void) {
      * Cache some local information.
      */
 //#ifndef SUPPORT_FOR_CLUSTERING
-           _cpu= smp_processor_id();
+       if(popcorn_boot == 1)
+           _cpu = cpumask_first(cpu_present_mask);
+       else
+                  _cpu = 0;
 //#else
 //        _cpu = cpumask_first(cpu_present_mask);
 //#endif
index f568bf9..b341a97 100644 (file)
@@ -4090,7 +4090,12 @@ sigqueue_cachep = KMEM_CACHE(sigqueue, SLAB_PANIC);
 static int __init kill_handler_init(void) {
 /*mklinux_akshay*/
 
- _cpu= cpumask_first(cpu_present_mask);
+if(popcorn_boot == 1 ){
+  _cpu = cpumask_first(cpu_present_mask);
+}
+else {
+  _cpu = 0;
+}
 
 printk(KERN_ALERT"%s: cpu{%d}\n",__func__,_cpu);
 INIT_LIST_HEAD(&out_head);