summaryrefslogtreecommitdiffstats
path: root/include/asm-mips64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips64')
-rw-r--r--include/asm-mips64/elf.h5
-rw-r--r--include/asm-mips64/io.h12
-rw-r--r--include/asm-mips64/offset.h46
-rw-r--r--include/asm-mips64/page.h9
-rw-r--r--include/asm-mips64/pci.h40
-rw-r--r--include/asm-mips64/pgalloc.h39
-rw-r--r--include/asm-mips64/pgtable.h44
-rw-r--r--include/asm-mips64/processor.h5
-rw-r--r--include/asm-mips64/ptrace.h6
9 files changed, 133 insertions, 73 deletions
diff --git a/include/asm-mips64/elf.h b/include/asm-mips64/elf.h
index f7724d9c8..80e08fa5e 100644
--- a/include/asm-mips64/elf.h
+++ b/include/asm-mips64/elf.h
@@ -1,4 +1,4 @@
-/* $Id$
+/* $Id: elf.h,v 1.3 2000/01/17 23:32:47 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
@@ -7,6 +7,9 @@
#ifndef _ASM_ELF_H
#define _ASM_ELF_H
+#include <asm/ptrace.h>
+#include <asm/user.h>
+
#ifndef ELF_ARCH
/* ELF register definitions */
#define ELF_NGREG 45
diff --git a/include/asm-mips64/io.h b/include/asm-mips64/io.h
index 8afd3873d..f09fea50d 100644
--- a/include/asm-mips64/io.h
+++ b/include/asm-mips64/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.8 2000/01/31 21:34:07 kanoj Exp $
+/* $Id: io.h,v 1.9 2000/02/04 07:40:53 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
@@ -389,9 +389,13 @@ extern inline void dma_cache_inv(unsigned long start, unsigned long size)
#else
-extern void (*dma_cache_wback_inv)(unsigned long start, unsigned long size);
-extern void (*dma_cache_wback)(unsigned long start, unsigned long size);
-extern void (*dma_cache_inv)(unsigned long start, unsigned long size);
+extern void (*_dma_cache_wback_inv)(unsigned long start, unsigned long size);
+extern void (*_dma_cache_wback)(unsigned long start, unsigned long size);
+extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
+
+#define dma_cache_wback_inv(start,size) _dma_cache_wback_inv(start,size)
+#define dma_cache_wback(start,size) _dma_cache_wback(start,size)
+#define dma_cache_inv(start,size) _dma_cache_inv(start,size)
#endif
diff --git a/include/asm-mips64/offset.h b/include/asm-mips64/offset.h
index abe647224..b0d9e97c3 100644
--- a/include/asm-mips64/offset.h
+++ b/include/asm-mips64/offset.h
@@ -52,35 +52,35 @@
#define TASK_COUNTER 56
#define TASK_PRIORITY 64
#define TASK_MM 80
-#define TASK_STRUCT_SIZE 1456
+#define TASK_STRUCT_SIZE 1480
/* MIPS specific thread_struct offsets. */
-#define THREAD_REG16 888
-#define THREAD_REG17 896
-#define THREAD_REG18 904
-#define THREAD_REG19 912
-#define THREAD_REG20 920
-#define THREAD_REG21 928
-#define THREAD_REG22 936
-#define THREAD_REG23 944
-#define THREAD_REG29 952
-#define THREAD_REG30 960
-#define THREAD_REG31 968
-#define THREAD_STATUS 976
-#define THREAD_FPU 984
-#define THREAD_BVADDR 1248
-#define THREAD_BUADDR 1256
-#define THREAD_ECODE 1264
-#define THREAD_TRAPNO 1272
-#define THREAD_MFLAGS 1280
-#define THREAD_CURDS 1288
-#define THREAD_TRAMP 1296
-#define THREAD_OLDCTX 1304
+#define THREAD_REG16 896
+#define THREAD_REG17 904
+#define THREAD_REG18 912
+#define THREAD_REG19 920
+#define THREAD_REG20 928
+#define THREAD_REG21 936
+#define THREAD_REG22 944
+#define THREAD_REG23 952
+#define THREAD_REG29 960
+#define THREAD_REG30 968
+#define THREAD_REG31 976
+#define THREAD_STATUS 984
+#define THREAD_FPU 992
+#define THREAD_BVADDR 1256
+#define THREAD_BUADDR 1264
+#define THREAD_ECODE 1272
+#define THREAD_TRAPNO 1280
+#define THREAD_MFLAGS 1288
+#define THREAD_CURDS 1296
+#define THREAD_TRAMP 1304
+#define THREAD_OLDCTX 1312
/* Linux mm_struct offsets. */
#define MM_USERS 32
#define MM_PGD 24
-#define MM_CONTEXT 96
+#define MM_CONTEXT 112
/* Linux sigcontext offsets. */
#define SC_REGS 0
diff --git a/include/asm-mips64/page.h b/include/asm-mips64/page.h
index 74201e286..287c2995a 100644
--- a/include/asm-mips64/page.h
+++ b/include/asm-mips64/page.h
@@ -1,4 +1,4 @@
-/* $Id: page.h,v 1.4 2000/01/27 01:05:37 ralf Exp $
+/* $Id: page.h,v 1.5 2000/02/06 00:20:27 kanoj 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
@@ -24,8 +24,11 @@
#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0=0; } while (0)
#define PAGE_BUG(page) do { BUG(); } while (0)
-extern void (*clear_page)(void * page);
-extern void (*copy_page)(void * to, void * from);
+extern void (*_clear_page)(void * page);
+extern void (*_copy_page)(void * to, void * from);
+
+#define clear_page(page) _clear_page(page)
+#define copy_page(to, from) _copy_page(to, from)
/*
* These are used to make use of C type-checking..
diff --git a/include/asm-mips64/pci.h b/include/asm-mips64/pci.h
index a1e0e992e..217eea7d3 100644
--- a/include/asm-mips64/pci.h
+++ b/include/asm-mips64/pci.h
@@ -1,4 +1,4 @@
-/* $Id: pci.h,v 1.2 2000/02/16 01:07:49 ralf Exp $
+/* $Id: pci.h,v 1.3 2000/02/18 00:24:48 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
@@ -63,8 +63,11 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
* until either pci_unmap_single or pci_dma_sync_single is performed.
*/
extern inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
- size_t size)
+ size_t size, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
dma_cache_wback_inv((unsigned long)ptr, size);
return virt_to_bus(ptr);
@@ -79,8 +82,11 @@ extern inline dma_addr_t pci_map_single(struct pci_dev *hwdev, void *ptr,
* whatever the device wrote there.
*/
extern inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
- size_t size)
+ size_t size, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
/* Nothing to do */
}
@@ -101,12 +107,17 @@ extern inline void pci_unmap_single(struct pci_dev *hwdev, dma_addr_t dma_addr,
* the same here.
*/
extern inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
- int nents)
+ int nents, int direction)
{
- /* Make sure that gcc doesn't leave the empty loop body. */
#ifndef CONFIG_COHERENT_IO
int i;
+#endif
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
+ /* Make sure that gcc doesn't leave the empty loop body. */
+#ifndef CONFIG_COHERENT_IO
for (i = 0; i < nents; i++, sg++)
dma_cache_wback_inv((unsigned long)sg->address, sg->length);
#endif
@@ -120,8 +131,11 @@ extern inline int pci_map_sg(struct pci_dev *hwdev, struct scatterlist *sg,
* pci_unmap_single() above.
*/
extern inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
- int nents)
+ int nents, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
/* Nothing to do */
}
@@ -137,8 +151,11 @@ extern inline void pci_unmap_sg(struct pci_dev *hwdev, struct scatterlist *sg,
*/
extern inline void pci_dma_sync_single(struct pci_dev *hwdev,
dma_addr_t dma_handle,
- size_t size)
+ size_t size, int direction)
{
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
dma_cache_wback_inv((unsigned long)bus_to_virt(dma_handle), size);
}
@@ -151,12 +168,17 @@ extern inline void pci_dma_sync_single(struct pci_dev *hwdev,
*/
extern inline void pci_dma_sync_sg(struct pci_dev *hwdev,
struct scatterlist *sg,
- int nelems)
+ int nelems, int direction)
{
- /* Make sure that gcc doesn't leave the empty loop body. */
#ifndef CONFIG_COHERENT_IO
int i;
+#endif
+ if (direction == PCI_DMA_NONE)
+ BUG();
+
+ /* Make sure that gcc doesn't leave the empty loop body. */
+#ifndef CONFIG_COHERENT_IO
for (i = 0; i < nelems; i++, sg++)
dma_cache_wback_inv((unsigned long)sg->address, sg->length);
#endif
diff --git a/include/asm-mips64/pgalloc.h b/include/asm-mips64/pgalloc.h
index 1e5de6c96..54e95eaf0 100644
--- a/include/asm-mips64/pgalloc.h
+++ b/include/asm-mips64/pgalloc.h
@@ -1,4 +1,4 @@
-/* $Id: pgalloc.h,v 1.1 2000/02/04 07:40:53 ralf Exp $
+/* $Id: pgalloc.h,v 1.2 2000/02/23 00:41:38 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
@@ -10,23 +10,6 @@
#ifndef _ASM_PGALLOC_H
#define _ASM_PGALLOC_H
-/* Cache flushing:
- *
- * - flush_cache_all() flushes entire cache
- * - flush_cache_mm(mm) flushes the specified mm context's cache lines
- * - flush_cache_page(mm, vmaddr) flushes a single page
- * - flush_cache_range(mm, start, end) flushes a range of pages
- * - flush_page_to_ram(page) write back kernel page to ram
- */
-extern void (*flush_cache_all)(void);
-extern void (*flush_cache_mm)(struct mm_struct *mm);
-extern void (*flush_cache_range)(struct mm_struct *mm, unsigned long start,
- unsigned long end);
-extern void (*flush_cache_page)(struct vm_area_struct *vma, unsigned long page);
-extern void (*flush_cache_sigtramp)(unsigned long addr);
-extern void (*flush_page_to_ram)(struct page * page);
-#define flush_icache_range(start, end) flush_cache_all()
-
/* TLB flushing:
*
* - flush_tlb_all() flushes all processes TLB entries
@@ -34,12 +17,22 @@ extern void (*flush_page_to_ram)(struct page * page);
* - flush_tlb_page(mm, vmaddr) flushes a single page
* - flush_tlb_range(mm, start, end) flushes a range of pages
*/
-extern void (*flush_tlb_all)(void);
-extern void (*flush_tlb_mm)(struct mm_struct *mm);
-extern void (*flush_tlb_range)(struct mm_struct *mm, unsigned long start,
+extern void (*_flush_tlb_all)(void);
+extern void (*_flush_tlb_mm)(struct mm_struct *mm);
+extern void (*_flush_tlb_range)(struct mm_struct *mm, unsigned long start,
unsigned long end);
-extern void (*flush_tlb_page)(struct vm_area_struct *vma, unsigned long page);
-extern inline void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end);
+extern void (*_flush_tlb_page)(struct vm_area_struct *vma, unsigned long page);
+
+#define flush_tlb_all() _flush_tlb_all()
+#define flush_tlb_mm(mm) _flush_tlb_mm(mm)
+#define flush_tlb_range(mm,vmaddr,end) _flush_tlb_range(mm, vmaddr, end)
+#define flush_tlb_page(vma,page) _flush_tlb_page(vma, page)
+
+extern inline void flush_tlb_pgtables(struct mm_struct *mm,
+ unsigned long start, unsigned long end)
+{
+ /* Nothing to do on MIPS. */
+}
/*
diff --git a/include/asm-mips64/pgtable.h b/include/asm-mips64/pgtable.h
index f0ba45505..a136a3797 100644
--- a/include/asm-mips64/pgtable.h
+++ b/include/asm-mips64/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.10 2000/02/10 21:38:10 kanoj Exp $
+/* $Id: pgtable.h,v 1.11 2000/02/23 00:41:38 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
@@ -20,9 +20,32 @@
#include <linux/mmzone.h>
#include <asm/cachectl.h>
-extern __inline__ void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end)
-{
-}
+/* Cache flushing:
+ *
+ * - flush_cache_all() flushes entire cache
+ * - flush_cache_mm(mm) flushes the specified mm context's cache lines
+ * - flush_cache_page(mm, vmaddr) flushes a single page
+ * - flush_cache_range(mm, start, end) flushes a range of pages
+ * - flush_page_to_ram(page) write back kernel page to ram
+ */
+extern void (*_flush_cache_all)(void);
+extern void (*_flush_cache_mm)(struct mm_struct *mm);
+extern void (*_flush_cache_range)(struct mm_struct *mm, unsigned long start,
+ unsigned long end);
+extern void (*_flush_cache_page)(struct vm_area_struct *vma, unsigned long page);
+extern void (*_flush_cache_sigtramp)(unsigned long addr);
+extern void (*_flush_page_to_ram)(struct page * page);
+
+#define flush_cache_all() _flush_cache_all()
+#define flush_cache_mm(mm) _flush_cache_mm(mm)
+#define flush_cache_range(mm,start,end) _flush_cache_range(mm,start,end)
+#define flush_cache_page(vma,page) _flush_cache_page(vma, page)
+#define flush_cache_sigtramp(addr) _flush_cache_sigtramp(addr)
+#define flush_page_to_ram(page) _flush_page_to_ram(page)
+
+#define flush_icache_range(start, end) flush_cache_all()
+#define flush_icache_page(start, page) do { } while(0)
+
/* Basically we have the same two-level (which is the logical three level
* Linux page table layout folded) page tables as the i386. Some day
@@ -416,10 +439,12 @@ extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
/* to find an entry in a kernel page-table-directory */
#define pgd_offset_k(address) pgd_offset(&init_mm, address)
+#define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
+
/* to find an entry in a page-table-directory */
extern inline pgd_t *pgd_offset(struct mm_struct *mm, unsigned long address)
{
- return mm->pgd + ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1));
+ return mm->pgd + pgd_index(address);
}
/* Find an entry in the second-level page table.. */
@@ -448,9 +473,16 @@ 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(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 SWP_ENTRY(type,offset) ((swp_entry_t) { pte_val(mk_swap_pte((type),(offset))) })
#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
#define swp_entry_to_pte(x) ((pte_t) { (x).val })
diff --git a/include/asm-mips64/processor.h b/include/asm-mips64/processor.h
index 664fc3dc1..f70258639 100644
--- a/include/asm-mips64/processor.h
+++ b/include/asm-mips64/processor.h
@@ -1,4 +1,4 @@
-/* $Id: processor.h,v 1.8 2000/01/29 01:42:28 ralf Exp $
+/* $Id: processor.h,v 1.9 2000/02/05 06:47: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
@@ -208,7 +208,8 @@ extern inline unsigned long thread_saved_pc(struct thread_struct *t)
}
struct pt_regs;
-extern int (*user_mode)(struct pt_regs *);
+extern int (*_user_mode)(struct pt_regs *);
+#define user_mode(regs) _user_mode(regs)
/*
* Do necessary setup to start up a newly executed thread.
diff --git a/include/asm-mips64/ptrace.h b/include/asm-mips64/ptrace.h
index 3e61613ca..ff5745e24 100644
--- a/include/asm-mips64/ptrace.h
+++ b/include/asm-mips64/ptrace.h
@@ -1,4 +1,4 @@
-/* $Id: ptrace.h,v 1.2 1999/09/28 22:27:19 ralf Exp $
+/* $Id: ptrace.h,v 1.3 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
@@ -64,7 +64,9 @@ struct pt_regs {
#ifndef __ASSEMBLY__
#define instruction_pointer(regs) ((regs)->cp0_epc)
-extern void (*show_regs)(struct pt_regs *);
+extern void (*_show_regs)(struct pt_regs *);
+#define show_regs(regs) _show_regs(regs)
+
#endif /* !(__ASSEMBLY__) */
#endif