summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/process.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
commitdcec8a13bf565e47942a1751a9cec21bec5648fe (patch)
tree548b69625b18cc2e88c3e68d0923be546c9ebb03 /arch/sparc64/kernel/process.c
parent2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff)
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'arch/sparc64/kernel/process.c')
-rw-r--r--arch/sparc64/kernel/process.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 4e5ead982..c0058afd9 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.50 1998/01/09 16:39:33 jj Exp $
+/* $Id: process.c,v 1.52 1998/03/29 12:57:53 ecd Exp $
* arch/sparc64/kernel/process.c
*
* Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -41,9 +41,6 @@
/* #define VERBOSE_SHOWREGS */
-#define PGTCACHE_HIGH_WATER 50
-#define PGTCACHE_LOW_WATER 25
-
#ifndef __SMP__
/*
@@ -58,16 +55,7 @@ asmlinkage int sys_idle(void)
current->priority = -100;
current->counter = -100;
for (;;) {
- if(pgtable_cache_size > PGTCACHE_LOW_WATER) {
- do {
- if(pgd_quicklist)
- free_page((unsigned long) get_pgd_fast());
- if(pmd_quicklist)
- free_page((unsigned long) get_pmd_fast());
- if(pte_quicklist)
- free_page((unsigned long) get_pte_fast());
- } while(pgtable_cache_size > PGTCACHE_HIGH_WATER);
- }
+ check_pgt_cache();
run_task_queue(&tq_scheduler);
schedule();
}
@@ -83,16 +71,7 @@ asmlinkage int cpu_idle(void)
{
current->priority = -100;
while(1) {
- if(pgtable_cache_size > PGTCACHE_LOW_WATER) {
- do {
- if(pgd_quicklist)
- free_page((unsigned long) get_pgd_fast());
- if(pmd_quicklist)
- free_page((unsigned long) get_pmd_fast());
- if(pte_quicklist)
- free_page((unsigned long) get_pte_fast());
- } while(pgtable_cache_size > PGTCACHE_HIGH_WATER);
- }
+ check_pgt_cache();
if(tq_scheduler) {
lock_kernel();
run_task_queue(&tq_scheduler);
@@ -592,6 +571,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
p->tss.flags |= SPARC_FLAG_KTHREAD;
p->tss.current_ds = KERNEL_DS;
p->tss.ctx = 0;
+ __asm__ __volatile__("flushw");
+ memcpy((void *)(p->tss.ksp + STACK_BIAS),
+ (void *)(regs->u_regs[UREG_FP] + STACK_BIAS),
+ sizeof(struct reg_window));
p->tss.kregs->u_regs[UREG_G6] = (unsigned long) p;
} else {
if(current->tss.flags & SPARC_FLAG_32BIT) {