00001 // _Id: smprout.c,v 1.3 2006-05-25 11:27:11 roart Exp $ 00002 // _Locker: $ 00003 00004 // Author. Roar Thronęs. 00005 00006 #include<linux/kernel.h> 00007 #include<linux/sched.h> 00008 #include<asm/hw_irq.h> 00009 00010 #include<cpudef.h> 00011 #include<system_data_cells.h> 00012 00013 #include <smp_routines.h> 00014 00015 void smp_work() { 00016 int cpuid = ctl_gl_pcb->pcb$l_cpu_id; 00017 struct _cpu * cpu = smp_gl_cpu_data[cpuid]; 00018 if (cpu->cpu_l_work_req & CPU$M_IOPOST) { 00019 cpu->cpu_l_work_req &= ~CPU$M_IOPOST; // check. smp non-atom spin 00020 if (cpuid != smp_gl_primid) 00021 printk("iopost ipint for non-primary\n"); 00022 else 00023 SOFTINT_IOPOST_VECTOR; 00024 } 00025 if (cpu->cpu_l_work_req & CPU$M_UPDASTSR) { 00026 cpu->cpu_l_work_req &= ~CPU$M_UPDASTSR; // check. smp non-atom spin 00027 printk("what to do now?\n"); 00028 } 00029 if (cpu->cpu_l_work_req & CPU$M_RESCHED) { 00030 cpu->cpu_l_work_req &= ~CPU$M_RESCHED; // check. smp non-atom spin 00031 SOFTINT_RESCHED_VECTOR; 00032 } 00033 } 00034