From patchwork Tue Jun 4 17:29:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 13685714 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 412E7C25B78 for ; Tue, 4 Jun 2024 17:30:04 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1rohCurqi0hZQUIPRCeTXHhVge6iXPLsccGZ79ViMfw=; b=btvFaJNs5yO1jy 5fFJ3LP0Dc7sO7e0u0QnpqPcBVfBR5zxbo6vjbxur5hUQEHsyFwOP5m+HsUJaCdIKJ22h+cM0McQm bdFaVpFOY+JMG+RmA22/FmWt0UpQK7lFQP3vh+vmd9lJuDqFIbgvlLsx1ZrjtZv0x0xJQtyO0zqTz oleHRTmiK3sxK8XNenA22gj2d+O1DyKKIEpEzqVNYTE03MDPntsRyyvFLNUhLxjQ8kKK5eIZP/7hg o6k4dNld/8Wd/CguAYlrO6GRUJznSdjH42uOzbXNW71uer4/E8zetPB47xCCI1hcjE+THQ44tX9yn 6bB90ujfFH16gUtEajzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEXyl-00000003IrS-3mmH; Tue, 04 Jun 2024 17:29:47 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEXyS-00000003IeM-2CKf for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2024 17:29:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1717522165; x=1718126965; i=wahrenst@gmx.net; bh=Rfry0NXDm1gI1wrMbe/CMHPe2LIMDEs/iZcoJxyMFUI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=cvVlNEDKvi2Q5RqimCm0SkcC+jXYTPm4JPh+RrQqxhspd1YQ0Aq2Xbo3lyy8YEkY Mg9lcdsQIvL+L4R4Aug/ysrLknrvUz0dOmMnEbQOfZ8CBA14qGmZMGgLXZrYmrhV7 4gxZzLyy7KBWvD1HchqmulZt2hB1LRwPuHuRgw5dlv1vZlJetbTF1JBUYxxMmQjHi T3JCAT47TXA09YL8M8M4LU0VwS1ep28k0F0+oLrQOVfUnrMW3QNL+icrRk/eUrPSn ZtURP/ZEb+l/4wSV/WH7ygZvDGeAn4Gk7Dipe/6ScmDNyocASyMr0QNYVPSMB7Scx UbzmvYpag8AQe3NZpg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from stefanw-SCHENKER ([37.4.248.43]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N7zFj-1sZq4M1M6l-01857O; Tue, 04 Jun 2024 19:29:25 +0200 From: Stefan Wahren To: Greg Kroah-Hartman , Florian Fainelli Cc: Umang Jain , Laurent Pinchart , linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Phil Elwell , Stefan Wahren Subject: [PATCH 08/11] staging: vchiq_core: Add comments to mutex/spinlocks Date: Tue, 4 Jun 2024 19:29:01 +0200 Message-Id: <20240604172904.61613-9-wahrenst@gmx.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604172904.61613-1-wahrenst@gmx.net> References: <20240604172904.61613-1-wahrenst@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:1GYyFfrK1UIOo9UDgccMzFEDbhAkCS6WELbwpYOASjPgzxulI9j AS8NOL7esJnmUBLN4RuNU1kiwH8KUxO5WLW2IXfcR9t+zv/08ws5hF37MBGYZXT+fRX7NVC OmveHThI5j7S/fR6u5mlv4qFR/CcOxgxG+we4Mv8oXrBC+Guu/rc8ZZcGUa8kM/53wH++J6 o81GDmjopDfYn9Vh8whNQ== UI-OutboundReport: notjunk:1;M01:P0:xfwWQuTnG7U=;Bjx5uWH5WBW6qPqLclv0AJ8aWGh b5Q4JVia+tkKrM2fyZV7HKpRgYFy1xsUk/huh9FNDffiOft5ocFJINle1M5uN07SuDYOX938d gnG7ZKqptm/LK8oQ1tA88ZjJZmMGKrMW4sQ3TQG72ISfr7/+SvyFlacBq0Bnv9Pz9Jl5eS6yc zOZqmcDYQiLZPhRWh1lQUDdGECboRrsVIY0r62kP7Hjlkdo4ikJwTPHH951/LG5RSzKLqIl00 9Pm9h6dX4A7238SjSGs/gMTeQdJAhbFAMh8z7+tH0PeXbaTiLNEjjtTut6ZUqUwKOnw0oPmcM RDrkzTOToiDW59uctY0s9NfylCqjwv4OQHH/kTYwQG4GPFompcg4j8dd+QTsOSeR0HAn86vGz 1WLxzuNmTM/6GnfKAJEShcNLvveGwJPie7IpCUQdIv6bsrnw3UmMoB9/G0it56tZFDFmS1qzv DLJPKsyKIGsNYAPN+xNAD1QgaDWk/eNYrNx57IH6UXLWqx600PPOA7G7nbcx1bwFxHXHj9NXm C1vZ9hMr10M3NQ2MKdXP21M27DC44lRmObVPvkUBy+CEl7kpO3iyeoM00irBOkMbx/B6LSyjB NxWrVmDzeUOnb1awlgDSNkLVlL2E9vAkdxqsToIuHs+MjH0SB+lAW8/N8f6UGZGLMF4HSo7tU JP2sH2xRv86S5jR9W3gW+oou2538Rf7mUQ63J4E6ilzdfAJJct0vH8uWrdxabzQUWFPJCwjy2 826IU+DvZGEmkfOZSARbbvVCY2bSoK5N6nNTDjII+775rbgNwrgu8pR5nsyL4gaNVspQNwTDx th89u4/mfIv4tRRyB9pZuTS3y5GPgmIm3E/6lv4B2qcx4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240604_102928_878455_C6A70D23 X-CRM114-Status: GOOD ( 12.69 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Phil Elwell checkpatch.pl complains about missing comments at mutex/spinlock definitions. So add them accordingly. Link: https://github.com/raspberrypi/linux/pull/6139/ Signed-off-by: Phil Elwell Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.34.1 diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 3c7a6838ddba..3abcd6910f25 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -196,6 +196,8 @@ struct vchiq_service { struct completion remove_event; struct completion bulk_remove_event; + + /* Serialise access to the bulk transfer queues */ struct mutex bulk_mutex; struct service_stats_struct { @@ -312,7 +314,7 @@ struct vchiq_state { /* Event indicating connect message received */ struct completion connect; - /* Mutex protecting services */ + /* Mutex protecting service creation */ struct mutex mutex; struct vchiq_instance **instance; @@ -341,16 +343,22 @@ struct vchiq_state { char *rx_data; struct vchiq_slot_info *rx_info; + /* Serialise access to the main message slots */ struct mutex slot_mutex; + /* Serialise slot refcount updates */ struct mutex recycle_mutex; + /* Serialise access to the single synchronous message slot */ struct mutex sync_mutex; + /* Serialise access to the message queues to userspace */ spinlock_t msg_queue_spinlock; + /* Serialise completion of blocking transfers */ spinlock_t bulk_waiter_spinlock; + /* Serialise updates to slot quota data */ spinlock_t quota_spinlock; /*