Skip to content

Commit

Permalink
[IA64] perfmon: Change vmalloc to vzalloc and drop memset.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesper Juhl authored and Tony Luck committed Dec 28, 2010
1 parent 75c1c91 commit e21763d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e21763d

Please sign in to comment.