Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp679120pxb; Tue, 5 Apr 2022 18:27:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXvva5mFDMS4tHY4XEkhRbeRHKyWl8g8QUvPJKSdemfro+7/DbG2KJLH1hhm7ZG9pax4i+ X-Received: by 2002:a05:6402:2687:b0:419:1f59:19c4 with SMTP id w7-20020a056402268700b004191f5919c4mr6351997edd.255.1649208429562; Tue, 05 Apr 2022 18:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649208429; cv=none; d=google.com; s=arc-20160816; b=jMdTaClK5g8JO/neWkcivqwNCW97wZ0DSZQjHuL8rJKF9KcBQhrhOIRD+BaooCg0H7 NZWni+xF4lh/+UuvglfpaMj9SKKauhUZGK4glsl/Iv3MhY+KGJ/QlHtlyVgTZquqXImc cgpf6L6+jGJ/iLD9RVe/qzAD0sIdN+aTtfJQoifYfXkHhoQvcyli03oB3SLgkjPfO7Mr YlSmdG0jX7QAA7xOd5TJyAwAobMSCYdE9Am8YSEHpgWt/zKzPfdO4xep0ZXoWttEyB1j B+DOlWUTK76kyhgrtS4eNHeaDdpEhv4xHl8+tYGq+VVRKMS8ZNuL0VWppWr2rscYgxp2 jC2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oXlOolJlKwGsZyKUxDBLYKOtBqtI2WcUJTUYXPvHi+I=; b=FFvCX1oKwSR+aacL2aFLhxlgynKuTrjENSeiZ5SaG1As2UcDDBvSOaE6rPV6W5Mp2e urKviNlFE4785/DYPQspBxPc/OVF1dJnwNgXAK2a3xGq7tpHko/Kh4PgCdtS67h45O8J WWlvsLlAXW/7glehUBj4ZvDhcANuu0FILjC8JGiDzfnCScXMJg3t9Te7Pd/ilJurUUtz uKzzmKbMk266QvKNMV5kI/CMhAB8Bk7iRV6J2JdCw7t0kRTnDCHeIszaoajMtGT0zGtJ 2v57BGWsLnaq4EhXixkraZIi/fvGCJm2JVvhOrdZrbDrAxfs51yKIp2vf94UB7GRIDnh mjvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qwgq4uFL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a0564021e8d00b00418c2b5bd8dsi11693670edf.111.2022.04.05.18.26.35; Tue, 05 Apr 2022 18:27:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Qwgq4uFL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232939AbiDEIKI (ORCPT + 99 others); Tue, 5 Apr 2022 04:10:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232745AbiDEHyO (ORCPT ); Tue, 5 Apr 2022 03:54:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B835033A30; Tue, 5 Apr 2022 00:50:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 442CBB81BAD; Tue, 5 Apr 2022 07:50:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B4BBC340EE; Tue, 5 Apr 2022 07:50:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145013; bh=L6p9n9Yb6I50Kgerajj1lRR+36C/t8bXwjz8d07YcoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qwgq4uFLCmpRzLK5aBiSM1yIgf/I6gxVz9FXIRs9FwY9yBESa3zJVxYMvS9OEgOvp xOISt9SHR7LrpZAnHp33jzjouf5aqOhpuNkdSR8wChG8ptT0eK7DZ46Lta32UZYN68 eN4cS/YahiMe8LkUQnaVfm3cizkn33JWqXhADoIs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Robin Murphy , Will Deacon , Sasha Levin Subject: [PATCH 5.17 0252/1126] perf/arm-cmn: Hide XP PUB events for CMN-600 Date: Tue, 5 Apr 2022 09:16:39 +0200 Message-Id: <20220405070415.006985895@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Robin Murphy [ Upstream commit 205295c7e1abba9c1db1f9fe075f22f71351887f ] CMN-600 doesn't have XP events for the PUB channel, but we missed the appropriate check to avoid exposing them. Fixes: 60d1504070c2 ("perf/arm-cmn: Support new IP features") Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/4c108d39a0513def63acccf09ab52b328f242aeb.1645727871.git.robin.murphy@arm.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/perf/arm-cmn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c index 0e48adce57ef..d45e8c17e1f8 100644 --- a/drivers/perf/arm-cmn.c +++ b/drivers/perf/arm-cmn.c @@ -595,6 +595,9 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj, if ((intf & 4) && !(cmn->ports_used & BIT(intf & 3))) return 0; + if (chan == 4 && cmn->model == CMN600) + return 0; + if ((chan == 5 && cmn->rsp_vc_num < 2) || (chan == 6 && cmn->dat_vc_num < 2)) return 0; -- 2.34.1