Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4561244rdb; Fri, 15 Sep 2023 06:09:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXIUNR0SXdB+XzMSztBEZ/5TxtOVU2mwAWMwKxfNy2rV+nIJYdK20a6ELx2AMmkjRMrKts X-Received: by 2002:a05:6a00:134e:b0:682:537f:2cb8 with SMTP id k14-20020a056a00134e00b00682537f2cb8mr1751609pfu.26.1694783379383; Fri, 15 Sep 2023 06:09:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694783379; cv=none; d=google.com; s=arc-20160816; b=AFiOUwrziiduS3sLnredaq+njqcVHP6ChIJ6cV5fhrWdkxVzsqMnLh2PsXZZoauUPY kCR6IDd9cRJeLrDIDK1i0b4gHPD3zTMpZxtgHFMfusJjI9vaePSCde4zwiZsP2g5nA/z gGqZYCHD5qwmfaVWJ3eXlmkNHnD13dIKJaRIzkSeAQ0e1W1/oIHyJh9tVTkV6YTfkBBJ TPeQQPVqvheZFCosA0dzDmPq/N75827F8vwlDiVwnBwhS+m3o6Fj+PvTsFwB28hfcMQg vfnj6KpPW6UBJ6+MxtezF1RKWUiGsLEO+o1tRrmvyPeE9KaSGWw3+HaYxaD5KemUoWFg LHHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=wxhZZ1VxXwupK6adc2n5LLw0zwQtm0IhK9E4E4OabQk=; fh=ltFXIfV3W5wr0NDN+7kyXcg3GKaL/FuWF/cnRY0UVNg=; b=XHXugfdUkc3wUEBF7/TcPZBLtJ8/83C5Li/rKGbHSDm89orq5khunZcSf4cxCIjlz+ +BnbF75XFDn2esr1uDTKSInKXurbdaLj6hxtuk/7N5l2Lvrhv4CkYPQjetxs/altxCuM x7e4Pl3DeTAuf7o14avmh6Vev/VO3YUPAJ/NZUsamUUki+fFfybO/ahAg6kI0qV9mSGZ Q5Bh991cI+UlcZYKxq+BAY7fgg2xQV8iJqFJTTCG1L2QvA6z6z/Kv+KraBBNR8fDVuoc LfJd2SQLUDFUpRt67bfRALkQLNjLJtobAoParNRalgR0/NGQX622GNUAA55+7X/+ebXr 8hHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id y15-20020a056a00180f00b0068a65b26fc6si3478068pfa.43.2023.09.15.06.09.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 06:09:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 220A6837340C; Fri, 15 Sep 2023 05:54:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234995AbjIOMyI (ORCPT + 99 others); Fri, 15 Sep 2023 08:54:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235034AbjIOMyI (ORCPT ); Fri, 15 Sep 2023 08:54:08 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDACE19AE; Fri, 15 Sep 2023 05:53:59 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 02C4E1FB; Fri, 15 Sep 2023 05:54:37 -0700 (PDT) Received: from [10.1.197.1] (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 29E353F5A1; Fri, 15 Sep 2023 05:53:58 -0700 (PDT) Message-ID: <73655f9b-9ea4-cb46-d712-20f1c4ac7c95@arm.com> Date: Fri, 15 Sep 2023 13:53:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2 5/5] hwtracing: hisi_ptt: Add dummy callback pmu::read() Content-Language: en-US To: Yicong Yang , 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 References: <20230914112223.27165-1-yangyicong@huawei.com> <20230914112223.27165-6-yangyicong@huawei.com> From: Suzuki K Poulose In-Reply-To: <20230914112223.27165-6-yangyicong@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 15 Sep 2023 05:54:07 -0700 (PDT) On 14/09/2023 12:22, Yicong Yang wrote: > 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. What issues are we talking about here ? Shouldn't the core perf skip the call, if pmu::read() is not available ? Suzuki > > 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);