summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips64')
-rw-r--r--include/asm-mips64/div64.h20
-rw-r--r--include/asm-mips64/dma.h6
-rw-r--r--include/asm-mips64/highmem.h11
-rw-r--r--include/asm-mips64/io.h18
-rw-r--r--include/asm-mips64/offset.h2
-rw-r--r--include/asm-mips64/pgtable.h21
-rw-r--r--include/asm-mips64/processor.h9
-rw-r--r--include/asm-mips64/shmparam.h48
-rw-r--r--include/asm-mips64/unistd.h8
9 files changed, 58 insertions, 85 deletions
diff --git a/include/asm-mips64/div64.h b/include/asm-mips64/div64.h
new file mode 100644
index 000000000..bb15c7ac2
--- /dev/null
+++ b/include/asm-mips64/div64.h
@@ -0,0 +1,20 @@
+/* $Id: div64.h,v 1.1 2000/01/28 23:18:55 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
+ * for more details.
+ */
+#ifndef _ASM_DIV64_H
+#define _ASM_DIV64_H
+
+/*
+ * Hey, we're already 64-bit, no
+ * need to play games..
+ */
+#define do_div(n,base) ({ \
+ int __res; \
+ __res = ((unsigned long) n) % (unsigned) base; \
+ n = ((unsigned long) n) / (unsigned) base; \
+ __res; })
+
+#endif /* _ASM_DIV64_H */
diff --git a/include/asm-mips64/dma.h b/include/asm-mips64/dma.h
index 00da1fb9f..b109ce0ff 100644
--- a/include/asm-mips64/dma.h
+++ b/include/asm-mips64/dma.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: dma.h,v 1.3 1999/12/04 03:59:12 ralf Exp $
*
* linux/include/asm/dma.h: Defines for using and allocating dma channels.
* Written by Hennus Bergman, 1992.
@@ -84,11 +84,7 @@
* Deskstations or Acer PICA but not the much more versatile DMA logic used
* for the local devices on Acer PICA or Magnums.
*/
-#ifndef CONFIG_SGI_IP22
#define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000)
-#else
-#define MAX_DMA_ADDRESS (~0UL)
-#endif
/* 8237 DMA controllers */
#define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */
diff --git a/include/asm-mips64/highmem.h b/include/asm-mips64/highmem.h
index fe6b44516..032acd2ee 100644
--- a/include/asm-mips64/highmem.h
+++ b/include/asm-mips64/highmem.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: highmem.h,v 1.1 2000/01/27 01:05:37 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
@@ -19,9 +19,10 @@ extern unsigned long highstart_pfn, highend_pfn;
extern pte_t *kmap_pte;
extern pgprot_t kmap_prot;
-#define kmap_init() do { } while(0)
-#define kmap(page, type) page_address(page)
-#define kunmap(vaddr, type) do { } while(0)
-#define kmap_check() do { } while(0)
+#define kmap_init() do { } while(0)
+#define kmap(page) page_address(page)
+#define kunmap(page) do { } while(0)
+#define kmap_atomic(page, type) page_address(page)
+#define kunmap_atomic(page, type) do { } while(0)
#endif /* _ASM_HIGHMEM_H */
diff --git a/include/asm-mips64/io.h b/include/asm-mips64/io.h
index be76a8910..382627d5b 100644
--- a/include/asm-mips64/io.h
+++ b/include/asm-mips64/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.5 2000/01/27 01:05:37 ralf Exp $
+/* $Id: io.h,v 1.6 2000/01/27 23:45:30 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
@@ -12,14 +12,14 @@
#define _ASM_IO_H
#include <linux/config.h>
+#include <asm/addrspace.h>
+#include <asm/page.h>
/*
* Slowdown I/O port space accesses for antique hardware.
*/
#undef CONF_SLOWDOWN_IO
-#include <asm/addrspace.h>
-
/*
* This file contains the definitions for the MIPS counterpart of the
* x86 in/out instructions. This heap of macros and C results in much
@@ -73,12 +73,12 @@ extern unsigned long mips_io_port_base;
*/
extern inline unsigned long virt_to_phys(volatile void * address)
{
- return PHYSADDR(address);
+ return (unsigned long)address - PAGE_OFFSET;
}
extern inline void * phys_to_virt(unsigned long address)
{
- return (void *)KSEG0ADDR(address);
+ return (void *)(address + PAGE_OFFSET);
}
extern void * ioremap(unsigned long phys_addr, unsigned long size);
@@ -86,15 +86,16 @@ extern void iounmap(void *addr);
/*
* IO bus memory addresses are also 1:1 with the physical address
+ * This simplistic model doesn't hold for the Origin.
*/
extern inline unsigned long virt_to_bus(volatile void * address)
{
- return PHYSADDR(address);
+ return (unsigned long)address - PAGE_OFFSET;
}
extern inline void * bus_to_virt(unsigned long address)
{
- return (void *)KSEG0ADDR(address);
+ return (void *)(address + PAGE_OFFSET);
}
/*
@@ -181,7 +182,8 @@ extern inline void iounmap(void *addr)
* We don't have csum_partial_copy_fromio() yet, so we cheat here and
* just copy it. The net code will then do the checksum later.
*/
-#define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len))
+#define eth_io_copy_and_sum(skb,src,len,unused) memcpy_fromio((skb)->data,(src),(len))
+#define isa_eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(b),(c),(d))
static inline int
check_signature(unsigned long io_addr, const unsigned char *signature,
diff --git a/include/asm-mips64/offset.h b/include/asm-mips64/offset.h
index 8fc30f570..a7711ea2d 100644
--- a/include/asm-mips64/offset.h
+++ b/include/asm-mips64/offset.h
@@ -52,7 +52,7 @@
#define TASK_COUNTER 48
#define TASK_PRIORITY 56
#define TASK_MM 1304
-#define TASK_STRUCT_SIZE 1400
+#define TASK_STRUCT_SIZE 1448
/* MIPS specific thread_struct offsets. */
#define THREAD_REG16 864
diff --git a/include/asm-mips64/pgtable.h b/include/asm-mips64/pgtable.h
index 76ebeb925..f45b89b1f 100644
--- a/include/asm-mips64/pgtable.h
+++ b/include/asm-mips64/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: pgtable.h,v 1.5 2000/01/27 01:05:37 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
@@ -425,7 +425,6 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot));
}
-#define page_pte_prot(page,prot) mk_pte(page, prot)
#define page_pte(page) page_pte_prot(page, __pgprot(0))
/* to find an entry in a kernel page-table-directory */
@@ -657,19 +656,11 @@ extern pgd_t swapper_pg_dir[1024];
extern void (*update_mmu_cache)(struct vm_area_struct *vma,
unsigned long address, pte_t pte);
-/*
- * Non-present pages: high 24 bits are offset, next 8 bits type,
- * low 32 bits zero.
- */
-extern inline pte_t mk_swap_pte(unsigned long type, unsigned long offset)
-{
- pte_t pte; pte_val(pte) = (type << 32) | (offset << 40);
- return pte;
-}
-
-#define SWP_TYPE(entry) ((pte_val(entry) >> 32) & 0xff)
-#define SWP_OFFSET(entry) (pte_val(entry) >> 40)
-#define SWP_ENTRY(type,offset) mk_swap_pte((type),(offset))
+#define SWP_TYPE(x) (((x).val >> 32) & 0xff)
+#define SWP_OFFSET(x) ((x).val >> 40)
+#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 32) | ((offset) << 40) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })
#define module_map vmalloc
#define module_unmap vfree
diff --git a/include/asm-mips64/processor.h b/include/asm-mips64/processor.h
index b79dfceb2..188f9cce0 100644
--- a/include/asm-mips64/processor.h
+++ b/include/asm-mips64/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.6 2000/01/17 23:32:47 ralf Exp $
+/* $Id: processor.h,v 1.7 2000/01/27 23:45:30 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
@@ -221,6 +221,13 @@ extern int (*user_mode)(struct pt_regs *);
current->thread.current_ds = USER_DS; \
} while (0)
+unsigned long get_wchan(struct task_struct *p);
+
+#define __PT_REG(reg) ((long)&((struct pt_regs *)0)->reg - sizeof(struct pt_regs))
+#define __KSTK_TOS(tsk) ((unsigned long)(tsk) + KERNEL_STACK_SIZE - 32)
+#define KSTK_EIP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(cp0_epc)))
+#define KSTK_ESP(tsk) (*(unsigned long *)(__KSTK_TOS(tsk) + __PT_REG(regs[29])))
+
/* Allocation and freeing of basic task resources. */
/*
* NOTE! The task struct and the stack go together
diff --git a/include/asm-mips64/shmparam.h b/include/asm-mips64/shmparam.h
index f20fd19a6..9107b35a7 100644
--- a/include/asm-mips64/shmparam.h
+++ b/include/asm-mips64/shmparam.h
@@ -1,58 +1,12 @@
-/* $Id$
+/* $Id: shmparam.h,v 1.1 1999/08/19 22:56:35 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
* for more details.
- *
- * XXX These are obviously wrong for an 64-bit OS, let's see how we divide
- * the address space later ...
*/
#ifndef _ASM_SHMPARAM_H
#define _ASM_SHMPARAM_H
-/* address range for shared memory attaches if no address passed to shmat() */
-#define SHM_RANGE_START 0x50000000
-#define SHM_RANGE_END 0x60000000
-
-/*
- * Format of a swap-entry for shared memory pages currently out in
- * swap space (see also mm/swap.c).
- *
- * SWP_TYPE = SHM_SWP_TYPE
- * SWP_OFFSET is used as follows:
- *
- * bits 0..6 : id of shared memory segment page belongs to (SHM_ID)
- * bits 7..21: index of page within shared memory segment (SHM_IDX)
- * (actually fewer bits get used since SHMMAX is so low)
- */
-
-/*
- * Keep _SHM_ID_BITS as low as possible since SHMMNI depends on it and
- * there is a static array of size SHMMNI.
- */
-#define _SHM_ID_BITS 7
-#define SHM_ID_MASK ((1<<_SHM_ID_BITS)-1)
-
-#define SHM_IDX_SHIFT (_SHM_ID_BITS)
-#define _SHM_IDX_BITS 15
-#define SHM_IDX_MASK ((1<<_SHM_IDX_BITS)-1)
-
-/*
- * _SHM_ID_BITS + _SHM_IDX_BITS must be <= 24 on the i386 and
- * SHMMAX <= (PAGE_SIZE << _SHM_IDX_BITS).
- */
-
-#define SHMMAX 0x2000000 /* max shared seg size (bytes) */
-/* Try not to change the default shipped SHMMAX - people rely on it */
-
-#define SHMMIN 1 /* really PAGE_SIZE */ /* min shared seg size (bytes) */
-#define SHMMNI (1<<_SHM_ID_BITS) /* max num of segs system wide */
-#define SHMALL /* max shm system wide (pages) */ \
- (1<<(_SHM_IDX_BITS+_SHM_ID_BITS))
-/*
- * This constant is very large but the ABI in it's wisdom says ...
- */
#define SHMLBA 0x40000 /* attach addr a multiple of this */
-#define SHMSEG SHMMNI /* max shared segs per process */
#endif /* _ASM_SHMPARAM_H */
diff --git a/include/asm-mips64/unistd.h b/include/asm-mips64/unistd.h
index 71b27faaa..ae9b7123c 100644
--- a/include/asm-mips64/unistd.h
+++ b/include/asm-mips64/unistd.h
@@ -1,4 +1,4 @@
-/* $Id: unistd.h,v 1.5 1999/12/04 03:59:12 ralf Exp $
+/* $Id: unistd.h,v 1.6 2000/01/16 01:44:34 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
@@ -1195,11 +1195,12 @@
#define __NR_Linux32_sendfile (__NR_Linux32 + 207)
#define __NR_Linux32_getpmsg (__NR_Linux32 + 208)
#define __NR_Linux32_putpmsg (__NR_Linux32 + 209)
+#define __NR_Linux32_ugetrlimit (__NR_Linux32 + 210)
/*
* Offset of the last Linux o32 flavoured syscall
*/
-#define __NR_Linux32_syscalls 209
+#define __NR_Linux32_syscalls 210
/*
* Linux 64-bit syscalls are in the range from 5000 to 5999.
@@ -1415,11 +1416,12 @@
#define __NR_sendfile (__NR_Linux + 207)
#define __NR_getpmsg (__NR_Linux + 208)
#define __NR_putpmsg (__NR_Linux + 209)
+#define __NR_ugetrlimit (__NR_Linux + 210)
/*
* Offset of the last Linux flavoured syscall
*/
-#define __NR_Linux_syscalls 209
+#define __NR_Linux_syscalls 210
#ifndef _LANGUAGE_ASSEMBLY