From patchwork Wed Oct 17 15:26:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 10645759 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D8067181D for ; Wed, 17 Oct 2018 15:41:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2A3D285B8 for ; Wed, 17 Oct 2018 15:41:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4BF5285C3; Wed, 17 Oct 2018 15:41:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0B841285B8 for ; Wed, 17 Oct 2018 15:41:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9s29CHgRkIbulZ7f35fU0SyBJBL8jfFXmFelKiGh9sQ=; b=Er1X3bytgh/6s3 R+FySm2Lvp01vUs+ofJ0VMbI35a/lNOY4V6L3W/njqc+5IXSu6Hr7+Aj/Io86JInRT57GJd/e5iFC +hBS9Rwx+jmxOv3p39O6ff/0qVKWWMh+UN8N4iKqROJLrAN/Spvp9huW7x3acU2NI0UtCWvxYF7e0 5SGbU5R99GT6rnC1KU/Gd9V4Pmn+LoxzIA3xfLmU9qDsTCPKwipeHydVLXf2LkGxHrSvUps6Gont1 igyk7csjg9lU/ToFEpNS+8mAOCpYhEC35rJh5b0F1wTM8Pfslhtp9JizPAAxCX1iH0cyGPo1Lytxu But3+NJk4UFp5FdhBGag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCnwd-0003Ag-QV; Wed, 17 Oct 2018 15:41:11 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCnpv-000632-TP for linux-arm-kernel@bombadil.infradead.org; Wed, 17 Oct 2018 15:34:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6CWDfQHejJxb56YWPrs3uapt60VBxS9nOcz4x9QTcLs=; b=SC9hcaI+dU14nMv7HeZMIKRorG m9f8VMaJrIVzsEOyErx1nkLBUVIcRo5ljta0r0Mp8X/GASc3EvpI86f5IMqp/CsGJZ8eeAlyxa3h0 F3F5GGFR/v50HtUTZtbXMZ3TWgPYZPPkl/V9zGxk1GufeFwYPYGtyF5IZoifNWjdTsE2KCyk0djE1 x533uvfBWbNsyYVc0JX1dCJhKRTqmDjXu7zk4xD2fxz3Xo0DHkKTcnq16TBxCcviYmsZEf5RnOSlG 5tyrJtkw+e1p+kf0ld0FWKOvreW9pHYWwiTdiL3rTWckIKNZn+AnoG6x8KwPgg9bbsNRfecNJnVWl 7xCZc+gg==; Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gCnia-0000wG-SN for linux-arm-kernel@lists.infradead.org; Wed, 17 Oct 2018 15:26:42 +0000 Received: by mail-lj1-x241.google.com with SMTP id y71-v6so24721851lje.9 for ; Wed, 17 Oct 2018 08:26:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6CWDfQHejJxb56YWPrs3uapt60VBxS9nOcz4x9QTcLs=; b=j4vof5xviRjUaME4E9EyHZbgWvb0jzZQla7t6wiqOGjBqk4U4Ev3u4JVvkaQAacFME mkVtJOr3T1zuTPHQfWkO1YEii6viLPFSQ6n9sUDneaIWzCxImFpXajYgzNLLWxzCwpaX ks6I5S3mB2OgBqGBqt7nM0PB+3bYCNYaCNSTo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=6CWDfQHejJxb56YWPrs3uapt60VBxS9nOcz4x9QTcLs=; b=jkSngRvEx9x5YdLPQ/710fobR2h8CpOP7H5fGyiGJ3QyKy2tu+5XJ/VNBuPB3pD6Pl YGILZVUUMmgaysakBQJt6ise6IzOl2d54u7bs5QDyXP5ZTZ6/xciW6PXCCa+E7TUJuLe hUc91EMU9+qXtm0Elv9grPwBMBf/Df5GqfCjuD8CbAa8Ttq9f79yF/57IT9IGTrlMKBh QCYWQC6XdlcVz4Ve8JguK300PSpxGwNUPyQWS75eCWxHAAuBhtGuAyGU1Ps7l9vrubEL sV3fpo7wJICyYM/Nfh2+Mok9We+EzpAFc4K8n+g7YBRMRQVbF57h8KXXOOU7JwjZnu/V kiAQ== X-Gm-Message-State: ABuFfohYMnZHaxjOt5idbh79/we7K/bzrwR6NWV6iQzptS8dpFpXan9P CuCa8UhEMHDF3mk5mBVUo/leeA== X-Google-Smtp-Source: ACcGV639rv5jWvaSyS6dJP+hQ9IUkEG3qCkAgfQgsuycTbtqY08WLKoJRo+Ic2Prrll5YSC6roA1hw== X-Received: by 2002:a2e:1241:: with SMTP id t62-v6mr16762831lje.81.1539789988514; Wed, 17 Oct 2018 08:26:28 -0700 (PDT) Received: from localhost (c-732171d5.07-21-73746f28.bbcust.telenor.se. [213.113.33.115]) by smtp.gmail.com with ESMTPSA id r6-v6sm3861476lff.0.2018.10.17.08.26.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Oct 2018 08:26:27 -0700 (PDT) From: Anders Roxell To: will.deacon@arm.com, mark.rutland@arm.com, catalin.marinas@arm.com Subject: [PATCH] arm64: perf: set suppress_bind_attrs flag to true Date: Wed, 17 Oct 2018 17:26:22 +0200 Message-Id: <20181017152622.15717-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181017_162640_920278_DC580529 X-CRM114-Status: GOOD ( 15.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The armv8_pmuv3 driver doesn't have a remove function, and when the test 'CONFIG_DEBUG_TEST_DRIVER_REMOVE=y' is enabled, the following Call trace can be seen. [ 1.424287] Failed to register pmu: armv8_pmuv3, reason -17 [ 1.424870] WARNING: CPU: 0 PID: 1 at ../kernel/events/core.c:11771 perf_event_sysfs_init+0x98/0xdc [ 1.425220] Modules linked in: [ 1.425531] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.19.0-rc7-next-20181012-00003-ge7a97b1ad77b-dirty #35 [ 1.425951] Hardware name: linux,dummy-virt (DT) [ 1.426212] pstate: 80000005 (Nzcv daif -PAN -UAO) [ 1.426458] pc : perf_event_sysfs_init+0x98/0xdc [ 1.426720] lr : perf_event_sysfs_init+0x98/0xdc [ 1.426908] sp : ffff00000804bd50 [ 1.427077] x29: ffff00000804bd50 x28: ffff00000934e078 [ 1.427429] x27: ffff000009546000 x26: 0000000000000007 [ 1.427757] x25: ffff000009280710 x24: 00000000ffffffef [ 1.428086] x23: ffff000009408000 x22: 0000000000000000 [ 1.428415] x21: ffff000009136008 x20: ffff000009408730 [ 1.428744] x19: ffff80007b20b400 x18: 000000000000000a [ 1.429075] x17: 0000000000000000 x16: 0000000000000000 [ 1.429418] x15: 0000000000000400 x14: 2e79726f74636572 [ 1.429748] x13: 696420656d617320 x12: 656874206e692065 [ 1.430060] x11: 6d616e20656d6173 x10: 2065687420687469 [ 1.430335] x9 : ffff00000804bd50 x8 : 206e6f7361657220 [ 1.430610] x7 : 2c3376756d705f38 x6 : ffff00000954d7ce [ 1.430880] x5 : 0000000000000000 x4 : 0000000000000000 [ 1.431226] x3 : 0000000000000000 x2 : ffffffffffffffff [ 1.431554] x1 : 4d151327adc50b00 x0 : 0000000000000000 [ 1.431868] Call trace: [ 1.432102] perf_event_sysfs_init+0x98/0xdc [ 1.432382] do_one_initcall+0x6c/0x1a8 [ 1.432637] kernel_init_freeable+0x1bc/0x280 [ 1.432905] kernel_init+0x18/0x160 [ 1.433115] ret_from_fork+0x10/0x18 [ 1.433297] ---[ end trace 27fd415390eb9883 ]--- Rework to set suppress_bind_attrs flag to avoid removing the device when CONFIG_DEBUG_TEST_DRIVER_REMOVE=y, since there's no real reason to remove the armv8_pmuv3 driver. Cc: Arnd Bergmann Co-developed-by: Arnd Bergmann Signed-off-by: Anders Roxell --- arch/arm64/kernel/perf_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c index 8e38d5267f22..5ffcb54fde3f 100644 --- a/arch/arm64/kernel/perf_event.c +++ b/arch/arm64/kernel/perf_event.c @@ -1267,6 +1267,7 @@ static struct platform_driver armv8_pmu_driver = { .driver = { .name = ARMV8_PMU_PDEV_NAME, .of_match_table = armv8_pmu_of_device_ids, + .suppress_bind_attrs = true, }, .probe = armv8_pmu_device_probe, };