Message ID | 20230914112223.27165-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:172:b0:3f2:4152:657d with SMTP id h50csp278747vqi; Thu, 14 Sep 2023 04:31:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4b9SzdgVqYpUsvZ2giQt7A01JgevbU92rZ3sJAxo4ekhdBGpZxPCum4fFMXFYRpukVzCr X-Received: by 2002:a05:6870:a44c:b0:1d5:f070:d518 with SMTP id n12-20020a056870a44c00b001d5f070d518mr6102104oal.52.1694691113487; Thu, 14 Sep 2023 04:31:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694691113; cv=none; d=google.com; s=arc-20160816; b=EE3JtPv5wJSG6hXfmx2LK81QccuBymv527m3KWZiQmVP8mtH5YgcYmqacKN+8DmyVv er75GbCd3w4+xB1P6REvOOiYOStQmRrW871nxmcutbzWNrGziNrAVSfnPjwuAYJRSdol +fOv+JDWkiDPHIxoTh+LiYIy04CzQzczI3C6kZd9jqG8Y2Xylvfp1UtEAxL34HDCTcjE Cqsat0uOllURy2J0Cx/KNLOVBQNNrD7WKjcYWpOiswwIB9wk2Lok56+0WK+5VuVQvaNT xaptxHuqTNNug0hlnwS5DAz/vWPEZkQ3tlyOGS2ihmrPqEkND014/cbUnfyBoEv54CH5 b8Ag== 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=tECvO001os4YRLUr84Rg8N+mhOCcfmD9WvK9ff3VMVV/vN+T/mkfg1YcK/9YCEjGqH LJbA4B1VX3IVEsYwIXdc/xSlqHLqVqmdgW3qaNe1loCI3op0G0lIpOK+Wuh12mTHVumZ YGLAyCqAvZ6Q6t4r6zP6ffDr0fzRjifGrQ3mchVj9t7yCFFMm0E0PnkJsnm4wQi35mgr mcC5Z8vUl77Jufk8KaDRRhK+5AQKbgrg/BauNNUmC7ti11n13dZiXcl6M4x65jMd86vJ bdWoUc02oEOJdQymwZ4fhmVPWq+uGyohGZlvUYxj3tSOPObxYnBRNOJYOLSJU/5onB6n j03w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id s24-20020a63af58000000b00577581963ccsi1297031pgo.260.2023.09.14.04.31.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:31:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 12420831D2EC; Thu, 14 Sep 2023 04:26:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233175AbjINLZv (ORCPT <rfc822;chrisfriedt@gmail.com> + 35 others); Thu, 14 Sep 2023 07:25:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229992AbjINLZu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Sep 2023 07:25:50 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AEB6CC7; Thu, 14 Sep 2023 04:25:43 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RmZgX4TCkzgZgc; Thu, 14 Sep 2023 19:23:04 +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; Thu, 14 Sep 2023 19:25:03 +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 v2 4/5] hwtracing: hisi_ptt: Don't try to attach a task Date: Thu, 14 Sep 2023 19:22:22 +0800 Message-ID: <20230914112223.27165-5-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230914112223.27165-1-yangyicong@huawei.com> References: <20230914112223.27165-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: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected 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 (morse.vger.email [0.0.0.0]); Thu, 14 Sep 2023 04:26:02 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777012428983906007 X-GMAIL-MSGID: 1777012428983906007 |
Series |
Several updates for PTT driver
|
|
Commit Message
Yicong Yang
Sept. 14, 2023, 11:22 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;