mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
Linux 4.10-rc8
-----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJYoM2fAAoJEHm+PkMAQRiGr9MH/izEAMri7rJ0QMc3ejt+WmD0 8pkZw3+MVn71z6cIEgpzk4QkEWJd5rfhkETCeCp7qQ9V6cDW1FDE9+0OmPjiphDt nnzKs7t7skEBwH5Mq5xygmIfkv+Z0QGHZ20gfQWY3F56Uxo+ARF88OBHBLKhqx3v 98C7YbMFLKBslKClA78NUEIdx0UfBaRqerlERx0Lfl9aoOrbBS6WI3iuREiylpih 9o7HTrwaGKkU4Kd6NdgJP2EyWPsd1LGalxBBjeDSpm5uokX6ALTdNXDZqcQscHjE RmTqJTGRdhSThXOpNnvUJvk9L442yuNRrVme/IqLpxMdHPyjaXR3FGSIDb2SfjY= =VMy8 -----END PGP SIGNATURE----- Merge tag 'v4.10-rc8' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
210f400d68
266 changed files with 1929 additions and 1119 deletions
|
|
@ -3538,14 +3538,15 @@ struct perf_read_data {
|
|||
int ret;
|
||||
};
|
||||
|
||||
static int find_cpu_to_read(struct perf_event *event, int local_cpu)
|
||||
static int __perf_event_read_cpu(struct perf_event *event, int event_cpu)
|
||||
{
|
||||
int event_cpu = event->oncpu;
|
||||
u16 local_pkg, event_pkg;
|
||||
|
||||
if (event->group_caps & PERF_EV_CAP_READ_ACTIVE_PKG) {
|
||||
event_pkg = topology_physical_package_id(event_cpu);
|
||||
local_pkg = topology_physical_package_id(local_cpu);
|
||||
int local_cpu = smp_processor_id();
|
||||
|
||||
event_pkg = topology_physical_package_id(event_cpu);
|
||||
local_pkg = topology_physical_package_id(local_cpu);
|
||||
|
||||
if (event_pkg == local_pkg)
|
||||
return local_cpu;
|
||||
|
|
@ -3675,7 +3676,7 @@ u64 perf_event_read_local(struct perf_event *event)
|
|||
|
||||
static int perf_event_read(struct perf_event *event, bool group)
|
||||
{
|
||||
int ret = 0, cpu_to_read, local_cpu;
|
||||
int event_cpu, ret = 0;
|
||||
|
||||
/*
|
||||
* If event is enabled and currently active on a CPU, update the
|
||||
|
|
@ -3688,21 +3689,25 @@ static int perf_event_read(struct perf_event *event, bool group)
|
|||
.ret = 0,
|
||||
};
|
||||
|
||||
local_cpu = get_cpu();
|
||||
cpu_to_read = find_cpu_to_read(event, local_cpu);
|
||||
put_cpu();
|
||||
event_cpu = READ_ONCE(event->oncpu);
|
||||
if ((unsigned)event_cpu >= nr_cpu_ids)
|
||||
return 0;
|
||||
|
||||
preempt_disable();
|
||||
event_cpu = __perf_event_read_cpu(event, event_cpu);
|
||||
|
||||
/*
|
||||
* Purposely ignore the smp_call_function_single() return
|
||||
* value.
|
||||
*
|
||||
* If event->oncpu isn't a valid CPU it means the event got
|
||||
* If event_cpu isn't a valid CPU it means the event got
|
||||
* scheduled out and that will have updated the event count.
|
||||
*
|
||||
* Therefore, either way, we'll have an up-to-date event count
|
||||
* after this.
|
||||
*/
|
||||
(void)smp_call_function_single(cpu_to_read, __perf_event_read, &data, 1);
|
||||
(void)smp_call_function_single(event_cpu, __perf_event_read, &data, 1);
|
||||
preempt_enable();
|
||||
ret = data.ret;
|
||||
} else if (event->state == PERF_EVENT_STATE_INACTIVE) {
|
||||
struct perf_event_context *ctx = event->ctx;
|
||||
|
|
|
|||
Loading…
Reference in a new issue