Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2435409ioo; Sat, 28 May 2022 13:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyZZHVsR5ePqvVxssDsjGOeYp3jpPQoNdleJMgK8WHow91DcPWn9XP/sOSlrn8fXTjKBL6 X-Received: by 2002:a17:902:7781:b0:161:c85a:8fff with SMTP id o1-20020a170902778100b00161c85a8fffmr49175595pll.97.1653770152980; Sat, 28 May 2022 13:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653770152; cv=none; d=google.com; s=arc-20160816; b=KQ/Ka3lJFuCioivPVe3UlwXckD1AGOGJ8SNrnSd2C7ZRnhaekAjZrDhlbgSucXhAYO 0C/5lHK6f0MADvD22Nnsr4Xt+7nQWsEKE8p8omGE5rdnAf6vk1IWLdFjBm8Uwmgbr8Ll UztCs5T0XxChzbHvmdEONA/On70ERkMCanLWLGNS1q49EOil6/7IynQTX5hGkWsMhQ+u Ilo+s1FT1MlkxGiWzbQeroUrrPie32HJc1LF1gXFw4rGaqmIMWHoxqIQDbIkrtHe1ElL U2UYXaEces/6yJp/dxn601y2JOKoG5fYQwh408dY60sYginl7nTPWzjGyOvTtu78h8/c gnbA== 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=2gbBbmAX9tN94HiRmhkf/rQiwnvmLgLsYzQ408PnGDA=; b=BQO1kHad7k3GQR0lVy0us7nNbcpx0avg7eAnnRZ1kn92snqEhJTim4c+g5zM2H9ykw hYOljQckcwSZ+AJVUTos5AdoTlDeNIMY7zGqX4B25C2yoFha5t18SO5YqACm53z18teX 6EOQBTFmYbom38cOhbHcbraYjlKUHhFPraOLJE3zIP15fNoWLOncz0u/NfVQl6ExWeD9 ya8AlR8NTur4uDbtH9D1Hsz2dDigoMI9iObF7jTrT+uVtKKZV2PxS8bWFQ44VuMOCeq6 nfZgR/aIRwDIzWH8/EyhLvMpvJqpteCIbat/umqrGsJCsQKG/TBn8L3PGT3mroliFX2k GtZQ== 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:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l191-20020a6391c8000000b003fbe1f29cacsi2393108pge.633.2022.05.28.13.35.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4BF7A5BD2A; Sat, 28 May 2022 12:37:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346298AbiEZHYO (ORCPT + 99 others); Thu, 26 May 2022 03:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345474AbiEZHYN (ORCPT ); Thu, 26 May 2022 03:24:13 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACB058B0B4 for ; Thu, 26 May 2022 00:24:12 -0700 (PDT) Received: from fraeml701-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4L7zpp2hbGz6GD9Q; Thu, 26 May 2022 15:20:02 +0800 (CST) Received: from lhreml741-chm.china.huawei.com (10.201.108.191) by fraeml701-chm.china.huawei.com (10.206.15.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2375.24; Thu, 26 May 2022 09:24:09 +0200 Received: from [10.81.194.226] (10.81.194.226) by lhreml741-chm.china.huawei.com (10.201.108.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 26 May 2022 08:23:57 +0100 Message-ID: <93b92859-2229-8766-09d2-df16e1ebd4e8@huawei.com> Date: Thu, 26 May 2022 10:23:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2] coresight: etm4x: Add Support for HiSilicon ETM device Content-Language: en-US To: "liuqi (BA)" , Linuxarm , , , , CC: , , Alexey Budankov , References: <1597323562-3706-1-git-send-email-liuqi115@huawei.com> <853b6d52-da86-1c06-3604-3085ece331a4@huawei.com> <5dd1bd83-232a-07e4-8fde-e4f6cd0e5b8c@huawei.com> From: Alexei Budankov In-Reply-To: <5dd1bd83-232a-07e4-8fde-e4f6cd0e5b8c@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.81.194.226] X-ClientProxiedBy: saopeml500001.china.huawei.com (7.184.65.104) To lhreml741-chm.china.huawei.com (10.201.108.191) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Qi, On 26.05.2022 5:56, liuqi (BA) wrote: > > Hi Alexei, > > On 2022/5/25 23:10, Alexei Budankov wrote: >> >> Hi Qi Liu, >> >> On 13.08.2020 15:59, Qi Liu wrote: >>> Add ETMv4 periperhal ID for HiSilicon Hip08 and Hip09 platform. Hip08 >>> contains ETMv4.2 device and Hip09 contains ETMv4.5 device. >>> >>> Signed-off-by: Qi Liu >>> --- >>>   drivers/hwtracing/coresight/coresight-etm4x.c | 2 ++ >>>   1 file changed, 2 insertions(+) >> >> Thanks for your patch. >> I would like to test HiSilicon ETM device feature on >> Kunpeng 920 based server. >> I applied the patch and booted the kernel with the changes. >> However I don't see any device files neither here: >> /sys/bus/coresight/devices/ > > Thanks for your test :) Thanks for quick reply. Appreciate it much. :) > > Kunpeng 920 platform(Non-PG) support tracing CPU instruction, source device is coresight ETM, link device is coresight funnel and sink device is ultrasoc SMB. So you need to insmod coresight-* driver and SMB driver, which patch is : > Add support for UltraSoc System Memory Buffer > https://lore.kernel.org/linux-arm-kernel/20220416083953.52610-1-liuqi115@huawei.com/ I will try it shortly and let you know. > > by the way, can you help to check /sys/bus/amba/devices/, and make sure that the firmware of your board has supported ETM, funnel and SMB devices? Here we go: huawei@armubuntu:~$ pwd /home/huawei huawei@armubuntu:~$ ls /sys/bus/amba/devices/ huawei@armubuntu:~$ Look like our server firmware should be upgraded, right? Your help and support is greatly appreciated. Thanks, Alexei > > Thanks, > Qi > >> nor here: >> /sys/bus/event_source/devices/cs_etm/sinks/ >> What should a user expect new in os with this patch added? > > >> >> Thanks, >> Alexei >> > > >> >>> >>> diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c >>> index 6d7d216..7797a57 100644 >>> --- a/drivers/hwtracing/coresight/coresight-etm4x.c >>> +++ b/drivers/hwtracing/coresight/coresight-etm4x.c >>> @@ -1587,6 +1587,8 @@ static const struct amba_id etm4_ids[] = { >>>       CS_AMBA_UCI_ID(0x000bb805, uci_id_etm4),/* Qualcomm Kryo 4XX Cortex-A55 */ >>>       CS_AMBA_UCI_ID(0x000bb804, uci_id_etm4),/* Qualcomm Kryo 4XX Cortex-A76 */ >>>       CS_AMBA_UCI_ID(0x000cc0af, uci_id_etm4),/* Marvell ThunderX2 */ >>> +    CS_AMBA_UCI_ID(0x000b6d01, uci_id_etm4),/* HiSilicon-Hip08 */ >>> +    CS_AMBA_UCI_ID(0x000b6d02, uci_id_etm4),/* HiSilicon-Hip09 */ >>>       {}, >>>   }; >>> >>> --  >>> 2.8.1 >> . > .