From patchwork Thu May 25 10:16:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Sakamoto X-Patchwork-Id: 9833 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp259860vqr; Thu, 25 May 2023 03:32:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4l3Rnw99Ls+GoH487krfa9k6gk77nD7nbG1PxEBOsNdFVu3XKaPlBLtDfx6/VQXKg8y0aQ X-Received: by 2002:a17:90b:4d12:b0:250:648b:781d with SMTP id mw18-20020a17090b4d1200b00250648b781dmr1283657pjb.23.1685010760271; Thu, 25 May 2023 03:32:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685010760; cv=none; d=google.com; s=arc-20160816; b=lCZ8VUO4qiK/y2k/kmTNS75iaGUnCAGQWDR1WNUC9ZM67zvFwgy50RcTUW7/RTWK0M 8huM9RSaqFsW87R6NXgCpdYXuXI92TXd7qtj6LzFfJq4fZTXZyxaPVAEj0DniRnvD9+G Vx/Oqb6IqQ2Y445spaKxzy/ekK5+RzPt1JfTA/S/tYr2uiqPgHh1iSQC/KKctDVrt4Pq 8g6i3Lmt+CTYlH10bQMCFQysMxYXc8j0HwoCLBbBj6eaJNBJ3wZkj9m3IhwdOOo29mK8 YpNe59/aixXD4ZSAonCIR1DtEyoie3LPZCewOiy/mlUeKFsidS/7shlUtLphotIejWca NDsA== 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:feedback-id:dkim-signature :dkim-signature; bh=Wc9w3kWKGue5AkBPboUKgcnbBhGEfTTn2MbGT+ui8WA=; b=wRl4uE5eukQaONVTZgj3sOOySGWcg3SNoctWlkDqLBleE+lLBCdWF35IL0SlP8l7ZP OPisd4knrNfz31GUk6B5eG7omsOVtzU48a7sARh52tOwysGodAU6TtjiIoU0u4LpKZBU b43dHE9blhN73BbbyUf9NslWMHCcX3Q01uhzcdRoMnGkWovX2NdAS5trLNv9GVMog3pq Nc9KCY/QJrTAVJP4utx5QEayzhjNoujieqbw90KByMj9wzAXaFv6BBTv1cu/5TGYaRnO wdi5Wkee8ETIerEmrV7nsVI0s7zHp97a7+jEX4rcW2htyHXScpVcU/7CLLd8ygTsOzFS gfMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sakamocchi.jp header.s=fm1 header.b=TzySZ+u5; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PVF5K47n; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a17090a8c1100b002533d06fefcsi1312338pjo.50.2023.05.25.03.32.25; Thu, 25 May 2023 03:32:40 -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; dkim=pass header.i=@sakamocchi.jp header.s=fm1 header.b=TzySZ+u5; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=PVF5K47n; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240915AbjEYKRU (ORCPT + 99 others); Thu, 25 May 2023 06:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240916AbjEYKQj (ORCPT ); Thu, 25 May 2023 06:16:39 -0400 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79F7D1A4 for ; Thu, 25 May 2023 03:16:33 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2B3E55C01A6; Thu, 25 May 2023 06:16:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 25 May 2023 06:16:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakamocchi.jp; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm1; t=1685009790; x=1685096190; bh=Wc 9w3kWKGue5AkBPboUKgcnbBhGEfTTn2MbGT+ui8WA=; b=TzySZ+u5L0uFc+qqrv IRyEduQPvIG4W2O3GlLsHyhJHat69y72XD3vaEkp9FkEGbU3/YQBbPRwOcQY3hBu m9EkNCTLuCnmqDyo7lTz1UFJUfSk2MSnzIF3r5XnTI1Huf66d+BcbwhQnRk9y1kX eMki1U9U0YinrJ9SLxd35yFlOs+fBOIm0YIpvfLseImTY4jBtCrfivc4+3MwAjEg 0VImjXmPSpTgX16qHomzlk9Bo33O+BHeADuXwQUJwmNz+NCRQaiLImrlSjwJi34k bmXOFnhx2sdXuc1AWdj64I3CZ6558GqHxlYmtcobw7+Oq3lVfGZjSoB81pFULtEs H0YQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1685009790; x=1685096190; bh=Wc9w3kWKGue5A kBPboUKgcnbBhGEfTTn2MbGT+ui8WA=; b=PVF5K47n8yC9R/VDm9XLqi0J+pxnP eiZBLtHRArSD70tEPVFrAI9kai89n35FYjo2jIRf511mWq5+Rc4okUPivl5OMOKW p2VHC4SVB3pwXrz6XHNzTJl3gXVpYFJrWpNhOZlpfhZwq5uloNxwc0rM0hipGcm1 bDXm/KvKXBc/IdjgkI4MkpmOIGCEJRVTl8nyxWl8dbWCe5CnpNjWtcB7yCiIAfPp v8Ldr+s4thbhLk8IX4jYWToCMPn5r0GKlgUYFZZWHw257jQ2aSJrRPiWkLR4G72s 2CZccZBcCi/7AVUpgXaALAGuCBWdN9DhnSkFOUwufnuSrYXQp2hRQ3Mxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejjedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpefvrghkrghshhhiucfurghkrghmohhtohcuoehoqdhtrghkrghs hhhisehsrghkrghmohgttghhihdrjhhpqeenucggtffrrghtthgvrhhnpeeggfehleehje eileehveefkefhtdeffedtfeeghfekffetudevjeegkeevhfdvueenucffohhmrghinhep khgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepohdqthgrkhgrshhhihesshgrkhgrmhhotggthhhirdhjph X-ME-Proxy: Feedback-ID: ie8e14432:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 May 2023 06:16:28 -0400 (EDT) From: Takashi Sakamoto To: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: kunit-dev@googlegroups.com Subject: [PATCH v2 00/12] firewire: deliver hardware time stamp for asynchronous transaction Date: Thu, 25 May 2023 19:16:13 +0900 Message-Id: <20230525101625.888906-1-o-takashi@sakamocchi.jp> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766861843399001370?= X-GMAIL-MSGID: =?utf-8?q?1766861843399001370?= Hi, This patchset is revised version of the previous one[1]. Copied from the cover letter: 1394 OHCI hardware supports hardware time stamp for asynchronous communication at 8,000 Hz resolution (= isochronous cycle), while current implementation of FireWire subsystem does not deliver the time stamp to both unit driver and user space application when operating the asynchronous communication. It is inconvenient to a kind of application which attempts to synchronize data from multiple sources by the (coarse) time stamp. This patchset changes the subsystem so that the unit driver and the user space application to receive the time stamp, therefore it affects kernel service for asynchronous transaction, kernel API for unit driver, and UAPI for user space application. The first patch is newly added for KUnit test to check layout of structure exposed to user space. I'm pleased if getting any review by KUnit developers since it is my first time to write any KUnit test. The new feature will be used for my future work to replace tasklet with workqueue. The hardware time stamp could enable us to compute the processing delay so precise. [1] https://lore.kernel.org/lkml/20230125120301.51585-1-o-takashi@sakamocchi.jp/ Takashi Sakamoto (12): firewire: add KUnit test to check layout of UAPI structures firewire: cdev: add new version of ABI to notify time stamp at request/response subaction of transaction firewire: cdev: add new event to notify request subaction with time stamp firewire: cdev: implement new event to notify request subaction with time stamp firewire: core: use union for callback of transaction completion firewire: core: implement variations to send request and wait for response with time stamp firewire: cdev: code refactoring to operate event of response firewire: cdev: add new event to notify response subaction with time stamp firewire: cdev: implement new event to notify response subaction with time stamp firewire: cdev: code refactoring to dispatch event for phy packet firewire: cdev: add new event to notify phy packet with time stamp firewire: cdev: implement new event relevant to phy packet with time stamp drivers/firewire/.kunitconfig | 4 + drivers/firewire/Kconfig | 16 ++ drivers/firewire/Makefile | 3 + drivers/firewire/core-cdev.c | 252 +++++++++++++++++++++------- drivers/firewire/core-transaction.c | 93 +++++++--- drivers/firewire/core.h | 7 + drivers/firewire/ohci.c | 17 +- drivers/firewire/uapi-test.c | 87 ++++++++++ include/linux/firewire.h | 82 ++++++++- include/uapi/linux/firewire-cdev.h | 180 +++++++++++++++++--- 10 files changed, 625 insertions(+), 116 deletions(-) create mode 100644 drivers/firewire/.kunitconfig create mode 100644 drivers/firewire/uapi-test.c