Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp30485rdb; Thu, 21 Dec 2023 01:43:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHr6WTXJ5WmSoc7Dw2DEuEodVoQy4sgjJe4J1UlAjQeLs/h4KOwvmUMPV9cDUKd2LCfT7iu X-Received: by 2002:a50:cdd9:0:b0:554:36d8:564e with SMTP id h25-20020a50cdd9000000b0055436d8564emr51820edj.7.1703151788435; Thu, 21 Dec 2023 01:43:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703151788; cv=none; d=google.com; s=arc-20160816; b=e6Fwi405UBZjO52UrZXpw4w68q2mRJJmzLrrLHstwZmc+ocUzuKsRgecWaMR7oVr1r BTZ0SDf7PGk8pw+3oCmns87He1GyEfqZYrWhM4lVicC6gVDliY8Sy1WIqVtHs4t7tNul 0YJPYAyIBEAtjWrSRj8vXh3CCKjr0rqjfK6SKaOWff/oIcVBBzgtE3MRMnhEro6AkcIT 8lY6keYgWVGgRPL0la+K+lqEfLO87nRUpwgnqJdfCGZDMQpNrxLoCBFr4xesSmAIOBZx 7P6dkJ6hiAH3Hurg0Q2xNVlIO2MEAUCllOHR98wesy11447nzNieu/6cMfjq0yMmEv84 AvQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=ZXOzwjpzAEYalRgSH0JDviCDKsz9uKQ44MOPY+G2AHE=; fh=+J+RQ6dQE/8hw9xppGIQAAVej0ZWaQywlnQVxD6QLdg=; b=vzVQM73Mcz+3j5qnW5RxhlY8J8ImiHyj8cdhvo3aGx4rXaDb8yzx41BGsZJxPC04tv Ke+Wghnpkfm3zA0e/r9DpCaKOpKdH9dOLSZcrEllK1MSmU22zVFTDnJ2ep+wNRUXp/Df UgZYy0KyEVCzbI1CeM0sfqpV4m1xqRzK83hb341T19x5JJXUlR/H1NjeHddLgSZEOe+W jGfzJrW0GZXpfMqHCs+XwBKlCEG5kU6B3d5Lgn8K8Zot5SPmoH0xSvJIypK+6TTCsYlz HWAkGLA3xYQ7dKamU/dXlVQgx1YTDQ9vGIRgUPg4Hpdgj/WJB+eF0EjTx0ndDk5st8PP DNdw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8156-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8156-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id z39-20020a509e2a000000b005534daf4037si693828ede.688.2023.12.21.01.43.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 01:43:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8156-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-8156-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8156-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=shingroup.cn Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 33DDE1F223EA for ; Thu, 21 Dec 2023 09:43:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB1ED22079; Thu, 21 Dec 2023 09:39:07 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from bg1.exmail.qq.com (bg1.exmail.qq.com [114.132.65.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D2CC21A17 for ; Thu, 21 Dec 2023 09:39:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=shingroup.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shingroup.cn X-QQ-mid: bizesmtp90t1703151503t28eopg7 Received: from HX01040022.powercore.com.cn ( [223.112.234.130]) by bizesmtp.qq.com (ESMTP) with id ; Thu, 21 Dec 2023 17:38:21 +0800 (CST) X-QQ-SSF: 01400000000000B0B000000A0000000 X-QQ-FEAT: +ynUkgUhZJnjMoY4gOOx27e0bd5FjgOXH7xQMXerutlnj6SyN+ZyFlxFHokp/ b+Z/WaNSkU7Nawdh3Dx3auVcz3fXEJDb3Ye37GaLRPm3qU4yQYJA/9n4hPdYZR90NJXuS7n Tjww8M7lMdbqKmxiCpOZ8/Ld+MbJSWhJ5X7M3xa5QsllHEw0pa/pNp4NUtrsxf7z8h/RHov Mn6Jeg8p4gwdDZ3STEnXmp0PIBjB7OHPrXJkQMf7V8kg9wskjJAt6D67tKgUQVSerSvLGXK yl7/Qsr/9FvWOZ2VoUDEOjyLXJX6EX8nv3ug+TjSrMtFgHvBpzzKJR/lfC4jY8gVrnDwuvq +KfivO6I/Y3Nn/O4oR/Ji42Ah/jGu+ZRBU9RUz8d0+hsGgSG2qrtankkq3W0ZutS0RNTgEb yiJTxRoJ/Gw= X-QQ-GoodBg: 2 X-BIZMAIL-ID: 12415120465097514307 From: "JiaLong.Yang" To: Will Deacon , Mark Rutland Cc: shenghui.qu@shingroup.cn, ke.zhao@shingroup.cn, zhijie.ren@shingroup.cn, "JiaLong.Yang" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] perf/arm_smmuv3: Omit the two judgements which done in framework Date: Thu, 21 Dec 2023 17:38:01 +0800 Message-Id: <20231221093802.20612-1-jialong.yang@shingroup.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:shingroup.cn:qybglogicsvrgz:qybglogicsvrgz6a-1 'event->attr.type != event->pmu->type' has been done in core.c::perf_init_event() ,core.c::perf_event_modify_attr(), etc. This PMU is an uncore one. The core framework has disallowed uncore-task events. So the judgement to event->cpu < 0 is no mean. The two judgements have been done in kernel/events/core.c Signed-off-by: JiaLong.Yang --- drivers/perf/arm_smmuv3_pmu.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c index 6303b82566f9..8ea4a3227165 100644 --- a/drivers/perf/arm_smmuv3_pmu.c +++ b/drivers/perf/arm_smmuv3_pmu.c @@ -401,19 +401,11 @@ static int smmu_pmu_event_init(struct perf_event *event) int group_num_events = 1; u16 event_id; - if (event->attr.type != event->pmu->type) - return -ENOENT; - if (hwc->sample_period) { dev_dbg(dev, "Sampling not supported\n"); return -EOPNOTSUPP; } - if (event->cpu < 0) { - dev_dbg(dev, "Per-task mode not supported\n"); - return -EOPNOTSUPP; - } - /* Verify specified event is supported on this PMU */ event_id = get_event(event); if (event_id < SMMU_PMCG_ARCH_MAX_EVENTS && -- 2.25.1