Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp556995rwb; Wed, 9 Nov 2022 06:08:05 -0800 (PST) X-Google-Smtp-Source: AMsMyM5Zf65ne1X8ukls3hgy3ftfnC7o84oRtEsakTumBC3Dyu1kqRaXFFzW2/Va7cw4LDTF5hPk X-Received: by 2002:a17:903:22c7:b0:187:190d:da89 with SMTP id y7-20020a17090322c700b00187190dda89mr55423961plg.68.1668002884779; Wed, 09 Nov 2022 06:08:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668002884; cv=none; d=google.com; s=arc-20160816; b=yuE33T1BqK5pE8U7TTwCmJ/3K9uXK+cgXsO5IfJQgnAKyeINTblO1dClRvDu9GRcBY IOI2ElUfl1ufcafkcFSIy33f2lduQlnrxqZpp1awQ+oVzfQoHnR8LvVthOjVgrxoz418 Fn78XEcZgqyJSN5yGXM/9a4wIV4k43PnTIQFQszhJoWv//SuZfVW06+6rsf/bntuEU1b OJhWSmu0HogyOcXJ4RQqkO6SHlethtZD1N3I7b9ZVklc3EzAjD0kv57PyimLqf/rnMJ7 J7VZjYm8l99uRbXtHp0pssJtRZV93HiiLfcb7D4GfSfbCs+QKeHL+2yGAq46GV3oynr8 cXzg== 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 :message-id:date:subject:cc:to:from; bh=IN/NElkX2byxrHEP0jSyTnR4fZjM08YRHqhFbmh+DII=; b=CM/hKV3uMUSn5rg98T7SlwobKGqGk6gEEZt31paj5gGH/nrcVWOzHS2ygvMrvN/PXV u5f2misjG6wL5x2jTgwxoVTSIyPl3VNazWTP02OzCErDZE9sLTStE8fZKzlyKvGHCu0d CT0edKJiT5DIVbqnuQwsV0aFggN2SxIYcfxY37iXrIdOsEyKaWyrEq1sQllLcgm98es8 8BxOgOU78+P3QbjwyJYLGjxGxLMO3W18Y+/vVrZLjpov0VWenb3I3F2kFqleWl7fAWDl jyCRQN4xQzwuLOcaHVEvyGETGom9+tr6ifovwaqIZrD6Xl3MhvBKsAwI4eukJY1FT2YC fI9A== 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 k4-20020a170902c40400b00186a8c18856si21795463plk.451.2022.11.09.06.07.50; Wed, 09 Nov 2022 06:08:04 -0800 (PST) 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 S230228AbiKINto (ORCPT + 92 others); Wed, 9 Nov 2022 08:49:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229640AbiKINtm (ORCPT ); Wed, 9 Nov 2022 08:49:42 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E590A1CFF3 for ; Wed, 9 Nov 2022 05:49:40 -0800 (PST) Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.55]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4N6mY22ydVz15MSg; Wed, 9 Nov 2022 21:49:26 +0800 (CST) Received: from dggpeml500002.china.huawei.com (7.185.36.158) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 21:49:38 +0800 Received: from localhost.localdomain (10.69.192.56) by dggpeml500002.china.huawei.com (7.185.36.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 9 Nov 2022 21:49:38 +0800 From: Junhao He To: , , , , , CC: , , , , , , , , Subject: [PATCH v12 0/2] Add support for UltraSoc System Memory Buffer Date: Wed, 9 Nov 2022 21:50:06 +0800 Message-ID: <20221109135008.9485-1-hejunhao3@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500002.china.huawei.com (7.185.36.158) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 Add support for UltraSoc System Memory Buffer. Change since v11: - Modify the code style and rename the register macro according to Jonathan's comment. - Link: https://lore.kernel.org/lkml/20221107130624.59886-1-hejunhao3@huawei.com/ Change since v10: - Rebase onto v6.1-rc4, included similar sysfs register accessors (as same as James's patch) - Link: https://lore.kernel.org/lkml/20221022115929.7503-1-hejunhao3@huawei.com/ Change since v9: - Update the Contact tag in SMB document. - Replace the spinlock with mutex. - Do some clean-ups in "smb_enable()" and "smb_release()". - Use classic memory mapped interface. - Link: https://lore.kernel.org/linux-arm-kernel/20220818132231.28240-1-hejunhao3@huawei.com/ Change since v8: - Insert a blank line at the end of the config tag in Kconfig to Randy's comment. - Link: https://lore.kernel.org/linux-arm-kernel/20220816131634.38195-1-hejunhao3@huawei.com/ Change since v7: - Use the macros for register bit flags and numbers of resource. - Cleanup punctuation. - Update the Date tag and the KernelVersion tag in the document. - Link: https://lore.kernel.org/lkml/20220712091353.34540-1-hejunhao3@huawei.com/ Change since v6: - Modify the code style and driver description according to Suzuki's comment. - Modify configuration of "drvdata->reading", to void problems in open/read concurrency scenario. - Rename the macro of "SMB_FLOW_MASK". - Use the "handle->head" to determine the page number and offset. - Link: https://lore.kernel.org/linux-arm-kernel/20220606130223.57354-1-liuqi115@huawei.com/ Change since v5: - Address the comments from Suzuki, add some comments in SMB document, and modify configuration of "drvdata->reading", to void problems in multi-core concurrency scenario - Link: https://lore.kernel.org/linux-arm-kernel/20220416083953.52610-1-liuqi115@huawei.com/ Change since v4: - Add a simple document of SMB driver according to Suzuki's comment. - Address the comments from Suzuki. - Link: https://lore.kernel.org/linux-arm-kernel/20220128061755.31909-1-liuqi115@huawei.com/ Change since v3: - Modify the file header according to community specifications. - Address the comments from Mathieu. - Link: https://lore.kernel.org/linux-arm-kernel/20211118110016.40398-1-liuqi115@huawei.com/ Change since v2: - Move ultrasoc driver to drivers/hwtracing/coresight by Mathieu's comment. - Link: https://lists.linaro.org/pipermail/coresight/2021-November/007310.html Change since v1: - Drop the document of UltraSoc according to Mathieu's comment. - Add comments to explain some private hardware settings. - Address the comments from Mathieu. - Link: https://lists.linaro.org/pipermail/coresight/2021-August/006842.html Change since RFC: - Move driver to drivers/hwtracing/coresight/ultrasoc. - Remove ultrasoc-axi-com.c, as AXI-COM doesn't need to be configured in basic tracing function. - Remove ultrasoc.c as SMB does not need to register with the ultrasoc core. - Address the comments from Mathieu and Suzuki. - Link: https://lists.linaro.org/pipermail/coresight/2021-June/006535.html Qi Liu (2): drivers/coresight: Add UltraSoc System Memory Buffer driver Documentation: Add document for UltraSoc SMB drivers .../sysfs-bus-coresight-devices-ultra_smb | 31 + .../trace/coresight/ultrasoc-smb.rst | 80 +++ drivers/hwtracing/coresight/Kconfig | 11 + drivers/hwtracing/coresight/Makefile | 1 + drivers/hwtracing/coresight/ultrasoc-smb.c | 635 ++++++++++++++++++ drivers/hwtracing/coresight/ultrasoc-smb.h | 117 ++++ 6 files changed, 875 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-ultra_smb create mode 100644 Documentation/trace/coresight/ultrasoc-smb.rst create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.c create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.h -- 2.33.0