From patchwork Tue Oct 10 08:47:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 150583 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp50871vqb; Tue, 10 Oct 2023 01:51:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHS7cNPxO9A0q+NwulIE7WgrWSCi3gkpAf55N2GujaIleRKJuQPmAtXpw6T7uSTXLNHfTvk X-Received: by 2002:a05:6358:429e:b0:13e:bf50:73af with SMTP id s30-20020a056358429e00b0013ebf5073afmr15119424rwc.18.1696927872588; Tue, 10 Oct 2023 01:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696927872; cv=none; d=google.com; s=arc-20160816; b=u3tzmxe6nPIbIOL+y6Ir0xmwZOdeCXIta5XDN3bMg3RwA3noy3wM+AAYbNf/UvRUew 4Od5tsDAbOCQ8beSqOez8Zslm4MCGDCelTyIOXdlgDW9JpamukV/wg4TKfTS2Vlnoaoo 0V111omfsot+PyMSdZwbZqEb59t5hMWLh+z2XqhUYMr+fTkIpSQpJkmhKb47Ij1uNj8V 4rb+etzQkKU+y7rDPSHFuZRplMccMpR0zgfY2L0RjLRow+KUcA5cDnp/7KJHsINYDJF+ 8zmpk3mXxXE4lCpAnjM97leYKVRYWwjsJ3Cm19NtYoP9umRNlHrgJ6LZ/t0muteYAPtQ 8zMw== 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=dLS8FihYKLxk6hFmAHONo20tSjIip4VKYBAdY48ntsE=; fh=ko8w2iEBByNlWLnAg6bNI5pex73wZFG+4jwxERcD8TA=; b=kwx9Ef9ttMli8DVZImmA4RqWR6xiqQJ98GNVwjJUOshrFR4xipJNGHWrkvVrvTYBGl gZl6zyVApv6sgpBxDdUhN8X4CfahKkbCcqvEvIvO8Y3UG7nLJMmjnbAvuc0tOIS6EQX+ rYx+XmXAR35+fFhdgobc/emIonW+5IwTySadmQnBw8N2cUo/Yg9576i156KN34tgB5UO Axoq27zQxPEFNGVihSItY7kyloBd0pmxb5BCN+Pr5uARA7vU4cJlu6d9yxh/iDq6q5hG vWTO8dVO9Nei97HQjT2R/RTOzRGS6mCHRHGs3w42U76/KjQBnZ6WRRYI8Rj26lHWTWfA bBSw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u18-20020a17090abb1200b002792c288cb7si13150719pjr.131.2023.10.10.01.51.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:51:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id B07558142DA2; Tue, 10 Oct 2023 01:51:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbjJJIul (ORCPT + 20 others); Tue, 10 Oct 2023 04:50:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229725AbjJJIu2 (ORCPT ); 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 EF107A9; Tue, 10 Oct 2023 01:50:22 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4S4Tyn4lczzNp8C; Tue, 10 Oct 2023 16:46:25 +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 To: , , , CC: , , , , , , Subject: [PATCH v3 5/5] hwtracing: hisi_ptt: Add dummy callback pmu::read() Date: Tue, 10 Oct 2023 16:47:31 +0800 Message-ID: <20231010084731.30450-6-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 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 01:51:10 -0700 (PDT) X-Spam-Level: ** X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779357841381532458 X-GMAIL-MSGID: 1779357841381532458 From: Junhao He When start trace with perf option "-C $cpu" and immediately stop it with SIGTERM or others, the perf core will invoke pmu::read() while the driver doesn't implement it. Add a dummy pmu::read() to avoid any issues. Fixes: ff0de066b463 ("hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device") Signed-off-by: Junhao He Signed-off-by: Yicong Yang Acked-by: Jonathan Cameron --- drivers/hwtracing/ptt/hisi_ptt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c index 62a444f5228e..c1b5fd2b8974 100644 --- a/drivers/hwtracing/ptt/hisi_ptt.c +++ b/drivers/hwtracing/ptt/hisi_ptt.c @@ -1184,6 +1184,10 @@ static void hisi_ptt_pmu_del(struct perf_event *event, int flags) hisi_ptt_pmu_stop(event, PERF_EF_UPDATE); } +static void hisi_ptt_pmu_read(struct perf_event *event) +{ +} + static void hisi_ptt_remove_cpuhp_instance(void *hotplug_node) { cpuhp_state_remove_instance_nocalls(hisi_ptt_pmu_online, hotplug_node); @@ -1227,6 +1231,7 @@ static int hisi_ptt_register_pmu(struct hisi_ptt *hisi_ptt) .stop = hisi_ptt_pmu_stop, .add = hisi_ptt_pmu_add, .del = hisi_ptt_pmu_del, + .read = hisi_ptt_pmu_read, }; reg = readl(hisi_ptt->iobase + HISI_PTT_LOCATION);