]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-sh/mmu.h
ARM: OMAP: Add mailbox support for IVA
[linux-2.6-omap-h63xx.git] / include / asm-sh / mmu.h
index 91c884634276fd1d5dad7cdb85e4165b7415188e..eb0358c097d01a3c236b83400e03aa2ac5b757b7 100644 (file)
@@ -1,31 +1,19 @@
 #ifndef __MMU_H
 #define __MMU_H
 
-#if !defined(CONFIG_MMU)
-
-struct mm_rblock_struct {
-       int     size;
-       int     refcount;
-       void    *kblock;
-};
-
-struct mm_tblock_struct {
-       struct mm_rblock_struct *rblock;
-       struct mm_tblock_struct *next;
-};
+/* Default "unsigned long" context */
+typedef unsigned long mm_context_id_t[NR_CPUS];
 
 typedef struct {
-       struct mm_tblock_struct tblock;
+#ifdef CONFIG_MMU
+       mm_context_id_t         id;
+       void                    *vdso;
+#else
+       struct vm_list_struct   *vmlist;
        unsigned long           end_brk;
+#endif
 } mm_context_t;
 
-#else
-
-/* Default "unsigned long" context */
-typedef unsigned long mm_context_t;
-
-#endif /* CONFIG_MMU */
-
 /*
  * Privileged Space Mapping Buffer (PMB) definitions
  */
@@ -50,6 +38,8 @@ typedef unsigned long mm_context_t;
 
 #define PMB_NO_ENTRY           (-1)
 
+struct pmb_entry;
+
 struct pmb_entry {
        unsigned long vpn;
        unsigned long ppn;
@@ -60,16 +50,23 @@ struct pmb_entry {
         * PMB_NO_ENTRY to search for a free one
         */
        int entry;
+
+       struct pmb_entry *next;
+       /* Adjacent entry link for contiguous multi-entry mappings */
+       struct pmb_entry *link;
 };
 
 /* arch/sh/mm/pmb.c */
 int __set_pmb_entry(unsigned long vpn, unsigned long ppn,
                    unsigned long flags, int *entry);
-void set_pmb_entry(struct pmb_entry *pmbe);
+int set_pmb_entry(struct pmb_entry *pmbe);
 void clear_pmb_entry(struct pmb_entry *pmbe);
 struct pmb_entry *pmb_alloc(unsigned long vpn, unsigned long ppn,
                            unsigned long flags);
 void pmb_free(struct pmb_entry *pmbe);
+long pmb_remap(unsigned long virt, unsigned long phys,
+              unsigned long size, unsigned long flags);
+void pmb_unmap(unsigned long addr);
 
 #endif /* __MMU_H */