thunderx2_pmu.c (23d19ba06b9c5614d6457f5fed349ec8f6d4dac9) | thunderx2_pmu.c (306563985819ed2af9df0a26ae368ed12cf28f41) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * CAVIUM THUNDERX2 SoC PMU UNCORE 4 * Copyright (C) 2018 Cavium Inc. 5 * Author: Ganapatrao Kulkarni <gkulkarni@cavium.com> 6 */ 7 8#include <linux/acpi.h> --- 410 unchanged lines hidden (view full) --- 419 /* 420 * SOC PMU counters are shared across all cores. 421 * Therefore, it does not support per-process mode. 422 * Also, it does not support event sampling mode. 423 */ 424 if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK) 425 return -EINVAL; 426 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * CAVIUM THUNDERX2 SoC PMU UNCORE 4 * Copyright (C) 2018 Cavium Inc. 5 * Author: Ganapatrao Kulkarni <gkulkarni@cavium.com> 6 */ 7 8#include <linux/acpi.h> --- 410 unchanged lines hidden (view full) --- 419 /* 420 * SOC PMU counters are shared across all cores. 421 * Therefore, it does not support per-process mode. 422 * Also, it does not support event sampling mode. 423 */ 424 if (is_sampling_event(event) || event->attach_state & PERF_ATTACH_TASK) 425 return -EINVAL; 426 |
427 /* We have no filtering of any kind */ 428 if (event->attr.exclude_user || 429 event->attr.exclude_kernel || 430 event->attr.exclude_hv || 431 event->attr.exclude_idle || 432 event->attr.exclude_host || 433 event->attr.exclude_guest) 434 return -EINVAL; 435 | |
436 if (event->cpu < 0) 437 return -EINVAL; 438 439 tx2_pmu = pmu_to_tx2_pmu(event->pmu); 440 if (tx2_pmu->cpu >= nr_cpu_ids) 441 return -EINVAL; 442 event->cpu = tx2_pmu->cpu; 443 --- 123 unchanged lines hidden (view full) --- 567 .attr_groups = tx2_pmu->attr_groups, 568 .task_ctx_nr = perf_invalid_context, 569 .event_init = tx2_uncore_event_init, 570 .add = tx2_uncore_event_add, 571 .del = tx2_uncore_event_del, 572 .start = tx2_uncore_event_start, 573 .stop = tx2_uncore_event_stop, 574 .read = tx2_uncore_event_read, | 427 if (event->cpu < 0) 428 return -EINVAL; 429 430 tx2_pmu = pmu_to_tx2_pmu(event->pmu); 431 if (tx2_pmu->cpu >= nr_cpu_ids) 432 return -EINVAL; 433 event->cpu = tx2_pmu->cpu; 434 --- 123 unchanged lines hidden (view full) --- 558 .attr_groups = tx2_pmu->attr_groups, 559 .task_ctx_nr = perf_invalid_context, 560 .event_init = tx2_uncore_event_init, 561 .add = tx2_uncore_event_add, 562 .del = tx2_uncore_event_del, 563 .start = tx2_uncore_event_start, 564 .stop = tx2_uncore_event_stop, 565 .read = tx2_uncore_event_read, |
566 .capabilities = PERF_PMU_CAP_NO_EXCLUDE, |
|
575 }; 576 577 tx2_pmu->pmu.name = devm_kasprintf(dev, GFP_KERNEL, 578 "%s", name); 579 580 return perf_pmu_register(&tx2_pmu->pmu, tx2_pmu->pmu.name, -1); 581} 582 --- 279 unchanged lines hidden --- | 567 }; 568 569 tx2_pmu->pmu.name = devm_kasprintf(dev, GFP_KERNEL, 570 "%s", name); 571 572 return perf_pmu_register(&tx2_pmu->pmu, tx2_pmu->pmu.name, -1); 573} 574 --- 279 unchanged lines hidden --- |