mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
[IA64] perfmon: Change vmalloc to vzalloc and drop memset.
vzalloc() nicely zeroes memory for us, so we don't have to do a vmalloc() and then manually memset() the returned memory when all we want is for it to be zero. Patch changes this for pfm_rvmalloc(). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
parent
75c1c91cb9
commit
e21763dbce
1 changed files with 1 additions and 2 deletions
|
@ -829,10 +829,9 @@ pfm_rvmalloc(unsigned long size)
|
|||
unsigned long addr;
|
||||
|
||||
size = PAGE_ALIGN(size);
|
||||
mem = vmalloc(size);
|
||||
mem = vzalloc(size);
|
||||
if (mem) {
|
||||
//printk("perfmon: CPU%d pfm_rvmalloc(%ld)=%p\n", smp_processor_id(), size, mem);
|
||||
memset(mem, 0, size);
|
||||
addr = (unsigned long)mem;
|
||||
while (size > 0) {
|
||||
pfm_reserve_page(addr);
|
||||
|
|
Loading…
Reference in a new issue