Skip to content

Commit b50f26a

Browse files
Marc ZyngierPeter Zijlstra
authored andcommitted
perf/core: Drop __weak attribute from arch_perf_update_userpage() prototype
Reiji reports that the arm64 implementation of arch_perf_update_userpage() is now ignored and replaced by the dummy stub in core code. This seems to happen since the PMUv3 driver was moved to driver/perf. As it turns out, dropping the __weak attribute from the *prototype* of the function solves the problem. You're right, this doesn't seem to make much sense. And yet... It appears that both symbols get flagged as weak, and that the first one to appear in the link order wins: $ nm drivers/perf/arm_pmuv3.o|grep arch_perf_update_userpage 0000000000001db0 W arch_perf_update_userpage Dropping the attribute from the prototype restores the expected behaviour, and arm64 is able to enjoy arch_perf_update_userpage() again. Fixes: 7755cec ("arm64: perf: Move PMUv3 driver to drivers/perf") Fixes: f1ec3a5 ("kernel/events: Add a missing prototype for arch_perf_update_userpage()") Reported-by: Reiji Watanabe <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Acked-by: Mark Rutland <[email protected]> Tested-by: Reiji Watanabe <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 858fd16 commit b50f26a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/linux/perf_event.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,9 +1845,9 @@ int perf_event_exit_cpu(unsigned int cpu);
18451845
#define perf_event_exit_cpu NULL
18461846
#endif
18471847

1848-
extern void __weak arch_perf_update_userpage(struct perf_event *event,
1849-
struct perf_event_mmap_page *userpg,
1850-
u64 now);
1848+
extern void arch_perf_update_userpage(struct perf_event *event,
1849+
struct perf_event_mmap_page *userpg,
1850+
u64 now);
18511851

18521852
#ifdef CONFIG_MMU
18531853
extern __weak u64 arch_perf_get_page_size(struct mm_struct *mm, unsigned long addr);

0 commit comments

Comments
 (0)