summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1997-07-31 22:57:10 +0000
committerMiguel de Icaza <miguel@nuclecu.unam.mx>1997-07-31 22:57:10 +0000
commit9765588f1533bde5f6af8056525368b301d72989 (patch)
treeeecfacde0115baf8cd67323981b2e20404fc683d /include
parent5fd44fa07fcc1a00e75622a2ae5f6463a6c06be0 (diff)
Changes required to share a piece of memory between kernel in
interrupt-land and a user application. Vmalloc is now an inline function that calls vmalloc_prot with the original protection bits used in vmalloc.
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/pgtable.h4
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/vmalloc.h11
3 files changed, 14 insertions, 3 deletions
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index f8785b9b5..3717bb398 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -16,6 +16,7 @@
* - 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);
@@ -132,6 +133,9 @@ extern void (*add_wired_entry)(unsigned long entrylo0, unsigned long entrylo1,
_CACHE_CACHABLE_NONCOHERENT)
#define PAGE_USERIO __pgprot(_PAGE_PRESENT | _PAGE_READ | _PAGE_WRITE | \
_CACHE_UNCACHED)
+#define PAGE_KERNEL_UNCACHED __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | \
+ _CACHE_UNCACHED)
+
/*
* MIPS can't do page protection for execute, and considers that the same like
* read. Also, write permissions imply read permissions. This is the closest
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bfde668c7..674f69479 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -273,7 +273,7 @@ extern void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned
extern int copy_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *vma);
extern int remap_page_range(unsigned long from, unsigned long to, unsigned long size, pgprot_t prot);
extern int zeromap_page_range(unsigned long from, unsigned long size, pgprot_t prot);
-
+extern int vmap_page_range (unsigned long from, unsigned long size, unsigned long vaddr);
extern void vmtruncate(struct inode * inode, unsigned long offset);
extern void handle_mm_fault(struct task_struct *tsk,struct vm_area_struct *vma, unsigned long address, int write_access);
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 40072ab47..ad7447530 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -15,10 +15,17 @@ struct vm_struct {
struct vm_struct * get_vm_area(unsigned long size);
void vfree(void * addr);
-void * vmalloc(unsigned long size);
+void * vmalloc_prot(unsigned long size, pgprot_t prot);
+void * vmalloc_uncached(unsigned long size);
+
+extern inline void * vmalloc(unsigned long size)
+{
+ vmalloc_prot (size, PAGE_KERNEL);
+}
+
int vread(char *buf, char *addr, int count);
void vmfree_area_pages(unsigned long address, unsigned long size);
-int vmalloc_area_pages(unsigned long address, unsigned long size);
+int vmalloc_area_pages(unsigned long address, unsigned long size, pgprot_t prot);
extern inline void set_pgdir(unsigned long address, pgd_t entry)
{