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: 149075 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp796103lji; Wed, 17 Oct 2018 08:26:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV60f4N9sc7U6zPXFhZvcF9D7uOOB0DWq8gkW30gf/kMtbVGeitcesdPYhVLnztH4vHH+Bvw1 X-Received: by 2002:a17:902:292a:: with SMTP id g39-v6mr26341511plb.269.1539789993893; Wed, 17 Oct 2018 08:26:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539789993; cv=none; d=google.com; s=arc-20160816; b=f2bV25dI3CILFkpgHnkvQwK/206nOP9ObjjikURcNv3IQjF3fmhCOUIgRqFCQj1uf9 gF+keVRmv9Sc/ZHdpxr4gtyns5PxXKQ2gkp8fB5/JLoyW6p+6silCzjkh3Sv5OAlKmRp 8jRj5thszQsaxABAc1RNzIM8QFwirWsgGVHyv5J3RZ87KMWGkZKBvd9t15OXpXYTU1iL /DZwFlINFFLmqJ3HE7uwQX+AT6iveAKaYLy1LD2cJosh4wZXozk4IVk2u8Xobz/YmbmU ySuBicCUjMo0u4mxPZHfh4fdA4rWCSOboBEk6qFdWjFtrLtxTbTWJZWga7KTxyRp38jP pp7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6CWDfQHejJxb56YWPrs3uapt60VBxS9nOcz4x9QTcLs=; b=J1zG0zPlowFJO85zQTIyk2XS1Bm5eIKqaJnbOAkpuLJuahxpRn03ROE/60CysFqFZX T54rFP9O9KRoljDQ4nkyFx3cOD3L/TKqhHNClhEl4R8jQrYhJMLw8QYygDlwMymGZSnA wYxwpSRaVk6oElpO8p2HHjD+WCLY020SlGdA/vpHdt1jn6kHBkhITgiMp6x5Oqn8Ss12 5pug1ST/ttUeCvtmrCWX5lnX4nVF74bnRd0L5yCoD4FLd8WfZQxu3BECCtoD4eDRqBVW DhmlENwLUF8P3boU2cOaBLdgu1miTv8/VMviENJe0O5HFnl+tKDAOGxuz2reW/ZihOL4 F11w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=j4vof5xv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10-v6si17801675pgh.338.2018.10.17.08.26.32; Wed, 17 Oct 2018 08:26:33 -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=@linaro.org header.s=google header.b=j4vof5xv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727751AbeJQXWm (ORCPT + 32 others); Wed, 17 Oct 2018 19:22:42 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39419 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727032AbeJQXWm (ORCPT ); Wed, 17 Oct 2018 19:22:42 -0400 Received: by mail-lj1-f196.google.com with SMTP id p1-v6so24742723ljg.6 for ; Wed, 17 Oct 2018 08:26:29 -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=NbHoqsUuyFoeS3pF7pdAa1M9VYzZYW7+V29ftBitDubHKdWYfaDJbW5o3mlUKTO7A4 9lBoRsof6acqHN5jFBmZuDrR2opgOQ3Q4sBfHpEdR5QXbyaFgIS7FU38AK2uf0jUVf85 6z36A9ZWbT7Z/yPLuSITt9xdrErVe6dNyNda6vAw51jAzd0QSfKdkhDyD98GgzQsolPP qhCIqqfgiiZxnglIpnIRq5Ehq5W1kzDMAR/d5MFZkL+w9PVpalKeLrhkWwEwogoh2K16 5LZBrvO7m/Bv7vaEj4QbdbSghIs5iZ7oxCVQ6bdIVVWKnfMQ0WBnPENcIfKe1UuDH8xQ +FRA== X-Gm-Message-State: ABuFfogSUcXrXy1l5pC6kG53qYCmRNDMeNcJaiRS9CBmWNtiGArYhe7n +gZvPuYpChhHwfD5fmFRxwu8Hg== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Anders Roxell , Arnd Bergmann 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 2.19.1 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, };