Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115867
b: refs/heads/master
c: db64fe0
h: refs/heads/master
i:
  115865: 5c642f6
  115863: 54c5a8d
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Oct 20, 2008
1 parent 881a891 commit 5b56cc9
Show file tree
Hide file tree
Showing 7 changed files with 863 additions and 135 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cb8f488c33539f096580e202f5438a809195008f
refs/heads/master: db64fe02258f1507e13fe5212a989922323685ce
2 changes: 2 additions & 0 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
/* Must avoid aliasing mappings in the highmem code */
kmap_flush_unused();

vm_unmap_aliases();

cpa.vaddr = addr;
cpa.numpages = numpages;
cpa.mask_set = mask_set;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ static void xen_alloc_ptpage(struct mm_struct *mm, unsigned long pfn, unsigned l
/* make sure there are no stray mappings of
this page */
kmap_flush_unused();
vm_unmap_aliases();
}
}

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@ static void __xen_pgd_pin(struct mm_struct *mm, pgd_t *pgd)
/* re-enable interrupts for kmap_flush_unused */
xen_mc_issue(0);
kmap_flush_unused();
vm_unmap_aliases();
xen_mc_batch();
}

Expand Down
15 changes: 14 additions & 1 deletion trunk/include/linux/vmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define _LINUX_VMALLOC_H

#include <linux/spinlock.h>
#include <linux/init.h>
#include <asm/page.h> /* pgprot_t */

struct vm_area_struct; /* vma defining user mapping in mm_types.h */
Expand All @@ -23,7 +24,6 @@ struct vm_area_struct; /* vma defining user mapping in mm_types.h */
#endif

struct vm_struct {
/* keep next,addr,size together to speedup lookups */
struct vm_struct *next;
void *addr;
unsigned long size;
Expand All @@ -37,6 +37,19 @@ struct vm_struct {
/*
* Highlevel APIs for driver use
*/
extern void vm_unmap_ram(const void *mem, unsigned int count);
extern void *vm_map_ram(struct page **pages, unsigned int count,
int node, pgprot_t prot);
extern void vm_unmap_aliases(void);

#ifdef CONFIG_MMU
extern void __init vmalloc_init(void);
#else
static inline void vmalloc_init(void)
{
}
#endif

extern void *vmalloc(unsigned long size);
extern void *vmalloc_user(unsigned long size);
extern void *vmalloc_node(unsigned long size, int node);
Expand Down
2 changes: 2 additions & 0 deletions trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/gfp.h>
#include <linux/percpu.h>
#include <linux/kmod.h>
#include <linux/vmalloc.h>
#include <linux/kernel_stat.h>
#include <linux/start_kernel.h>
#include <linux/security.h>
Expand Down Expand Up @@ -642,6 +643,7 @@ asmlinkage void __init start_kernel(void)
initrd_start = 0;
}
#endif
vmalloc_init();
vfs_caches_init_early();
cpuset_init_early();
mem_init();
Expand Down
Loading

0 comments on commit 5b56cc9

Please sign in to comment.