From patchwork Wed Aug 9 08:18:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 133137 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2668828vqr; Wed, 9 Aug 2023 02:21:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnAQKtr4ypbNlEH1ODvQVbl15mS/eor3/tt4y/cN8BBfyVhQf41ql9bO/herQg+YVJN+OC X-Received: by 2002:ac2:4ed1:0:b0:4fe:8c4:44f4 with SMTP id p17-20020ac24ed1000000b004fe08c444f4mr1235706lfr.62.1691572869163; Wed, 09 Aug 2023 02:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691572869; cv=none; d=google.com; s=arc-20160816; b=I8wYZNFuJk9ATsDiLLVnq561twf/14Kljxkz0J97RZ8lyhXYyt7/jigIQwIFgG6P09 pb52zYkLXutFVivlPqjho7l+xVzUToF5rKrfoQdu450EJuU4gaxdyGGaB8G37Nvd71Kb 2oGMGgcbsfGNzP/ywu9ZhyKZ/2gaRfobqF9abOlJB6Fi0ngkyugZE9+wgF4+wsefpile lOp4IQpopSzF31dIa/AEBVdiOSJ3qK1kCI3PqHjt/aHJzdQzl3wFF1KL5ao22oZ0uLJU pLuPLd2HVkXZXOSXF5rvGpCumcJaMfHVcj2qxm/DR6DT3Jhdwl6Mu2uqhFsUG+wXaIoU /b+A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020a05640208c400b005231e7a8671si7908986edz.614.2023.08.09.02.20.45; Wed, 09 Aug 2023 02:21:09 -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 S231936AbjHIIUy (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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773742712996188912 X-GMAIL-MSGID: 1773742712996188912 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);