|
@@ -588,7 +588,7 @@ done:
|
|
x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]);
|
|
x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- return num ? -ENOSPC : 0;
|
|
|
|
|
|
+ return num ? -EINVAL : 0;
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -607,7 +607,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader,
|
|
|
|
|
|
if (is_x86_event(leader)) {
|
|
if (is_x86_event(leader)) {
|
|
if (n >= max_count)
|
|
if (n >= max_count)
|
|
- return -ENOSPC;
|
|
|
|
|
|
+ return -EINVAL;
|
|
cpuc->event_list[n] = leader;
|
|
cpuc->event_list[n] = leader;
|
|
n++;
|
|
n++;
|
|
}
|
|
}
|
|
@@ -620,7 +620,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader,
|
|
continue;
|
|
continue;
|
|
|
|
|
|
if (n >= max_count)
|
|
if (n >= max_count)
|
|
- return -ENOSPC;
|
|
|
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
cpuc->event_list[n] = event;
|
|
cpuc->event_list[n] = event;
|
|
n++;
|
|
n++;
|
|
@@ -1316,7 +1316,7 @@ static int validate_event(struct perf_event *event)
|
|
c = x86_pmu.get_event_constraints(fake_cpuc, event);
|
|
c = x86_pmu.get_event_constraints(fake_cpuc, event);
|
|
|
|
|
|
if (!c || !c->weight)
|
|
if (!c || !c->weight)
|
|
- ret = -ENOSPC;
|
|
|
|
|
|
+ ret = -EINVAL;
|
|
|
|
|
|
if (x86_pmu.put_event_constraints)
|
|
if (x86_pmu.put_event_constraints)
|
|
x86_pmu.put_event_constraints(fake_cpuc, event);
|
|
x86_pmu.put_event_constraints(fake_cpuc, event);
|
|
@@ -1341,7 +1341,7 @@ static int validate_group(struct perf_event *event)
|
|
{
|
|
{
|
|
struct perf_event *leader = event->group_leader;
|
|
struct perf_event *leader = event->group_leader;
|
|
struct cpu_hw_events *fake_cpuc;
|
|
struct cpu_hw_events *fake_cpuc;
|
|
- int ret = -ENOSPC, n;
|
|
|
|
|
|
+ int ret = -EINVAL, n;
|
|
|
|
|
|
fake_cpuc = allocate_fake_cpuc();
|
|
fake_cpuc = allocate_fake_cpuc();
|
|
if (IS_ERR(fake_cpuc))
|
|
if (IS_ERR(fake_cpuc))
|