All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf: arm_spe: Prevent module unload while the PMU is in use
@ 2017-11-03 11:45 ` Suzuki K Poulose
  0 siblings, 0 replies; 10+ messages in thread
From: Suzuki K Poulose @ 2017-11-03 11:45 UTC (permalink / raw)
  To: linux-arm-kernel

When the PMU driver is built as a module, the perf expects the
pmu->module to be valid, so that the driver is prevented from
being unloaded while it is in use. Fix the SPE pmu driver to
fill in this field.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 drivers/perf/arm_spe_pmu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index 50511b13fd35..8ce262fc2561 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -889,6 +889,7 @@ static int arm_spe_pmu_perf_init(struct arm_spe_pmu *spe_pmu)
 	struct device *dev = &spe_pmu->pdev->dev;
 
 	spe_pmu->pmu = (struct pmu) {
+		.module = THIS_MODULE,
 		.capabilities	= PERF_PMU_CAP_EXCLUSIVE | PERF_PMU_CAP_ITRACE,
 		.attr_groups	= arm_spe_pmu_attr_groups,
 		/*
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-11-03 12:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-03 11:45 [PATCH 1/2] perf: arm_spe: Prevent module unload while the PMU is in use Suzuki K Poulose
2017-11-03 11:45 ` Suzuki K Poulose
2017-11-03 11:45 ` [PATCH 2/2] arm-ccn: perf: Prevent module unload while " Suzuki K Poulose
2017-11-03 11:45   ` Suzuki K Poulose
2017-11-03 12:18   ` Will Deacon
2017-11-03 12:18     ` Will Deacon
2017-11-03 12:32   ` Mark Rutland
2017-11-03 12:32     ` Mark Rutland
2017-11-03 12:32 ` [PATCH 1/2] perf: arm_spe: Prevent module unload while the " Mark Rutland
2017-11-03 12:32   ` Mark Rutland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.