Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1013527imm; Sat, 7 Jul 2018 14:18:08 -0700 (PDT) X-Google-Smtp-Source: AAOMgpevLNvdLhPpthc9IZ+MIYEpPtTp01qQjZi3LhRmRKwF40OkjkNN8N5oK+Vo45z6RFuS1BD8 X-Received: by 2002:a63:735d:: with SMTP id d29-v6mr13856667pgn.156.1530998288033; Sat, 07 Jul 2018 14:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530998288; cv=none; d=google.com; s=arc-20160816; b=Y12R90YqUjbs+zZflmKZMBBA+tNOaRPiQ2H7HLFdD3fQoYd+5qzCGBBzOjauw2t7fs YlTIibUA2A0ubYNtC8iMzp6vbNYLD1Vv/ctN1oCDyImXHwyuIVoITLMtPpC3vlaH37cy ZIb8jj1M3m+k6cO1GH1TYywuR5i941D0t/UfNY5a3OiGinFxaKogV6TS0A3r0Fcu00a7 rsKjHsyRP9k0m98Nk/PHsaIUBK4Wu9xor/8FwdCaZBn/xSYlg7S8RbXG8I1p7O4svIZM CCISl9TizCQEgmzZRvvNwwt3zcX16iAi7ei2w2DMF8lRNeFnhhzE1m5ar+CPCIky/PkL s8pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Z5oRubTtJit946mXozw/XxbbfK/cJ2WUdTqGrd2GL+A=; b=gU2FkkBNLMsYe5PFBMSajHxx+/W07YXas9jDgRbEMI9b3DoYd35Pyieyofyh/VOT8F SOFrsMWbc87wEztqp3t8UVr4g9O9QXB0c2W0iWngeSavBfEfA6VRqtPjbwkHxfemoTwm KnawNzrksyZZJrZKC/3KhOTD6W5m0XTkaZcR8990rgqzq8LjD1uVonWhjyuvcls64CEd JKobUyOi5rPuRra7+j5QZ+FjI6AydvuOSfr8zeiAJFtBNfbPzbuufdpN1wp7zTOrv2vX QqSaiYDDot//zvk17hPokb8xTNq/A95jVj6Et9M/4lpg+u8H9QlYHGy/Gxa6m3ijOffm Ikmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=DDUuKz+M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n34-v6si10725654pgm.28.2018.07.07.14.17.53; Sat, 07 Jul 2018 14:18:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=DDUuKz+M; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754419AbeGGVRC (ORCPT + 99 others); Sat, 7 Jul 2018 17:17:02 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:33138 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754328AbeGGVRA (ORCPT ); Sat, 7 Jul 2018 17:17:00 -0400 Received: from trochilidae.lan (unknown [IPv6:2a02:169:34d6::127]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 88B025C1056; Sat, 7 Jul 2018 23:16:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1530998219; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:references; bh=Z5oRubTtJit946mXozw/XxbbfK/cJ2WUdTqGrd2GL+A=; b=DDUuKz+Mn6AApCXv6XDZWj7dsUaQ8SdqiuByaPbwpKl9hYUKKS9ZnJPojs4K27AooP8Nat EaHWQCGi0bHIwSfsSD6iL+8O5uyqlTuVJs1J39OcMFsyPtYT702bzvl1aT5w5RUMwFlPok 6dNYeOP4HV9gZEFZ/lHNp0LEGoOnQ7o= From: Stefan Agner To: will.deacon@arm.com, mark.rutland@arm.com Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, namhyung@kernel.org, jolsa@redhat.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stefan Agner Subject: [PATCH] arm: perf: prevent unbind/bind via sysfs Date: Sat, 7 Jul 2018 23:16:56 +0200 Message-Id: <20180707211656.2920-1-stefan@agner.ch> X-Mailer: git-send-email 2.18.0 X-Spamd-Result: default: False [-2.10 / 15.00]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; MID_CONTAINS_FROM(1.00)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm/kernel/perf_event_v7.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c index 57f01e059f39..5a5116794440 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, }; -- 2.18.0