Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2374311rdb; Tue, 10 Oct 2023 01:51:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGs6FIbAqCwUujmCmNIoZ/agE07qxp0VkKTT/ULWNxXr+wLmVSOQQAnhL2wHzZvvfU3xvWI X-Received: by 2002:a05:6808:1818:b0:3ae:5c09:73ce with SMTP id bh24-20020a056808181800b003ae5c0973cemr23595234oib.23.1696927861528; Tue, 10 Oct 2023 01:51:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696927861; cv=none; d=google.com; s=arc-20160816; b=FoEZq2BLEj1FgPROilWngJlzjTTNEVK8FCBMl3l7/iN02AQtlNMOs2G04ju5TUdcY5 yDkwVy8bTrsj2saK3djcAia0Hfne169WM2Go4QsVA/0AnE6n+mF1qFKMw5IoRCfRzSPV Hnu/uv2Ob0528uadMnkzLB4ZNSTHmVX2GskpVPPjwV2tLrdPlobxTUQmv5LHrI9YOMzK YDTNW5z3Mk0OKMDo1iYa75COMajjibasUPhNaC6XQ+CMNobxI4joUOZfjNnBtM1VJYV5 inHdtbe32O1/ixNPfZfS5QhwlwauMx/6xwI/FnabATuvYlE8X2a6wmXhUebCUAblP5+f /LZA== 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 Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id z11-20020a6552cb000000b00589a6e0df1asi8478566pgp.285.2023.10.10.01.51.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:51:01 -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 8DD0D8142D8B; Tue, 10 Oct 2023 01:50:56 -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 S229998AbjJJIul (ORCPT + 99 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 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 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:50:56 -0700 (PDT) X-Spam-Level: ** 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); -- 2.24.0