Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm: perf: Remove inlines from arm_pmuv3.c

These are all static and in one compilation unit so the inline has no
effect on the binary. Except if FTRACE is enabled, then 3 functions
which were already not inlined now get the nops added which allows them
to be traced.

Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20231211161331.1277825-2-james.clark@arm.com
Signed-off-by: Will Deacon <will@kernel.org>

authored by

James Clark and committed by
Will Deacon
9343c790 5ca8ab55

+23 -23
+23 -23
drivers/perf/arm_pmuv3.c
··· 304 304 305 305 static int sysctl_perf_user_access __read_mostly; 306 306 307 - static inline bool armv8pmu_event_is_64bit(struct perf_event *event) 307 + static bool armv8pmu_event_is_64bit(struct perf_event *event) 308 308 { 309 309 return event->attr.config1 & 0x1; 310 310 } 311 311 312 - static inline bool armv8pmu_event_want_user_access(struct perf_event *event) 312 + static bool armv8pmu_event_want_user_access(struct perf_event *event) 313 313 { 314 314 return event->attr.config1 & 0x2; 315 315 } ··· 401 401 return (IS_ENABLED(CONFIG_ARM64) && is_pmuv3p5(cpu_pmu->pmuver)); 402 402 } 403 403 404 - static inline bool armv8pmu_event_has_user_read(struct perf_event *event) 404 + static bool armv8pmu_event_has_user_read(struct perf_event *event) 405 405 { 406 406 return event->hw.flags & PERF_EVENT_FLAG_USER_READ_CNT; 407 407 } ··· 411 411 * except when we have allocated the 64bit cycle counter (for CPU 412 412 * cycles event) or when user space counter access is enabled. 413 413 */ 414 - static inline bool armv8pmu_event_is_chained(struct perf_event *event) 414 + static bool armv8pmu_event_is_chained(struct perf_event *event) 415 415 { 416 416 int idx = event->hw.idx; 417 417 struct arm_pmu *cpu_pmu = to_arm_pmu(event->pmu); ··· 432 432 #define ARMV8_IDX_TO_COUNTER(x) \ 433 433 (((x) - ARMV8_IDX_COUNTER0) & ARMV8_PMU_COUNTER_MASK) 434 434 435 - static inline u64 armv8pmu_pmcr_read(void) 435 + static u64 armv8pmu_pmcr_read(void) 436 436 { 437 437 return read_pmcr(); 438 438 } 439 439 440 - static inline void armv8pmu_pmcr_write(u64 val) 440 + static void armv8pmu_pmcr_write(u64 val) 441 441 { 442 442 val &= ARMV8_PMU_PMCR_MASK; 443 443 isb(); 444 444 write_pmcr(val); 445 445 } 446 446 447 - static inline int armv8pmu_has_overflowed(u32 pmovsr) 447 + static int armv8pmu_has_overflowed(u32 pmovsr) 448 448 { 449 449 return pmovsr & ARMV8_PMU_OVERFLOWED_MASK; 450 450 } 451 451 452 - static inline int armv8pmu_counter_has_overflowed(u32 pmnc, int idx) 452 + static int armv8pmu_counter_has_overflowed(u32 pmnc, int idx) 453 453 { 454 454 return pmnc & BIT(ARMV8_IDX_TO_COUNTER(idx)); 455 455 } 456 456 457 - static inline u64 armv8pmu_read_evcntr(int idx) 457 + static u64 armv8pmu_read_evcntr(int idx) 458 458 { 459 459 u32 counter = ARMV8_IDX_TO_COUNTER(idx); 460 460 461 461 return read_pmevcntrn(counter); 462 462 } 463 463 464 - static inline u64 armv8pmu_read_hw_counter(struct perf_event *event) 464 + static u64 armv8pmu_read_hw_counter(struct perf_event *event) 465 465 { 466 466 int idx = event->hw.idx; 467 467 u64 val = armv8pmu_read_evcntr(idx); ··· 523 523 return armv8pmu_unbias_long_counter(event, value); 524 524 } 525 525 526 - static inline void armv8pmu_write_evcntr(int idx, u64 value) 526 + static void armv8pmu_write_evcntr(int idx, u64 value) 527 527 { 528 528 u32 counter = ARMV8_IDX_TO_COUNTER(idx); 529 529 530 530 write_pmevcntrn(counter, value); 531 531 } 532 532 533 - static inline void armv8pmu_write_hw_counter(struct perf_event *event, 533 + static void armv8pmu_write_hw_counter(struct perf_event *event, 534 534 u64 value) 535 535 { 536 536 int idx = event->hw.idx; ··· 556 556 armv8pmu_write_hw_counter(event, value); 557 557 } 558 558 559 - static inline void armv8pmu_write_evtype(int idx, u32 val) 559 + static void armv8pmu_write_evtype(int idx, u32 val) 560 560 { 561 561 u32 counter = ARMV8_IDX_TO_COUNTER(idx); 562 562 ··· 564 564 write_pmevtypern(counter, val); 565 565 } 566 566 567 - static inline void armv8pmu_write_event_type(struct perf_event *event) 567 + static void armv8pmu_write_event_type(struct perf_event *event) 568 568 { 569 569 struct hw_perf_event *hwc = &event->hw; 570 570 int idx = hwc->idx; ··· 598 598 return mask; 599 599 } 600 600 601 - static inline void armv8pmu_enable_counter(u32 mask) 601 + static void armv8pmu_enable_counter(u32 mask) 602 602 { 603 603 /* 604 604 * Make sure event configuration register writes are visible before we ··· 608 608 write_pmcntenset(mask); 609 609 } 610 610 611 - static inline void armv8pmu_enable_event_counter(struct perf_event *event) 611 + static void armv8pmu_enable_event_counter(struct perf_event *event) 612 612 { 613 613 struct perf_event_attr *attr = &event->attr; 614 614 u32 mask = armv8pmu_event_cnten_mask(event); ··· 620 620 armv8pmu_enable_counter(mask); 621 621 } 622 622 623 - static inline void armv8pmu_disable_counter(u32 mask) 623 + static void armv8pmu_disable_counter(u32 mask) 624 624 { 625 625 write_pmcntenclr(mask); 626 626 /* ··· 630 630 isb(); 631 631 } 632 632 633 - static inline void armv8pmu_disable_event_counter(struct perf_event *event) 633 + static void armv8pmu_disable_event_counter(struct perf_event *event) 634 634 { 635 635 struct perf_event_attr *attr = &event->attr; 636 636 u32 mask = armv8pmu_event_cnten_mask(event); ··· 642 642 armv8pmu_disable_counter(mask); 643 643 } 644 644 645 - static inline void armv8pmu_enable_intens(u32 mask) 645 + static void armv8pmu_enable_intens(u32 mask) 646 646 { 647 647 write_pmintenset(mask); 648 648 } 649 649 650 - static inline void armv8pmu_enable_event_irq(struct perf_event *event) 650 + static void armv8pmu_enable_event_irq(struct perf_event *event) 651 651 { 652 652 u32 counter = ARMV8_IDX_TO_COUNTER(event->hw.idx); 653 653 armv8pmu_enable_intens(BIT(counter)); 654 654 } 655 655 656 - static inline void armv8pmu_disable_intens(u32 mask) 656 + static void armv8pmu_disable_intens(u32 mask) 657 657 { 658 658 write_pmintenclr(mask); 659 659 isb(); ··· 662 662 isb(); 663 663 } 664 664 665 - static inline void armv8pmu_disable_event_irq(struct perf_event *event) 665 + static void armv8pmu_disable_event_irq(struct perf_event *event) 666 666 { 667 667 u32 counter = ARMV8_IDX_TO_COUNTER(event->hw.idx); 668 668 armv8pmu_disable_intens(BIT(counter)); 669 669 } 670 670 671 - static inline u32 armv8pmu_getreset_flags(void) 671 + static u32 armv8pmu_getreset_flags(void) 672 672 { 673 673 u32 value; 674 674