From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55D2EC433F5 for ; Thu, 14 Apr 2022 12:59:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243677AbiDNNBj (ORCPT ); Thu, 14 Apr 2022 09:01:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238742AbiDNNBf (ORCPT ); Thu, 14 Apr 2022 09:01:35 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF38F92865; Thu, 14 Apr 2022 05:59:10 -0700 (PDT) Received: from fraeml704-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KfKGs19YDz688j4; Thu, 14 Apr 2022 20:56:53 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml704-chm.china.huawei.com (10.206.15.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Thu, 14 Apr 2022 14:59:06 +0200 Received: from [10.47.27.241] (10.47.27.241) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 14 Apr 2022 13:59:05 +0100 Message-ID: <40f03ea6-1690-8a6f-2969-24c47f39c215@huawei.com> Date: Thu, 14 Apr 2022 14:00:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver To: Yicong Yang , Yicong Yang , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , References: <20220407125841.3678-1-yangyicong@hisilicon.com> <20220407125841.3678-6-yangyicong@hisilicon.com> <276c24d2-daf5-5eba-26b9-55edd4a45537@huawei.com> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.47.27.241] X-ClientProxiedBy: lhreml714-chm.china.huawei.com (10.201.108.65) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/04/2022 08:41, Yicong Yang wrote: >>> +    hisi_ptt_pmus = zalloc(sizeof(struct perf_pmu *) * (*nr_ptts)); >>> +    if (!hisi_ptt_pmus) { >>> +        pr_err("hisi_ptt alloc failed\n"); >>> +        *err = -ENOMEM; >> using PTR_ERR seems better, if possible >> > ok will change to that. *err = -ENOMEM is used here to keep consistence with > what spe does. > Ah, I see that we are contrained by the interface of auxtrace_record_init() to pass err as a pointer, so I suppose the code in this patch is ok to fit into that. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C66F9C433EF for ; Thu, 14 Apr 2022 12:59:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 7A2F741513; Thu, 14 Apr 2022 12:59:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ifzmM-ZBicyk; Thu, 14 Apr 2022 12:59:14 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 33B4040946; Thu, 14 Apr 2022 12:59:14 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05CFDC0033; Thu, 14 Apr 2022 12:59:14 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1FC27C002C for ; Thu, 14 Apr 2022 12:59:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id EDF6D60E13 for ; Thu, 14 Apr 2022 12:59:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yRqfZm-CZB1d for ; Thu, 14 Apr 2022 12:59:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by smtp3.osuosl.org (Postfix) with ESMTPS id 0D7B960AC0 for ; Thu, 14 Apr 2022 12:59:10 +0000 (UTC) Received: from fraeml704-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KfKGs19YDz688j4; Thu, 14 Apr 2022 20:56:53 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml704-chm.china.huawei.com (10.206.15.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Thu, 14 Apr 2022 14:59:06 +0200 Received: from [10.47.27.241] (10.47.27.241) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 14 Apr 2022 13:59:05 +0100 Message-ID: <40f03ea6-1690-8a6f-2969-24c47f39c215@huawei.com> Date: Thu, 14 Apr 2022 14:00:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver To: Yicong Yang , Yicong Yang , , , , , , , , , , , , , , , , , , , , , , , , References: <20220407125841.3678-1-yangyicong@hisilicon.com> <20220407125841.3678-6-yangyicong@hisilicon.com> <276c24d2-daf5-5eba-26b9-55edd4a45537@huawei.com> In-Reply-To: X-Originating-IP: [10.47.27.241] X-ClientProxiedBy: lhreml714-chm.china.huawei.com (10.201.108.65) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Cc: zhangshaokun@hisilicon.com, liuqi115@huawei.com, linuxarm@huawei.com, prime.zeng@huawei.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: John Garry via iommu Reply-To: John Garry Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" T24gMTIvMDQvMjAyMiAwODo0MSwgWWljb25nIFlhbmcgd3JvdGU6Cj4+PiArwqDCoMKgIGhpc2lf cHR0X3BtdXMgPSB6YWxsb2Moc2l6ZW9mKHN0cnVjdCBwZXJmX3BtdSAqKSAqICgqbnJfcHR0cykp Owo+Pj4gK8KgwqDCoCBpZiAoIWhpc2lfcHR0X3BtdXMpIHsKPj4+ICvCoMKgwqDCoMKgwqDCoCBw cl9lcnIoImhpc2lfcHR0IGFsbG9jIGZhaWxlZFxuIik7Cj4+PiArwqDCoMKgwqDCoMKgwqAgKmVy ciA9IC1FTk9NRU07Cj4+IHVzaW5nIFBUUl9FUlIgc2VlbXMgYmV0dGVyLCBpZiBwb3NzaWJsZQo+ Pgo+IG9rIHdpbGwgY2hhbmdlIHRvIHRoYXQuICplcnIgPSAtRU5PTUVNIGlzIHVzZWQgaGVyZSB0 byBrZWVwIGNvbnNpc3RlbmNlIHdpdGgKPiB3aGF0IHNwZSBkb2VzLgo+IAoKQWgsIEkgc2VlIHRo YXQgd2UgYXJlIGNvbnRyYWluZWQgYnkgdGhlIGludGVyZmFjZSBvZiAKYXV4dHJhY2VfcmVjb3Jk X2luaXQoKSB0byBwYXNzIGVyciBhcyBhIHBvaW50ZXIsIHNvIEkgc3VwcG9zZSB0aGUgY29kZSAK aW4gdGhpcyBwYXRjaCBpcyBvayB0byBmaXQgaW50byB0aGF0LgpfX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fXwppb21tdSBtYWlsaW5nIGxpc3QKaW9tbXVAbGlz dHMubGludXgtZm91bmRhdGlvbi5vcmcKaHR0cHM6Ly9saXN0cy5saW51eGZvdW5kYXRpb24ub3Jn L21haWxtYW4vbGlzdGluZm8vaW9tbXU= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7330BC433F5 for ; Thu, 14 Apr 2022 13:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DWxbJ1UuafSZQxNNJwybSAAW4SAWfEscExdQ7qpGIXs=; b=2tr04a+frYTrOx xL999JGK67JIZWx5+UCsv7utiKRgcLKTml3Qai0TjR1WwBogQyjF/LjoqfuFfy+bLas+mjly942jz s6tH6C7luOQCoLauoXo/5bEpbrRn6hu2Imq1MhGaE7Sxy4O3nkt4Mt86XEtg5IPJVTSyRDQqQErWa M/iAsLZ5Md1txF16tU0W6HxxLu06oHhGMrAh9IxMgBEZ0PrpabWrJCP06RgS2YpVFi5Su21f1lQu7 tCUU+igH0BDxlQW1A5HHDBnl0g2iSySfyao2eN43FD0VxY04WWVEH7eGTLI9UZejAOaI7sR3Ulrhz BRu5pPLh6oRiWN5t7oxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nez4B-005hgS-0G; Thu, 14 Apr 2022 12:59:19 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nez46-005hbp-DP for linux-arm-kernel@lists.infradead.org; Thu, 14 Apr 2022 12:59:16 +0000 Received: from fraeml704-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KfKGs19YDz688j4; Thu, 14 Apr 2022 20:56:53 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml704-chm.china.huawei.com (10.206.15.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Thu, 14 Apr 2022 14:59:06 +0200 Received: from [10.47.27.241] (10.47.27.241) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 14 Apr 2022 13:59:05 +0100 Message-ID: <40f03ea6-1690-8a6f-2969-24c47f39c215@huawei.com> Date: Thu, 14 Apr 2022 14:00:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver To: Yicong Yang , Yicong Yang , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , References: <20220407125841.3678-1-yangyicong@hisilicon.com> <20220407125841.3678-6-yangyicong@hisilicon.com> <276c24d2-daf5-5eba-26b9-55edd4a45537@huawei.com> From: John Garry In-Reply-To: X-Originating-IP: [10.47.27.241] X-ClientProxiedBy: lhreml714-chm.china.huawei.com (10.201.108.65) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220414_055914_641031_308E31D7 X-CRM114-Status: UNSURE ( 6.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="utf-8"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org T24gMTIvMDQvMjAyMiAwODo0MSwgWWljb25nIFlhbmcgd3JvdGU6Cj4+PiArwqDCoMKgIGhpc2lf cHR0X3BtdXMgPSB6YWxsb2Moc2l6ZW9mKHN0cnVjdCBwZXJmX3BtdSAqKSAqICgqbnJfcHR0cykp Owo+Pj4gK8KgwqDCoCBpZiAoIWhpc2lfcHR0X3BtdXMpIHsKPj4+ICvCoMKgwqDCoMKgwqDCoCBw cl9lcnIoImhpc2lfcHR0IGFsbG9jIGZhaWxlZFxuIik7Cj4+PiArwqDCoMKgwqDCoMKgwqAgKmVy ciA9IC1FTk9NRU07Cj4+IHVzaW5nIFBUUl9FUlIgc2VlbXMgYmV0dGVyLCBpZiBwb3NzaWJsZQo+ Pgo+IG9rIHdpbGwgY2hhbmdlIHRvIHRoYXQuICplcnIgPSAtRU5PTUVNIGlzIHVzZWQgaGVyZSB0 byBrZWVwIGNvbnNpc3RlbmNlIHdpdGgKPiB3aGF0IHNwZSBkb2VzLgo+IAoKQWgsIEkgc2VlIHRo YXQgd2UgYXJlIGNvbnRyYWluZWQgYnkgdGhlIGludGVyZmFjZSBvZiAKYXV4dHJhY2VfcmVjb3Jk X2luaXQoKSB0byBwYXNzIGVyciBhcyBhIHBvaW50ZXIsIHNvIEkgc3VwcG9zZSB0aGUgY29kZSAK aW4gdGhpcyBwYXRjaCBpcyBvayB0byBmaXQgaW50byB0aGF0LgoKX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGludXgtYXJtLWtlcm5lbCBtYWlsaW5nIGxp c3QKbGludXgtYXJtLWtlcm5lbEBsaXN0cy5pbmZyYWRlYWQub3JnCmh0dHA6Ly9saXN0cy5pbmZy YWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vbGludXgtYXJtLWtlcm5lbAo=