Commit 6d7eea37 authored by Marc Zyngier's avatar Marc Zyngier Committed by Pierre Couillaud
Browse files

UPSTREAM: 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: 7755cec6 ("arm64: perf: Move PMUv3 driver to drivers/perf")
Fixes: f1ec3a51 ("kernel/events: Add a missing prototype for arch_perf_update_userpage()")
Reported-by: default avatarReiji Watanabe <reijiw@google.com>
Change-Id: I497041999776e66ac77c3fccdd09ce47aae544e9
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Tested-by: default avatarReiji Watanabe <reijiw@google.com>
Link: https://lkml.kernel.org/r/20230616114831.3186980-1-maz@kernel.org


(cherry picked from commit b50f26a4)
Signed-off-by: default avatarDanesh Petigara <danesh.petigara@broadcom.com>
parent bf3022d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment