summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips64')
-rw-r--r--include/asm-mips64/checksum.h20
-rw-r--r--include/asm-mips64/ipcbuf.h28
-rw-r--r--include/asm-mips64/msgbuf.h27
-rw-r--r--include/asm-mips64/offset.h48
-rw-r--r--include/asm-mips64/pci.h5
-rw-r--r--include/asm-mips64/posix_types.h9
-rw-r--r--include/asm-mips64/sembuf.h22
-rw-r--r--include/asm-mips64/shmbuf.h38
8 files changed, 168 insertions, 29 deletions
diff --git a/include/asm-mips64/checksum.h b/include/asm-mips64/checksum.h
index 5c928cfb5..7d389ed21 100644
--- a/include/asm-mips64/checksum.h
+++ b/include/asm-mips64/checksum.h
@@ -1,4 +1,4 @@
-/* $Id: checksum.h,v 1.3 1999/11/19 20:35:48 ralf Exp $
+/* $Id: checksum.h,v 1.3 1999/11/19 23:22:59 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -37,9 +37,23 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum)
unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
unsigned int sum, int *errp);
+/*
+ * Copy and checksum to user
+ */
#define HAVE_CSUM_COPY_USER
-unsigned int csum_and_copy_to_user (const char *src, char *dst,
- int len, int sum, int *err_ptr);
+extern inline unsigned int
+csum_and_copy_to_user (const char *src, char *dst,
+ int len, int sum, int *err_ptr)
+{
+ sum = csum_partial(src, len, sum);
+
+ if (copy_to_user(dst, src, len)) {
+ *err_ptr = -EFAULT;
+ return -1;
+ }
+
+ return sum;
+}
/*
* the same as csum_partial, but copies from user space (but on MIPS
diff --git a/include/asm-mips64/ipcbuf.h b/include/asm-mips64/ipcbuf.h
new file mode 100644
index 000000000..4c898f677
--- /dev/null
+++ b/include/asm-mips64/ipcbuf.h
@@ -0,0 +1,28 @@
+#ifndef _ASM_IPCBUF_H
+#define _ASM_IPCBUF_H
+
+/*
+ * The ipc64_perm structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 32-bit seq
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct ipc64_perm
+{
+ __kernel_key_t key;
+ __kernel_uid_t uid;
+ __kernel_gid_t gid;
+ __kernel_uid_t cuid;
+ __kernel_gid_t cgid;
+ __kernel_mode_t mode;
+ unsigned short seq;
+ unsigned short __pad1;
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_IPCBUF_H */
diff --git a/include/asm-mips64/msgbuf.h b/include/asm-mips64/msgbuf.h
new file mode 100644
index 000000000..81d6e7145
--- /dev/null
+++ b/include/asm-mips64/msgbuf.h
@@ -0,0 +1,27 @@
+#ifndef _ASM_MSGBUF_H
+#define _ASM_MSGBUF_H
+
+/*
+ * The msqid64_ds structure for alpha architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct msqid64_ds {
+ struct ipc64_perm msg_perm;
+ __kernel_time_t msg_stime; /* last msgsnd time */
+ __kernel_time_t msg_rtime; /* last msgrcv time */
+ __kernel_time_t msg_ctime; /* last change time */
+ unsigned long msg_cbytes; /* current number of bytes on queue */
+ unsigned long msg_qnum; /* number of messages in queue */
+ unsigned long msg_qbytes; /* max number of bytes on queue */
+ __kernel_pid_t msg_lspid; /* pid of last msgsnd */
+ __kernel_pid_t msg_lrpid; /* last receive pid */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_MSGBUF_H */
diff --git a/include/asm-mips64/offset.h b/include/asm-mips64/offset.h
index a7711ea2d..d292080de 100644
--- a/include/asm-mips64/offset.h
+++ b/include/asm-mips64/offset.h
@@ -49,33 +49,33 @@
#define TASK_FLAGS 8
#define TASK_SIGPENDING 16
#define TASK_NEED_RESCHED 40
-#define TASK_COUNTER 48
-#define TASK_PRIORITY 56
-#define TASK_MM 1304
+#define TASK_COUNTER 56
+#define TASK_PRIORITY 64
+#define TASK_MM 80
#define TASK_STRUCT_SIZE 1448
/* MIPS specific thread_struct offsets. */
-#define THREAD_REG16 864
-#define THREAD_REG17 872
-#define THREAD_REG18 880
-#define THREAD_REG19 888
-#define THREAD_REG20 896
-#define THREAD_REG21 904
-#define THREAD_REG22 912
-#define THREAD_REG23 920
-#define THREAD_REG29 928
-#define THREAD_REG30 936
-#define THREAD_REG31 944
-#define THREAD_STATUS 952
-#define THREAD_FPU 960
-#define THREAD_BVADDR 1224
-#define THREAD_BUADDR 1232
-#define THREAD_ECODE 1240
-#define THREAD_TRAPNO 1248
-#define THREAD_MFLAGS 1256
-#define THREAD_CURDS 1264
-#define THREAD_TRAMP 1272
-#define THREAD_OLDCTX 1280
+#define THREAD_REG16 880
+#define THREAD_REG17 888
+#define THREAD_REG18 896
+#define THREAD_REG19 904
+#define THREAD_REG20 912
+#define THREAD_REG21 920
+#define THREAD_REG22 928
+#define THREAD_REG23 936
+#define THREAD_REG29 944
+#define THREAD_REG30 952
+#define THREAD_REG31 960
+#define THREAD_STATUS 968
+#define THREAD_FPU 976
+#define THREAD_BVADDR 1240
+#define THREAD_BUADDR 1248
+#define THREAD_ECODE 1256
+#define THREAD_TRAPNO 1264
+#define THREAD_MFLAGS 1272
+#define THREAD_CURDS 1280
+#define THREAD_TRAMP 1288
+#define THREAD_OLDCTX 1296
/* Linux mm_struct offsets. */
#define MM_USERS 32
diff --git a/include/asm-mips64/pci.h b/include/asm-mips64/pci.h
index 89eca5bf3..96a39ad98 100644
--- a/include/asm-mips64/pci.h
+++ b/include/asm-mips64/pci.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: pci.h,v 1.1 1999/12/04 03:59:12 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -13,4 +13,7 @@
#define pcibios_assign_all_busses() 0
+#define PCIBIOS_MIN_IO 0x1000
+#define PCIBIOS_MIN_MEM 0x10000000
+
#endif /* _ASM_PCI_H */
diff --git a/include/asm-mips64/posix_types.h b/include/asm-mips64/posix_types.h
index 24a997ba7..94d973f65 100644
--- a/include/asm-mips64/posix_types.h
+++ b/include/asm-mips64/posix_types.h
@@ -1,4 +1,4 @@
-/* $Id: posix_types.h,v 1.2 1999/12/04 03:59:12 ralf Exp $
+/* $Id: posix_types.h,v 1.3 2000/02/04 23:32:54 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -34,6 +34,13 @@ typedef int __kernel_clock_t;
typedef long __kernel_daddr_t;
typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+typedef int __kernel_uid32_t;
+typedef int __kernel_gid32_t;
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
+
#ifdef __GNUC__
typedef long long __kernel_loff_t;
#endif
diff --git a/include/asm-mips64/sembuf.h b/include/asm-mips64/sembuf.h
new file mode 100644
index 000000000..31892984e
--- /dev/null
+++ b/include/asm-mips64/sembuf.h
@@ -0,0 +1,22 @@
+#ifndef _ASM_SEMBUF_H
+#define _ASM_SEMBUF_H
+
+/*
+ * The semid64_ds structure for the MIPS architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct semid64_ds {
+ struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
+ __kernel_time_t sem_otime; /* last semop time */
+ __kernel_time_t sem_ctime; /* last change time */
+ unsigned long sem_nsems; /* no. of semaphores in array */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+#endif /* _ASM_SEMBUF_H */
diff --git a/include/asm-mips64/shmbuf.h b/include/asm-mips64/shmbuf.h
new file mode 100644
index 000000000..077cfced3
--- /dev/null
+++ b/include/asm-mips64/shmbuf.h
@@ -0,0 +1,38 @@
+#ifndef _ASM_SHMBUF_H
+#define _ASM_SHMBUF_H
+
+/*
+ * The shmid64_ds structure for the MIPS architecture.
+ * Note extra padding because this structure is passed back and forth
+ * between kernel and user space.
+ *
+ * Pad space is left for:
+ * - 2 miscellaneous 64-bit values
+ */
+
+struct shmid64_ds {
+ struct ipc64_perm shm_perm; /* operation perms */
+ size_t shm_segsz; /* size of segment (bytes) */
+ __kernel_time_t shm_atime; /* last attach time */
+ __kernel_time_t shm_dtime; /* last detach time */
+ __kernel_time_t shm_ctime; /* last change time */
+ __kernel_pid_t shm_cpid; /* pid of creator */
+ __kernel_pid_t shm_lpid; /* pid of last operator */
+ unsigned long shm_nattch; /* no. of current attaches */
+ unsigned long __unused1;
+ unsigned long __unused2;
+};
+
+struct shminfo64 {
+ unsigned long shmmax;
+ unsigned long shmmin;
+ unsigned long shmmni;
+ unsigned long shmseg;
+ unsigned long shmall;
+ unsigned long __unused1;
+ unsigned long __unused2;
+ unsigned long __unused3;
+ unsigned long __unused4;
+};
+
+#endif /* _ASM_SHMBUF_H */