Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp796410rwb; Thu, 19 Jan 2023 02:51:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXsfmOHP/t/5tdKnELB30d51AAb+Ux7zScZcoZ2QluVSnsaJS43f2+T3RqSR0GXAV6tsfgT1 X-Received: by 2002:a05:6402:501e:b0:49e:eb5:ed05 with SMTP id p30-20020a056402501e00b0049e0eb5ed05mr11006879eda.9.1674125484686; Thu, 19 Jan 2023 02:51:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674125484; cv=none; d=google.com; s=arc-20160816; b=XO07yWf0DhuxJf3gRflXl2BGs045cAYjg7s4e2P3hNfmn7k1+uRBsAwB9sbHTUOA++ ni+/c7UTWzMRvGKsXHSFacLGaZhY1tIZM+i0RyGNU8ZOITyRwNLyiEEw+dZSpEbaEkbQ vdHG/xt0JcS+ZwNvMCi5DBzmfmZGQ8Gy8frWzIshgZAc3x13Cey4+d6CFYtOxg9zO37Q hGmsUMypz9OmW2gDtJ2Sk3I/NcYy/be7B6xGpK8xV9j23czbKsv5mbn+FYcF1GdebLFt SRkXuK3e0gWnrNRpZ568kU3nMYqIsFwsZZO4EipShBCZiKYUTLs6Sh8tdByUk4wmXiZZ D6Dg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=AVkUq3oi08xjtbEXWs6rbkJo1BDR6V+YR8v37qkiS7Y=; b=REn7Tfxryc1tUUdie9+9H3Vknd9dimghwWdfUdye6iQQZH5ev2c68OWMAgFK0f6Xge hGk8eDYJs/GLPPBuTxuGXCtUCw9RbHbEF6SnvWREWlhH2WfK1+0YojYEk4UOKYOY4Gm2 0JqQ/1gFsbWxBWhReegOYhYkVuha8HsC6l6CVPOF9hznIjFKYxCJQ6j3VutnxirWb+yr 9MEWzS/L1ES8dhi4u74nC2+EWH6yM0HT4qvYZZPYjysrQ6wE8oPP0GHe4wDJcgxcS2K9 SAujGJHJUE3aTIYadpxD5bOmIM6hg2+3kAcSR5UAIsukenzqZLbwvWnTSkkH4VVsvAuf 8eqg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r8-20020a508d88000000b00489d3d09accsi37651024edh.247.2023.01.19.02.51.04; Thu, 19 Jan 2023 02:51:24 -0800 (PST) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbjASKFT (ORCPT + 44 others); Thu, 19 Jan 2023 05:05:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230337AbjASKE3 (ORCPT ); Thu, 19 Jan 2023 05:04:29 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4085271798 for ; Thu, 19 Jan 2023 02:03:31 -0800 (PST) Received: from dggpeml500002.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NyJ3s52m1zqVcV; Thu, 19 Jan 2023 17:58:33 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggpeml500002.china.huawei.com (7.185.36.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 19 Jan 2023 18:03:28 +0800 From: Junhao He To: , , , CC: , , , , , , , , , Subject: [PATCH 1/3] drivers/perf: hisi: Advertise the PERF_PMU_CAP_NO_EXCLUDE capability Date: Thu, 19 Jan 2023 18:03:05 +0800 Message-ID: <20230119100307.3660-2-hejunhao3@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230119100307.3660-1-hejunhao3@huawei.com> References: <20230119100307.3660-1-hejunhao3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 Missed initialization the variable of pmu::capabilities when extract the initialization code of hisi_pmu->pmu into a function. HISI UNCORE PMU drivers counters that not support context exclusion. So we have to advertise the PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will prevent us from handling events where any exclusion flags are set. Signed-off-by: Junhao He --- drivers/perf/hisilicon/hisi_uncore_pmu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c index fbc8a93d5eac..2a466477920b 100644 --- a/drivers/perf/hisilicon/hisi_uncore_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c @@ -546,6 +546,7 @@ void hisi_pmu_init(struct pmu *pmu, const char *name, pmu->stop = hisi_uncore_pmu_stop; pmu->read = hisi_uncore_pmu_read; pmu->attr_groups = attr_groups; + pmu->capabilities = PERF_PMU_CAP_NO_EXCLUDE; } EXPORT_SYMBOL_GPL(hisi_pmu_init); -- 2.33.0