Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp5332314rwb; Wed, 9 Aug 2023 02:24:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOFnufeVYUUJyzI9Ll7hn1uQYWM0SR6/oF4Zi1jLINDqBhW/nD5HBLUAb9SwQOKTP6TubY X-Received: by 2002:a17:906:2214:b0:99b:57f0:68b5 with SMTP id s20-20020a170906221400b0099b57f068b5mr1693917ejs.75.1691573045556; Wed, 09 Aug 2023 02:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691573045; cv=none; d=google.com; s=arc-20160816; b=kYwClZ3rVCGc/CCPOcxXhjyT62Dp7VioJQwQQtywRHy793eyxWabmAAzMbagNe/xb2 MclRGnBfSD/2Qphhy3Qy/uYkT5fgRHgbJeQyWC7lxDdRT1ut6mwAEsvPxWSfrX23QuGA rZXRrbWcN1WlSH1OlBkYJSMxxu+cQ8tyGiASIT4Brm02e5qMLEDD8/rHcSQhK5rJS9nk 15KKTN+6qYxi00lx1MnbqHnSL9OBB+RBtGbz0ULQhQ8b7aFTTRp6hbzTQEAx46QpNryY rktLK/fnSSHxai9nszr/2enpIv2VEkdkMe/a77xUxvI3L7slYnI10BjoeCK844NpWc0H 5Usw== 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=w/fNHbtGj2Bu8O8gxQWi2U3T6eSNUgt3I41QbTr71JA=; fh=3Xa+Ca9QE4oHBLojfhmHw+QI2cJx6cXgOgG4DAxRTgs=; b=TDJwnvZFJJ8nzmwjlsGCtffJtAimXtoxHpqDZ28pykbxjZGSazGEuD6SsGqMpa+Yrx fq+A5wM/32XrwAXYaAW4NvVqNk6CtWZim7Z8E66zrcWzMt5EQ5Kn+L8GTLOHggqpqB86 oL37tJiylyFWeLenvYGOxCrtbINLaX9G6YC9R+DQEpKZaRY4b8wn63p53OTlu/0WNj43 X6vZKeGhUi+VjOFEtYWZ+J9rYjPjvs8Md6AyZbnIuYxe5kKibkS6XYm4ikc5ENryBfTl BBhq3G33uC+I+FRhGdN1P4YTCC1bSAT8o5wxV+bIgfPiXM7vvJqpQ9IFZvFbNlgmhK0l J/KA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d27-20020a170906345b00b0098759716e36si3170123ejb.217.2023.08.09.02.23.38; Wed, 09 Aug 2023 02:24:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjHIIUy (ORCPT + 99 others); Wed, 9 Aug 2023 04:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbjHIIUo (ORCPT ); Wed, 9 Aug 2023 04:20:44 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4212FE7D; Wed, 9 Aug 2023 01:20:43 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RLNJJ29p6zmXZQ; Wed, 9 Aug 2023 16:19:28 +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.27; Wed, 9 Aug 2023 16:20:39 +0800 From: Yicong Yang To: , , , CC: , , , , , , Subject: [PATCH 5/5] hwtracing: hisi_ptt: Add dummy callback pmu::read() Date: Wed, 9 Aug 2023 16:18:25 +0800 Message-ID: <20230809081825.11518-6-yangyicong@huawei.com> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20230809081825.11518-1-yangyicong@huawei.com> References: <20230809081825.11518-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: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- 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 916686c6a9c8..7392e039b8c1 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