summaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-18 22:06:10 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-18 22:06:10 +0000
commitaba4e552a2f2c1492441acbccedd8e0a4c53f916 (patch)
tree23921efb2b4af590160f034a89ff3da2ecca6e47 /arch/sparc64
parent9e17e1aa1cf1cb497d2f67147a51831888affcf3 (diff)
Merge with Linux 2.3.43.
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/config.in2
-rw-r--r--arch/sparc64/defconfig9
-rw-r--r--arch/sparc64/kernel/binfmt_elf32.c2
-rw-r--r--arch/sparc64/kernel/dtlb_backend.S4
-rw-r--r--arch/sparc64/kernel/dtlb_base.S4
-rw-r--r--arch/sparc64/kernel/dtlb_prot.S4
-rw-r--r--arch/sparc64/kernel/ioctl32.c2
-rw-r--r--arch/sparc64/kernel/iommu_common.c2
-rw-r--r--arch/sparc64/kernel/itlb_base.S4
-rw-r--r--arch/sparc64/kernel/pci_iommu.c2
-rw-r--r--arch/sparc64/kernel/pci_psycho.c2
-rw-r--r--arch/sparc64/kernel/pci_sabre.c2
-rw-r--r--arch/sparc64/kernel/sbus.c2
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c12
-rw-r--r--arch/sparc64/kernel/starfire.c4
-rw-r--r--arch/sparc64/kernel/sys_sparc.c2
-rw-r--r--arch/sparc64/kernel/sys_sunos32.c2
-rw-r--r--arch/sparc64/kernel/systbls.S6
-rw-r--r--arch/sparc64/lib/debuglocks.c4
-rw-r--r--arch/sparc64/lib/memscan.S4
-rw-r--r--arch/sparc64/mm/Makefile4
-rw-r--r--arch/sparc64/mm/asyncd.c283
-rw-r--r--arch/sparc64/solaris/misc.c2
23 files changed, 42 insertions, 322 deletions
diff --git a/arch/sparc64/config.in b/arch/sparc64/config.in
index ace1366ba..fdf3960e3 100644
--- a/arch/sparc64/config.in
+++ b/arch/sparc64/config.in
@@ -1,4 +1,4 @@
-# $Id: config.in,v 1.87 2000/01/16 06:18:53 davem Exp $
+# $Id: config.in,v 1.89 2000/01/31 21:10:10 davem Exp $
# For a description of the syntax of this configuration file,
# see the Configure script.
#
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index 59db5d4bc..3e841d71b 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/defconfig
@@ -292,6 +292,7 @@ CONFIG_VIDEO_DEV=y
#
# CONFIG_QUOTA is not set
CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
# CONFIG_ADFS_FS is not set
CONFIG_AFFS_FS=m
# CONFIG_HFS_FS is not set
@@ -307,10 +308,12 @@ CONFIG_ISO9660_FS=m
# CONFIG_JOLIET is not set
CONFIG_MINIX_FS=m
# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
CONFIG_HPFS_FS=m
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
CONFIG_ROMFS_FS=m
CONFIG_EXT2_FS=y
CONFIG_SYSV_FS=m
@@ -318,15 +321,16 @@ CONFIG_SYSV_FS=m
CONFIG_UDF_FS=m
# CONFIG_UDF_RW is not set
CONFIG_UFS_FS=m
-CONFIG_UFS_FS_WRITE=y
+# CONFIG_UFS_FS_WRITE is not set
#
# Network File Systems
#
CONFIG_CODA_FS=m
CONFIG_NFS_FS=y
+# CONFIG_ROOT_NFS is not set
CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3 is not set
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_SMB_FS=m
@@ -347,7 +351,6 @@ CONFIG_NCP_FS=m
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
-# CONFIG_SGI_PARTITION is not set
CONFIG_SUN_PARTITION=y
CONFIG_NLS=y
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
index 76516f2f2..59b48600d 100644
--- a/arch/sparc64/kernel/binfmt_elf32.c
+++ b/arch/sparc64/kernel/binfmt_elf32.c
@@ -1,7 +1,7 @@
/*
* binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra.
*
- * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@redhat.com)
* Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
diff --git a/arch/sparc64/kernel/dtlb_backend.S b/arch/sparc64/kernel/dtlb_backend.S
index 81f4fd366..9c1818c5e 100644
--- a/arch/sparc64/kernel/dtlb_backend.S
+++ b/arch/sparc64/kernel/dtlb_backend.S
@@ -1,8 +1,8 @@
-/* $Id: dtlb_backend.S,v 1.8 1999/12/05 10:41:35 davem Exp $
+/* $Id: dtlb_backend.S,v 1.9 2000/01/31 04:59:12 davem Exp $
* dtlb_backend.S: Back end to DTLB miss replacement strategy.
* This is included directly into the trap table.
*
- * Copyright (C) 1996,1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1996,1998 David S. Miller (davem@redhat.com)
* Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
diff --git a/arch/sparc64/kernel/dtlb_base.S b/arch/sparc64/kernel/dtlb_base.S
index 71e5b14d7..0f86bc896 100644
--- a/arch/sparc64/kernel/dtlb_base.S
+++ b/arch/sparc64/kernel/dtlb_base.S
@@ -1,8 +1,8 @@
-/* $Id: dtlb_base.S,v 1.4 1998/06/15 16:59:30 jj Exp $
+/* $Id: dtlb_base.S,v 1.5 2000/01/31 04:59:12 davem Exp $
* dtlb_base.S: Front end to DTLB miss replacement strategy.
* This is included directly into the trap table.
*
- * Copyright (C) 1996,1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1996,1998 David S. Miller (davem@redhat.com)
* Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
diff --git a/arch/sparc64/kernel/dtlb_prot.S b/arch/sparc64/kernel/dtlb_prot.S
index 067a1d051..73f3596e1 100644
--- a/arch/sparc64/kernel/dtlb_prot.S
+++ b/arch/sparc64/kernel/dtlb_prot.S
@@ -1,8 +1,8 @@
-/* $Id: dtlb_prot.S,v 1.18 1999/03/02 15:42:14 jj Exp $
+/* $Id: dtlb_prot.S,v 1.19 2000/01/31 04:59:12 davem Exp $
* dtlb_prot.S: DTLB protection trap strategy.
* This is included directly into the trap table.
*
- * Copyright (C) 1996,1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1996,1998 David S. Miller (davem@redhat.com)
* Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c
index 7a7315003..d51e36f61 100644
--- a/arch/sparc64/kernel/ioctl32.c
+++ b/arch/sparc64/kernel/ioctl32.c
@@ -1,4 +1,4 @@
-/* $Id: ioctl32.c,v 1.74 2000/01/15 04:47:48 davem Exp $
+/* $Id: ioctl32.c,v 1.76 2000/01/31 21:10:15 davem Exp $
* ioctl32.c: Conversion between 32bit and 64bit native ioctls.
*
* Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
diff --git a/arch/sparc64/kernel/iommu_common.c b/arch/sparc64/kernel/iommu_common.c
index d1041b85f..27aa136ff 100644
--- a/arch/sparc64/kernel/iommu_common.c
+++ b/arch/sparc64/kernel/iommu_common.c
@@ -1,4 +1,4 @@
-/* $Id: iommu_common.c,v 1.2 1999/12/19 09:17:53 davem Exp $
+/* $Id: iommu_common.c,v 1.3 2000/01/28 13:41:59 jj Exp $
* iommu_common.c: UltraSparc SBUS/PCI common iommu code.
*
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc64/kernel/itlb_base.S b/arch/sparc64/kernel/itlb_base.S
index eefc1c074..4ef509731 100644
--- a/arch/sparc64/kernel/itlb_base.S
+++ b/arch/sparc64/kernel/itlb_base.S
@@ -1,8 +1,8 @@
-/* $Id: itlb_base.S,v 1.7 1999/03/02 15:42:12 jj Exp $
+/* $Id: itlb_base.S,v 1.8 2000/01/31 04:59:12 davem Exp $
* itlb_base.S: Front end to ITLB miss replacement strategy.
* This is included directly into the trap table.
*
- * Copyright (C) 1996,1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1996,1998 David S. Miller (davem@redhat.com)
* Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c
index e72671428..409a44897 100644
--- a/arch/sparc64/kernel/pci_iommu.c
+++ b/arch/sparc64/kernel/pci_iommu.c
@@ -1,4 +1,4 @@
-/* $Id: pci_iommu.c,v 1.7 1999/12/20 14:08:15 jj Exp $
+/* $Id: pci_iommu.c,v 1.8 2000/01/28 13:41:59 jj Exp $
* pci_iommu.c: UltraSparc PCI controller IOM/STC support.
*
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index 559769b87..1ff768056 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -1,4 +1,4 @@
-/* $Id: pci_psycho.c,v 1.9 2000/01/11 23:38:32 davem Exp $
+/* $Id: pci_psycho.c,v 1.10 2000/01/28 13:42:00 jj Exp $
* pci_psycho.c: PSYCHO/U2P specific PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
index 2f82de9ce..44247c371 100644
--- a/arch/sparc64/kernel/pci_sabre.c
+++ b/arch/sparc64/kernel/pci_sabre.c
@@ -1,4 +1,4 @@
-/* $Id: pci_sabre.c,v 1.10 2000/01/11 23:38:35 davem Exp $
+/* $Id: pci_sabre.c,v 1.11 2000/01/28 13:42:01 jj Exp $
* pci_sabre.c: Sabre specific PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index a73387754..38e731f37 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -1,4 +1,4 @@
-/* $Id: sbus.c,v 1.6 1999/12/20 14:08:17 jj Exp $
+/* $Id: sbus.c,v 1.7 2000/01/28 13:41:58 jj Exp $
* sbus.c: UltraSparc SBUS controller support.
*
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 418b2f7b2..c48a1f6e4 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -1,4 +1,4 @@
-/* $Id: sparc64_ksyms.c,v 1.70 2000/01/07 18:15:18 jj Exp $
+/* $Id: sparc64_ksyms.c,v 1.72 2000/01/28 13:41:59 jj Exp $
* arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support.
*
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -124,11 +124,6 @@ EXPORT_SYMBOL_PRIVATE(write_lock);
EXPORT_SYMBOL_PRIVATE(write_unlock);
#endif
-/* rw semaphores */
-EXPORT_SYMBOL_NOVERS(__down_read_failed);
-EXPORT_SYMBOL_NOVERS(__down_write_failed);
-EXPORT_SYMBOL_NOVERS(__rwsem_wake);
-
/* Kernel wide locking */
EXPORT_SYMBOL(kernel_flag);
@@ -169,6 +164,11 @@ EXPORT_SYMBOL(local_irq_count);
EXPORT_SYMBOL(local_bh_count);
#endif
+/* rw semaphores */
+EXPORT_SYMBOL_NOVERS(__down_read_failed);
+EXPORT_SYMBOL_NOVERS(__down_write_failed);
+EXPORT_SYMBOL_NOVERS(__rwsem_wake);
+
/* Atomic counter implementation. */
EXPORT_SYMBOL_PRIVATE(atomic_add);
EXPORT_SYMBOL_PRIVATE(atomic_sub);
diff --git a/arch/sparc64/kernel/starfire.c b/arch/sparc64/kernel/starfire.c
index 3237b37dc..8ff7ea4d2 100644
--- a/arch/sparc64/kernel/starfire.c
+++ b/arch/sparc64/kernel/starfire.c
@@ -1,7 +1,7 @@
-/* $Id: starfire.c,v 1.4 1999/09/21 14:35:25 davem Exp $
+/* $Id: starfire.c,v 1.5 2000/01/31 04:59:12 davem Exp $
* starfire.c: Starfire/E10000 support.
*
- * Copyright (C) 1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1998 David S. Miller (davem@redhat.com)
*/
#include <linux/kernel.h>
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 3c3a5c1c6..be2638ec9 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sparc.c,v 1.34 2000/01/21 11:39:06 jj Exp $
+/* $Id: sys_sparc.c,v 1.35 2000/01/29 07:40:12 davem Exp $
* linux/arch/sparc64/kernel/sys_sparc.c
*
* This file contains various random system calls that
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
index 6beb0531f..62058ffcf 100644
--- a/arch/sparc64/kernel/sys_sunos32.c
+++ b/arch/sparc64/kernel/sys_sunos32.c
@@ -1,4 +1,4 @@
-/* $Id: sys_sunos32.c,v 1.37 2000/01/21 11:39:03 jj Exp $
+/* $Id: sys_sunos32.c,v 1.38 2000/01/29 07:40:13 davem Exp $
* sys_sunos32.c: SunOS binary compatability layer on sparc64.
*
* Copyright (C) 1995, 1996, 1997 David S. Miller (davem@caip.rutgers.edu)
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 2c61f6623..10effccae 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -1,4 +1,4 @@
-/* $Id: systbls.S,v 1.66 2000/01/16 06:20:48 davem Exp $
+/* $Id: systbls.S,v 1.67 2000/01/29 16:41:21 jj Exp $
* systbls.S: System call entry point tables for OS compatibility.
* The native Linux system call table lives here also.
*
@@ -48,7 +48,7 @@ sys_call_table32:
/*130*/ .word sys_ftruncate, sys_flock, sys_lstat64, sys_nis_syscall, sys_nis_syscall
.word sys_nis_syscall, sys_mkdir, sys_rmdir, sys32_utimes, sys_stat64
/*140*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys32_getrlimit
- .word sys32_setrlimit, sys_nis_syscall, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
+ .word sys32_setrlimit, sys_pivot_root, sys32_prctl, sys32_pciconfig_read, sys32_pciconfig_write
/*150*/ .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_nis_syscall
.word sys_nis_syscall, sys_nis_syscall, sys32_statfs, sys32_fstatfs, sys_oldumount
/*160*/ .word sys_nis_syscall, sys_nis_syscall, sys_getdomainname, sys_setdomainname, sys_nis_syscall
@@ -107,7 +107,7 @@ sys_call_table:
/*130*/ .word sys_ftruncate, sys_flock, sys_nis_syscall, sys_sendto, sys_shutdown
.word sys_socketpair, sys_mkdir, sys_rmdir, sys_utimes, sys_nis_syscall
/*140*/ .word sys_nis_syscall, sys_getpeername, sys_nis_syscall, sys_nis_syscall, sys_getrlimit
- .word sys_setrlimit, sys_nis_syscall, sys_prctl, sys_pciconfig_read, sys_pciconfig_write
+ .word sys_setrlimit, sys_pivot_root, sys_prctl, sys_pciconfig_read, sys_pciconfig_write
/*150*/ .word sys_getsockname, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_nis_syscall
.word sys_nis_syscall, sys_nis_syscall, sys_statfs, sys_fstatfs, sys_oldumount
/*160*/ .word sys_nis_syscall, sys_nis_syscall, sys_getdomainname, sys_setdomainname, sys_utrap_install
diff --git a/arch/sparc64/lib/debuglocks.c b/arch/sparc64/lib/debuglocks.c
index 315724ec3..518281daa 100644
--- a/arch/sparc64/lib/debuglocks.c
+++ b/arch/sparc64/lib/debuglocks.c
@@ -1,7 +1,7 @@
-/* $Id: debuglocks.c,v 1.3 1999/09/10 10:40:50 davem Exp $
+/* $Id: debuglocks.c,v 1.4 2000/01/31 04:59:10 davem Exp $
* debuglocks.c: Debugging versions of SMP locking primitives.
*
- * Copyright (C) 1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1998 David S. Miller (davem@redhat.com)
*/
#include <linux/kernel.h>
diff --git a/arch/sparc64/lib/memscan.S b/arch/sparc64/lib/memscan.S
index 423bc1409..a34c6b9d2 100644
--- a/arch/sparc64/lib/memscan.S
+++ b/arch/sparc64/lib/memscan.S
@@ -1,8 +1,8 @@
-/* $Id: memscan.S,v 1.2 1998/05/21 14:42:22 jj Exp $
+/* $Id: memscan.S,v 1.3 2000/01/31 04:59:10 davem Exp $
* memscan.S: Optimized memscan for Sparc64.
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@ultra.linux.cz)
- * Copyright (C) 1998 David S. Miller (davem@dm.cobaltmicro.com)
+ * Copyright (C) 1998 David S. Miller (davem@redhat.com)
*/
#define HI_MAGIC 0x8080808080808080
diff --git a/arch/sparc64/mm/Makefile b/arch/sparc64/mm/Makefile
index a7448f1db..d97c47778 100644
--- a/arch/sparc64/mm/Makefile
+++ b/arch/sparc64/mm/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.5 1998/07/26 03:02:54 davem Exp $
+# $Id: Makefile,v 1.6 2000/01/31 01:30:49 davem Exp $
# Makefile for the linux Sparc64-specific parts of the memory manager.
#
# Note! Dependencies are done automagically by 'make dep', which also
@@ -14,6 +14,6 @@
$(CC) -D__ASSEMBLY__ $(AFLAGS) -ansi -c $< -o $*.o
O_TARGET := mm.o
-O_OBJS := ultra.o fault.o init.o generic.o asyncd.o extable.o modutil.o
+O_OBJS := ultra.o fault.o init.o generic.o extable.o modutil.o
include $(TOPDIR)/Rules.make
diff --git a/arch/sparc64/mm/asyncd.c b/arch/sparc64/mm/asyncd.c
deleted file mode 100644
index b87efd590..000000000
--- a/arch/sparc64/mm/asyncd.c
+++ /dev/null
@@ -1,283 +0,0 @@
-/* $Id: asyncd.c,v 1.12 2000/01/21 11:39:13 jj Exp $
- * The asyncd kernel daemon. This handles paging on behalf of
- * processes that receive page faults due to remote (async) memory
- * accesses.
- *
- * Idea and skeleton code courtesy of David Miller (bless his cotton socks)
- *
- * Implemented by tridge
- */
-
-#include <linux/mm.h>
-#include <linux/malloc.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/kernel_stat.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/swap.h>
-#include <linux/fs.h>
-#include <linux/config.h>
-#include <linux/interrupt.h>
-#include <linux/signal.h>
-
-#include <asm/dma.h>
-#include <asm/system.h> /* for cli()/sti() */
-#include <asm/segment.h> /* for memcpy_to/fromfs */
-#include <asm/bitops.h>
-#include <asm/pgalloc.h>
-#include <asm/pgtable.h>
-
-#define DEBUG 0
-
-#define WRITE_LIMIT 100
-#define LOOP_LIMIT 200
-
-static struct {
- int faults, read, write, success, failure, errors;
-} stats;
-
-/*
- * The wait queue for waking up the async daemon:
- */
-static DECLARE_WAIT_QUEUE_HEAD(asyncd_wait);
-
-struct async_job {
- volatile struct async_job *next;
- int taskid;
- struct mm_struct *mm;
- unsigned long address;
- int write;
- void (*callback)(int,unsigned long,int,int);
-};
-
-static volatile struct async_job *async_queue = NULL;
-static volatile struct async_job *async_queue_end = NULL;
-
-static void add_to_async_queue(int taskid,
- struct mm_struct *mm,
- unsigned long address,
- int write,
- void (*callback)(int,unsigned long,int,int))
-{
- struct async_job *a = kmalloc(sizeof(*a),GFP_ATOMIC);
-
- if (!a) {
- printk("ERROR: out of memory in asyncd\n");
- a->callback(taskid,address,write,1);
- return;
- }
-
- if (write)
- stats.write++;
- else
- stats.read++;
-
- a->next = NULL;
- a->taskid = taskid;
- a->mm = mm;
- a->address = address;
- a->write = write;
- a->callback = callback;
-
- if (!async_queue) {
- async_queue = a;
- } else {
- async_queue_end->next = a;
- }
- async_queue_end = a;
-}
-
-
-void async_fault(unsigned long address, int write, int taskid,
- void (*callback)(int,unsigned long,int,int))
-{
-#warning Need some fixing here... -DaveM
- struct task_struct *tsk = current /* XXX task[taskid] */;
- struct mm_struct *mm = tsk->mm;
-
- stats.faults++;
-
-#if 0
- printk("paging in %x for task=%d\n",address,taskid);
-#endif
-
- add_to_async_queue(taskid, mm, address, write, callback);
- wake_up(&asyncd_wait);
- mark_bh(TQUEUE_BH);
-}
-
-static int fault_in_page(int taskid,
- struct vm_area_struct *vma,
- unsigned long address, int write)
-{
- static unsigned last_address;
- static int last_task, loop_counter;
- siginfo_t info;
-#warning Need some fixing here... -DaveM
- struct task_struct *tsk = current /* XXX task[taskid] */;
- pgd_t *pgd;
- pmd_t *pmd;
- pte_t *pte;
-
- if (!tsk || !tsk->mm)
- return 1;
-
- if (!vma || (write && !(vma->vm_flags & VM_WRITE)))
- goto bad_area;
- if (vma->vm_start > address)
- goto bad_area;
-
- if (address == last_address && taskid == last_task) {
- loop_counter++;
- } else {
- loop_counter = 0;
- last_address = address;
- last_task = taskid;
- }
-
- if (loop_counter == WRITE_LIMIT && !write) {
- printk("MSC bug? setting write request\n");
- stats.errors++;
- write = 1;
- }
-
- if (loop_counter == LOOP_LIMIT) {
- printk("MSC bug? failing request\n");
- stats.errors++;
- return 1;
- }
-
- pgd = pgd_offset(vma->vm_mm, address);
- pmd = pmd_alloc(pgd,address);
- if(!pmd)
- goto no_memory;
- pte = pte_alloc(pmd, address);
- if(!pte)
- goto no_memory;
- if(!pte_present(*pte)) {
- handle_mm_fault(tsk, vma, address, write);
- goto finish_up;
- }
- set_pte(pte, pte_mkyoung(*pte));
- flush_tlb_page(vma, address);
- if(!write)
- goto finish_up;
- if(pte_write(*pte)) {
- set_pte(pte, pte_mkdirty(*pte));
- flush_tlb_page(vma, address);
- goto finish_up;
- }
- handle_mm_fault(tsk, vma, address, write);
-
- /* Fall through for do_wp_page */
-finish_up:
- stats.success++;
- return 0;
-
-no_memory:
- stats.failure++;
- oom(tsk);
- return 1;
-
-bad_area:
- stats.failure++;
- info.si_signo = SIGSEGV;
- info.si_errno = 0;
- info.si_code = SEGV_MAPERR;
- info.si_addr = (void *)address;
- info.si_trapno = 0;
- send_sig_info(SIGSEGV, &info, tsk);
- return 1;
-}
-
-
-/* Note the semaphore operations must be done here, and _not_
- * in async_fault().
- */
-static void run_async_queue(void)
-{
- int ret;
- unsigned flags;
-
- while (async_queue) {
- volatile struct async_job *a;
- struct mm_struct *mm;
- struct vm_area_struct *vma;
-
- save_flags(flags); cli();
- a = async_queue;
- async_queue = async_queue->next;
- restore_flags(flags);
-
- mm = a->mm;
-
- down(&mm->mmap_sem);
- vma = find_vma(mm, a->address);
- ret = fault_in_page(a->taskid,vma,a->address,a->write);
-#if DEBUG
- printk("fault_in_page(task=%d addr=%x write=%d) = %d\n",
- a->taskid,a->address,a->write,ret);
-#endif
- a->callback(a->taskid,a->address,a->write,ret);
- up(&mm->mmap_sem);
- kfree_s((void *)a,sizeof(*a));
- }
-}
-
-
-#if CONFIG_AP1000
-static void asyncd_info(void)
-{
- printk("CID(%d) faults: total=%d read=%d write=%d success=%d fail=%d err=%d\n",
- mpp_cid(),stats.faults, stats.read, stats.write, stats.success,
- stats.failure, stats.errors);
-}
-#endif
-
-
-/*
- * The background async daemon.
- * Started as a kernel thread from the init process.
- */
-int asyncd(void *unused)
-{
- current->session = 1;
- current->pgrp = 1;
- sprintf(current->comm, "asyncd");
-
- sigfillset(&current->blocked); /* block all signals */
- recalc_sigpending(current);
-
- /* Give asyncd a realtime priority. */
- current->policy = SCHED_FIFO;
- current->priority = 32; /* Fixme --- we need to standardise our
- namings for POSIX.4 realtime scheduling
- priorities. */
-
- printk("Started asyncd\n");
-
-#if CONFIG_AP1000
- bif_add_debug_key('a',asyncd_info,"stats on asyncd");
-#endif
-
- while (1) {
- unsigned flags;
-
- save_flags(flags); cli();
-
- while (!async_queue) {
- spin_lock(&current->sigmask_lock);
- flush_signals(current);
- spin_unlock(&current->sigmask_lock);
- interruptible_sleep_on(&asyncd_wait);
- __sti(); cli(); /* acquire gloabl_irq_lock */
- }
-
- restore_flags(flags);
-
- run_async_queue();
- }
-}
-
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c
index 450d2fc9e..46dbfb241 100644
--- a/arch/sparc64/solaris/misc.c
+++ b/arch/sparc64/solaris/misc.c
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.20 2000/01/12 02:59:26 davem Exp $
+/* $Id: misc.c,v 1.21 2000/01/29 07:40:15 davem Exp $
* misc.c: Miscelaneous syscall emulation for Solaris
*
* Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)