Commit 7cdc4dd8 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Treehugger Robot
Browse files

UPSTREAM: coresight: etm4x: Remove bogous __exit annotation for some functions



etm4_platform_driver (which lives in ".data" contains a reference to
etm4_remove_platform_dev(). So the latter must not be marked with __exit
which results in the function being discarded for a build with
CONFIG_CORESIGHT_SOURCE_ETM4X=y which in turn makes the remove pointer
contain invalid data.

etm4x_amba_driver referencing etm4_remove_amba() has the same issue.

Drop the __exit annotations for the two affected functions and a third
one that is called by the other two.

For reasons I don't understand this isn't catched by building with
CONFIG_DEBUG_SECTION_MISMATCH=y.

Bug: 254441685
Fixes: c23bc382 ("coresight: etm4x: Refactor probing routine")
Fixes: 5214b563 ("coresight: etm4x: Add support for sysreg only devices")
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarJames Clark <james.clark@arm.com>
Link: https://lore.kernel.org/all/20230929081540.yija47lsj35xtj4v@pengutronix.de/
Link: https://lore.kernel.org/r/20230929081637.2377335-1-u.kleine-koenig@pengutronix.de


Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
(cherry picked from commit 348ddab8)
Signed-off-by: default avatarLee Jones <joneslee@google.com>
Change-Id: Ic393a9e014f0438a4f3365ae1d287bd16ce020fd
parent fdaca9c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment