patch-1.3.44 linux/arch/sparc/mm/loadmmu.c
Next file: linux/arch/sparc/mm/mbus.c
Previous file: linux/arch/sparc/mm/init.c
Back to the patch index
Back to the overall index
- Lines: 105
- Date:
Sat Nov 25 02:59:26 1995
- Orig file:
v1.3.43/linux/arch/sparc/mm/loadmmu.c
- Orig date:
Sun Sep 3 12:26:49 1995
diff -u --recursive --new-file v1.3.43/linux/arch/sparc/mm/loadmmu.c linux/arch/sparc/mm/loadmmu.c
@@ -1,16 +1,38 @@
-/* loadmmu.c: This code loads up all the mm function pointers once the
+/* $Id: loadmmu.c,v 1.13 1995/11/25 00:59:24 davem Exp $
+ * loadmmu.c: This code loads up all the mm function pointers once the
* machine type has been determined. It also sets the static
* mmu values such as PAGE_NONE, etc.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
+#include <linux/kernel.h>
+
#include <asm/system.h>
#include <asm/page.h>
#include <asm/pgtable.h>
+struct ctx_list *ctx_list_pool;
+struct ctx_list ctx_free;
+struct ctx_list ctx_used;
+
+void (*mmu_exit_hook)(void *);
+void (*mmu_fork_hook)(void *, unsigned long);
+void (*mmu_release_hook)(void *);
+void (*mmu_flush_hook)(void *);
+void (*mmu_task_cacheflush)(void *);
+
+char *(*mmu_lockarea)(char *, unsigned long);
+void (*mmu_unlockarea)(char *, unsigned long);
+char *(*mmu_get_scsi_buffer)(char *, unsigned long);
+void (*mmu_release_scsi_buffer)(char *, unsigned long);
+
+
+int (*get_fault_info)(unsigned long *, unsigned long *, unsigned long);
+void (*update_mmu_cache)(struct vm_area_struct *vma, unsigned long address, pte_t pte);
+
void (*invalidate)(void);
-void (*set_pte)(pte_t *ptep, pte_t entry);
+void (*set_pte)(pte_t *pteptr, pte_t pteval);
unsigned int pmd_shift, pmd_size, pmd_mask;
unsigned int (*pmd_align)(unsigned int);
@@ -21,14 +43,13 @@
pgprot_t page_none, page_shared, page_copy, page_readonly, page_kernel;
pgprot_t page_invalid;
-/* Grrr... function pointers galore... */
unsigned long (*pte_page)(pte_t);
unsigned long (*pmd_page)(pmd_t);
unsigned long (*pgd_page)(pgd_t);
void (*sparc_update_rootmmu_dir)(struct task_struct *, pgd_t *pgdir);
unsigned long (*(vmalloc_start))(void);
-void (*switch_to_context)(int);
+void (*switch_to_context)(void *vtask);
int (*pte_none)(pte_t);
int (*pte_present)(pte_t);
@@ -51,9 +72,9 @@
void (*pgd_reuse)(pgd_t *);
pte_t (*mk_pte)(unsigned long, pgprot_t);
-void (*pgd_set)(pgd_t *, pte_t *);
+void (*pgd_set)(pgd_t *, pmd_t *);
pte_t (*pte_modify)(pte_t, pgprot_t);
-pgd_t * (*pgd_offset)(struct task_struct *, unsigned long);
+pgd_t * (*pgd_offset)(struct mm_struct *, unsigned long);
pmd_t * (*pmd_offset)(pgd_t *, unsigned long);
pte_t * (*pte_offset)(pmd_t *, unsigned long);
void (*pte_free_kernel)(pte_t *);
@@ -70,10 +91,6 @@
pgd_t * (*pgd_alloc)(void);
-/*
- * The following only work if pte_present() is true.
- * Undefined behaviour if not..
- */
int (*pte_read)(pte_t);
int (*pte_write)(pte_t);
int (*pte_exec)(pte_t);
@@ -94,6 +111,9 @@
pte_t (*pte_mkyoung)(pte_t);
pte_t (*pte_mkcow)(pte_t);
+unsigned long (*sparc_virt_to_phys)(unsigned long);
+unsigned long (*sparc_phys_to_virt)(unsigned long);
+
extern void ld_mmu_sun4c(void);
extern void ld_mmu_srmmu(void);
@@ -110,10 +130,9 @@
ld_mmu_srmmu();
break;
default:
- printk("load_mmu: MMU support not available for this architecture\n");
- printk("load_mmu: sparc_cpu_model = %d\n", (int) sparc_cpu_model);
- printk("load_mmu: Halting...\n");
- halt();
+ printk("load_mmu:MMU support not available for this architecture\n");
+ printk("load_mmu:sparc_cpu_model = %d\n", (int) sparc_cpu_model);
+ printk("load_mmu:Halting...\n");
+ panic("load_mmu()");
};
- return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this