Commit 034c6efa authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

perf, amd: Use kmalloc_node(,__GFP_ZERO) for northbridge structure allocation

Jasper suggested we use the zeroing capability of the allocators
instead of calling memset ourselves. Add node affinity while we're at
it.
Reported-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent eed01528
...@@ -280,11 +280,11 @@ static struct amd_nb *amd_alloc_nb(int cpu, int nb_id) ...@@ -280,11 +280,11 @@ static struct amd_nb *amd_alloc_nb(int cpu, int nb_id)
struct amd_nb *nb; struct amd_nb *nb;
int i; int i;
nb = kmalloc(sizeof(struct amd_nb), GFP_KERNEL); nb = kmalloc_node(sizeof(struct amd_nb), GFP_KERNEL | __GFP_ZERO,
cpu_to_node(cpu));
if (!nb) if (!nb)
return NULL; return NULL;
memset(nb, 0, sizeof(*nb));
nb->nb_id = nb_id; nb->nb_id = nb_id;
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment