projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git]
/
mm
/
percpu.c
diff --git
a/mm/percpu.c
b/mm/percpu.c
index
8a943b9
..
998607a
100644
(file)
--- a/
mm/percpu.c
+++ b/
mm/percpu.c
@@
-305,16
+305,12
@@
static void *pcpu_mem_zalloc(size_t size)
/**
* pcpu_mem_free - free memory
* @ptr: memory to free
/**
* pcpu_mem_free - free memory
* @ptr: memory to free
- * @size: size of the area
*
* Free @ptr. @ptr should have been allocated using pcpu_mem_zalloc().
*/
*
* Free @ptr. @ptr should have been allocated using pcpu_mem_zalloc().
*/
-static void pcpu_mem_free(void *ptr
, size_t size
)
+static void pcpu_mem_free(void *ptr)
{
{
- if (size <= PAGE_SIZE)
- kfree(ptr);
- else
- vfree(ptr);
+ kvfree(ptr);
}
/**
}
/**
@@
-463,8
+459,8
@@
out_unlock:
* pcpu_mem_free() might end up calling vfree() which uses
* IRQ-unsafe lock and thus can't be called under pcpu_lock.
*/
* pcpu_mem_free() might end up calling vfree() which uses
* IRQ-unsafe lock and thus can't be called under pcpu_lock.
*/
- pcpu_mem_free(old
, old_size
);
- pcpu_mem_free(new
, new_size
);
+ pcpu_mem_free(old);
+ pcpu_mem_free(new);
return 0;
}
return 0;
}
@@
-732,7
+728,7
@@
static struct pcpu_chunk *pcpu_alloc_chunk(void)
chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC *
sizeof(chunk->map[0]));
if (!chunk->map) {
chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC *
sizeof(chunk->map[0]));
if (!chunk->map) {
- pcpu_mem_free(chunk
, pcpu_chunk_struct_size
);
+ pcpu_mem_free(chunk);
return NULL;
}
return NULL;
}
@@
-753,8
+749,8
@@
static void pcpu_free_chunk(struct pcpu_chunk *chunk)
{
if (!chunk)
return;
{
if (!chunk)
return;
- pcpu_mem_free(chunk->map
, chunk->map_alloc * sizeof(chunk->map[0])
);
- pcpu_mem_free(chunk
, pcpu_chunk_struct_size
);
+ pcpu_mem_free(chunk->map);
+ pcpu_mem_free(chunk);
}
/**
}
/**