From: Stefan Agner Date: Sat, 7 Jul 2018 21:16:56 +0000 (+0200) Subject: arm: perf: prevent unbind/bind via sysfs X-Git-Tag: v4.19~379^2~11^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64b2f025715a68bed49fb14588c2d893dfbd00a8;p=platform%2Fkernel%2Flinux-rpi.git arm: perf: prevent unbind/bind via sysfs Unbinding and rebinding the ARM PMU driver via sysfs leads to a warning followed by more errors: WARNING: CPU: 0 PID: 217 at kernel/irq/chip.c:1034 irq_modify_status+0x150/0x16c .. genirq: Flags mismatch irq 19. 00010c04 (arm-pmu) vs. 00010c04 (arm-pmu) hw perfevents: unable to request IRQ19 for ARM PMU counters hw perfevents: /pmu: failed to register PMU devices! armv7-pmu: probe of pmu failed with error -16 The driver is clearly not designed to be removed. Disable bind/ unbind for this driver. Signed-off-by: Stefan Agner Signed-off-by: Will Deacon --- diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 57f01e0..5a51167 100644 --- a/arch/arm/kernel/perf_event_v7.c +++ b/arch/arm/kernel/perf_event_v7.c @@ -2030,6 +2030,7 @@ static struct platform_driver armv7_pmu_driver = { .driver = { .name = "armv7-pmu", .of_match_table = armv7_pmu_of_device_ids, + .suppress_bind_attrs = true, }, .probe = armv7_pmu_device_probe, };