patch-2.4.19 linux-2.4.19/arch/s390x/kernel/process.c
Next file: linux-2.4.19/arch/s390x/kernel/ptrace.c
Previous file: linux-2.4.19/arch/s390x/kernel/linux32.c
Back to the patch index
Back to the overall index
- Lines: 63
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/s390x/kernel/process.c
- Orig date:
Mon Feb 25 11:37:56 2002
diff -urN linux-2.4.18/arch/s390x/kernel/process.c linux-2.4.19/arch/s390x/kernel/process.c
@@ -50,28 +50,37 @@
* The idle loop on a S390...
*/
-static psw_t wait_psw;
-
int cpu_idle(void *unused)
{
+ psw_t wait_psw;
+ unsigned long reg;
+
/* endless idle loop with no priority at all */
init_idle();
current->nice = 20;
current->counter = -100;
- wait_psw.mask = _WAIT_PSW_MASK;
- wait_psw.addr = (unsigned long) &&idle_wakeup;
- while(1) {
- if (current->need_resched) {
- schedule();
- check_pgt_cache();
- continue;
- }
-
- /* load wait psw */
+ while (1) {
+ if (current->need_resched) {
+ schedule();
+ check_pgt_cache();
+ continue;
+ }
+
+ /*
+ * Wait for external, I/O or machine check interrupt and
+ * switch of machine check bit after the wait has ended.
+ */
+ wait_psw.mask = _WAIT_PSW_MASK;
asm volatile (
- "lpswe %0"
- : : "m" (wait_psw) );
-idle_wakeup:
+ " larl %0,0f\n"
+ " stg %0,8(%1)\n"
+ " lpswe 0(%1)\n"
+ "0: larl %0,1f\n"
+ " stg %0,8(%1)\n"
+ " ni 1(%1),0xf9\n"
+ " lpswe 0(%1)\n"
+ "1:"
+ : "=&a" (reg) : "a" (&wait_psw) : "memory", "cc" );
}
}
@@ -165,8 +174,7 @@
frame->gprs[8] = (unsigned long) &ret_from_fork;
/* fake return stack for resume(), don't go back to schedule */
- frame->gprs[9] = (unsigned long) frame;
- frame->childregs.old_ilc = -1; /* We are not single stepping an svc */
+ frame->gprs[9] = (unsigned long) frame;
/* save fprs, if used in last task */
save_fp_regs(&p->thread.fp_regs);
p->thread.user_seg = __pa((unsigned long) p->mm->pgd) | _REGION_TABLE;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)