perf/arm-cmn: Fix CPU hotplug unregistration
authorRobin Murphy <robin.murphy@arm.com>
Fri, 3 Dec 2021 11:44:50 +0000 (11:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:36 +0000 (11:03 +0100)
commitf99f6ea71b55a09d344be9fb1d71a92560d6cb7b
tree7e35afbb1912b1dcb81c84adab8f8a707bcd66f9
parent70bf180fef8374e009b3d2164ab4fa3880330d5a
perf/arm-cmn: Fix CPU hotplug unregistration

[ Upstream commit 56c7c6eaf3eb8ac1ec40d56096c0f2b27250da5f ]

Attempting to migrate the PMU context after we've unregistered the PMU
device, or especially if we never successfully registered it in the
first place, is a woefully bad idea. It's also fundamentally pointless
anyway. Make sure to unregister an instance from the hotplug handler
*without* invoking the teardown callback.

Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/2c221d745544774e4b07583b65b5d4d94f7e0fe4.1638530442.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/perf/arm-cmn.c