Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188272
b: refs/heads/master
c: 220b140
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mackerras authored and Ingo Molnar committed Mar 11, 2010
1 parent 058b655 commit add76f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97d5a22005f38057b4bc0d95f81cd26510268794
refs/heads/master: 220b140b52ab6cc133f674a7ffec8fa792054f25
13 changes: 12 additions & 1 deletion trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -5368,12 +5368,22 @@ int perf_event_init_task(struct task_struct *child)
return ret;
}

static void __init perf_event_init_all_cpus(void)
{
int cpu;
struct perf_cpu_context *cpuctx;

for_each_possible_cpu(cpu) {
cpuctx = &per_cpu(perf_cpu_context, cpu);
__perf_event_init_context(&cpuctx->ctx, NULL);
}
}

static void __cpuinit perf_event_init_cpu(int cpu)
{
struct perf_cpu_context *cpuctx;

cpuctx = &per_cpu(perf_cpu_context, cpu);
__perf_event_init_context(&cpuctx->ctx, NULL);

spin_lock(&perf_resource_lock);
cpuctx->max_pertask = perf_max_events - perf_reserved_percpu;
Expand Down Expand Up @@ -5439,6 +5449,7 @@ static struct notifier_block __cpuinitdata perf_cpu_nb = {

void __init perf_event_init(void)
{
perf_event_init_all_cpus();
perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_UP_PREPARE,
(void *)(long)smp_processor_id());
perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_ONLINE,
Expand Down

0 comments on commit add76f6

Please sign in to comment.