Message ID | 20231010084731.30450-5-yangyicong@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp50803vqb; Tue, 10 Oct 2023 01:51:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPewNw7R7whL/X/4NSc5YhgxZi5/wLddulvVc4uFvQ2VzPtB36rlnSeOc0RjkLRZZUMQpG X-Received: by 2002:a17:90b:3e88:b0:26d:4312:17e5 with SMTP id rj8-20020a17090b3e8800b0026d431217e5mr14312970pjb.6.1696927859830; Tue, 10 Oct 2023 01:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696927859; cv=none; d=google.com; s=arc-20160816; b=K0l3BiCfgmXJVmFwn5ubF4I+KsIgzhyfxcU7uJrrcqLppxdYCkBxsLn3vGnpfdMOo9 sExDCEygVArg4d1pfWCkBdqvKe1uH0XN/CrsTccCULh4l5DXmj2BLh07UcoKC5TOCb3a iZa1M1oF+U1BXisqyR6JgvjQCDqMFK4BZmETvo3UYD1I525nlgkINccLYgMlAqcSjoW2 gzlrGYzHEEhY6fm8FBqC6FwoAu4RhSMPTAB37fZtwPLzFPI+KmnliU+3t7asM7uUcf+5 W2RET/VB/IweyJa1eRrDyRb1ImnZQLLIlXOuxdHhpDpEwiywk1vAH0j94KrHANu1dhzC cZdA== 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=XmX8aNtjGWEs3JIbe2u092mO+Oz7G06WH9IBH93p42A=; fh=ko8w2iEBByNlWLnAg6bNI5pex73wZFG+4jwxERcD8TA=; b=gnuOI3YZKUKrvcO6LkAfDEtsXTaK/Yf/tDuWI7ho80DNEPUFmMuY+Pvum6SQqxw9t4 Yv9Afx3OVkAoQRds9JCNd6toosmdd9Zb/fMUTvdExcum8MnRQmLXGuTeXnZS3Gb2E6/x s6f/C701HMwx77873lz/gp2ah5e7jVnON8CFpTvL9cpNvou57V0ADk6qivad6btShr7h uaH4cwZ7yVIAUKLkzrRPKY5u1PAuCV2uCEfm5OFRsRUGz4bpX0ZuUbjSN57P2gzxbTzA wPieCgW4WtXWh4E41TpKUN9fKls3fRos6l4ROPZztXXoDmpiXH37QJ75aiUkg8wbGC/m MhDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id s88-20020a17090a69e100b002764afcf7a1si1942459pjj.106.2023.10.10.01.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:50:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 34076802A6D3; Tue, 10 Oct 2023 01:50:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229896AbjJJIuq (ORCPT <rfc822;rua109.linux@gmail.com> + 20 others); Tue, 10 Oct 2023 04:50:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbjJJIu2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Oct 2023 04:50:28 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F12A8AF; Tue, 10 Oct 2023 01:50:22 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S4TzK06p6zVlQN; Tue, 10 Oct 2023 16:46:53 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Tue, 10 Oct 2023 16:50:21 +0800 From: Yicong Yang <yangyicong@huawei.com> To: <suzuki.poulose@arm.com>, <mathieu.poirier@linaro.org>, <jonathan.cameron@huawei.com>, <linux-kernel@vger.kernel.org> CC: <alexander.shishkin@linux.intel.com>, <helgaas@kernel.org>, <linux-pci@vger.kernel.org>, <prime.zeng@hisilicon.com>, <linuxarm@huawei.com>, <yangyicong@hisilicon.com>, <hejunhao3@huawei.com> Subject: [PATCH v3 4/5] hwtracing: hisi_ptt: Don't try to attach a task Date: Tue, 10 Oct 2023 16:47:30 +0800 Message-ID: <20231010084731.30450-5-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20231010084731.30450-1-yangyicong@huawei.com> References: <20231010084731.30450-1-yangyicong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 01:50:56 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779357827917524620 X-GMAIL-MSGID: 1779357827917524620 |
Series |
Several updates for PTT driver
|
|
Commit Message
Yicong Yang
Oct. 10, 2023, 8:47 a.m. UTC
From: Yicong Yang <yangyicong@hisilicon.com> PTT is an uncore PMU and shouldn't be attached to any task. Block the usage in pmu::event_init(). Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> --- drivers/hwtracing/ptt/hisi_ptt.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c index 4f355df8da23..62a444f5228e 100644 --- a/drivers/hwtracing/ptt/hisi_ptt.c +++ b/drivers/hwtracing/ptt/hisi_ptt.c @@ -1003,6 +1003,9 @@ static int hisi_ptt_pmu_event_init(struct perf_event *event) return -EOPNOTSUPP; } + if (event->attach_state & PERF_ATTACH_TASK) + return -EOPNOTSUPP; + if (event->attr.type != hisi_ptt->hisi_ptt_pmu.type) return -ENOENT;