diff options
-rw-r--r-- | include/linux/vmalloc.h | 8 | ||||
-rw-r--r-- | mm/vmalloc.c | 18 |
2 files changed, 13 insertions, 13 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index dcdfc2bda922..2e28f4d40d7f 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -32,7 +32,7 @@ struct vm_struct { | |||
32 | struct page **pages; | 32 | struct page **pages; |
33 | unsigned int nr_pages; | 33 | unsigned int nr_pages; |
34 | phys_addr_t phys_addr; | 34 | phys_addr_t phys_addr; |
35 | void *caller; | 35 | const void *caller; |
36 | }; | 36 | }; |
37 | 37 | ||
38 | /* | 38 | /* |
@@ -62,7 +62,7 @@ extern void *vmalloc_32_user(unsigned long size); | |||
62 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); | 62 | extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot); |
63 | extern void *__vmalloc_node_range(unsigned long size, unsigned long align, | 63 | extern void *__vmalloc_node_range(unsigned long size, unsigned long align, |
64 | unsigned long start, unsigned long end, gfp_t gfp_mask, | 64 | unsigned long start, unsigned long end, gfp_t gfp_mask, |
65 | pgprot_t prot, int node, void *caller); | 65 | pgprot_t prot, int node, const void *caller); |
66 | extern void vfree(const void *addr); | 66 | extern void vfree(const void *addr); |
67 | 67 | ||
68 | extern void *vmap(struct page **pages, unsigned int count, | 68 | extern void *vmap(struct page **pages, unsigned int count, |
@@ -85,13 +85,13 @@ static inline size_t get_vm_area_size(const struct vm_struct *area) | |||
85 | 85 | ||
86 | extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); | 86 | extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); |
87 | extern struct vm_struct *get_vm_area_caller(unsigned long size, | 87 | extern struct vm_struct *get_vm_area_caller(unsigned long size, |
88 | unsigned long flags, void *caller); | 88 | unsigned long flags, const void *caller); |
89 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | 89 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, |
90 | unsigned long start, unsigned long end); | 90 | unsigned long start, unsigned long end); |
91 | extern struct vm_struct *__get_vm_area_caller(unsigned long size, | 91 | extern struct vm_struct *__get_vm_area_caller(unsigned long size, |
92 | unsigned long flags, | 92 | unsigned long flags, |
93 | unsigned long start, unsigned long end, | 93 | unsigned long start, unsigned long end, |
94 | void *caller); | 94 | const void *caller); |
95 | extern struct vm_struct *remove_vm_area(const void *addr); | 95 | extern struct vm_struct *remove_vm_area(const void *addr); |
96 | 96 | ||
97 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 97 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 2aad49981b57..11308f034f85 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -1280,7 +1280,7 @@ DEFINE_RWLOCK(vmlist_lock); | |||
1280 | struct vm_struct *vmlist; | 1280 | struct vm_struct *vmlist; |
1281 | 1281 | ||
1282 | static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, | 1282 | static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, |
1283 | unsigned long flags, void *caller) | 1283 | unsigned long flags, const void *caller) |
1284 | { | 1284 | { |
1285 | vm->flags = flags; | 1285 | vm->flags = flags; |
1286 | vm->addr = (void *)va->va_start; | 1286 | vm->addr = (void *)va->va_start; |
@@ -1306,7 +1306,7 @@ static void insert_vmalloc_vmlist(struct vm_struct *vm) | |||
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | static void insert_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, | 1308 | static void insert_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, |
1309 | unsigned long flags, void *caller) | 1309 | unsigned long flags, const void *caller) |
1310 | { | 1310 | { |
1311 | setup_vmalloc_vm(vm, va, flags, caller); | 1311 | setup_vmalloc_vm(vm, va, flags, caller); |
1312 | insert_vmalloc_vmlist(vm); | 1312 | insert_vmalloc_vmlist(vm); |
@@ -1314,7 +1314,7 @@ static void insert_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, | |||
1314 | 1314 | ||
1315 | static struct vm_struct *__get_vm_area_node(unsigned long size, | 1315 | static struct vm_struct *__get_vm_area_node(unsigned long size, |
1316 | unsigned long align, unsigned long flags, unsigned long start, | 1316 | unsigned long align, unsigned long flags, unsigned long start, |
1317 | unsigned long end, int node, gfp_t gfp_mask, void *caller) | 1317 | unsigned long end, int node, gfp_t gfp_mask, const void *caller) |
1318 | { | 1318 | { |
1319 | struct vmap_area *va; | 1319 | struct vmap_area *va; |
1320 | struct vm_struct *area; | 1320 | struct vm_struct *area; |
@@ -1375,7 +1375,7 @@ EXPORT_SYMBOL_GPL(__get_vm_area); | |||
1375 | 1375 | ||
1376 | struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags, | 1376 | struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags, |
1377 | unsigned long start, unsigned long end, | 1377 | unsigned long start, unsigned long end, |
1378 | void *caller) | 1378 | const void *caller) |
1379 | { | 1379 | { |
1380 | return __get_vm_area_node(size, 1, flags, start, end, -1, GFP_KERNEL, | 1380 | return __get_vm_area_node(size, 1, flags, start, end, -1, GFP_KERNEL, |
1381 | caller); | 1381 | caller); |
@@ -1397,7 +1397,7 @@ struct vm_struct *get_vm_area(unsigned long size, unsigned long flags) | |||
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags, | 1399 | struct vm_struct *get_vm_area_caller(unsigned long size, unsigned long flags, |
1400 | void *caller) | 1400 | const void *caller) |
1401 | { | 1401 | { |
1402 | return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END, | 1402 | return __get_vm_area_node(size, 1, flags, VMALLOC_START, VMALLOC_END, |
1403 | -1, GFP_KERNEL, caller); | 1403 | -1, GFP_KERNEL, caller); |
@@ -1568,9 +1568,9 @@ EXPORT_SYMBOL(vmap); | |||
1568 | 1568 | ||
1569 | static void *__vmalloc_node(unsigned long size, unsigned long align, | 1569 | static void *__vmalloc_node(unsigned long size, unsigned long align, |
1570 | gfp_t gfp_mask, pgprot_t prot, | 1570 | gfp_t gfp_mask, pgprot_t prot, |
1571 | int node, void *caller); | 1571 | int node, const void *caller); |
1572 | static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, | 1572 | static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, |
1573 | pgprot_t prot, int node, void *caller) | 1573 | pgprot_t prot, int node, const void *caller) |
1574 | { | 1574 | { |
1575 | const int order = 0; | 1575 | const int order = 0; |
1576 | struct page **pages; | 1576 | struct page **pages; |
@@ -1643,7 +1643,7 @@ fail: | |||
1643 | */ | 1643 | */ |
1644 | void *__vmalloc_node_range(unsigned long size, unsigned long align, | 1644 | void *__vmalloc_node_range(unsigned long size, unsigned long align, |
1645 | unsigned long start, unsigned long end, gfp_t gfp_mask, | 1645 | unsigned long start, unsigned long end, gfp_t gfp_mask, |
1646 | pgprot_t prot, int node, void *caller) | 1646 | pgprot_t prot, int node, const void *caller) |
1647 | { | 1647 | { |
1648 | struct vm_struct *area; | 1648 | struct vm_struct *area; |
1649 | void *addr; | 1649 | void *addr; |
@@ -1699,7 +1699,7 @@ fail: | |||
1699 | */ | 1699 | */ |
1700 | static void *__vmalloc_node(unsigned long size, unsigned long align, | 1700 | static void *__vmalloc_node(unsigned long size, unsigned long align, |
1701 | gfp_t gfp_mask, pgprot_t prot, | 1701 | gfp_t gfp_mask, pgprot_t prot, |
1702 | int node, void *caller) | 1702 | int node, const void *caller) |
1703 | { | 1703 | { |
1704 | return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END, | 1704 | return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END, |
1705 | gfp_mask, prot, node, caller); | 1705 | gfp_mask, prot, node, caller); |