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 35ED9C3DA64 for ; Tue, 6 Aug 2024 15:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=s1a9aAuiBzsbZG/XjQxHazfEVtr8j/hhLtoCBAGHVDE=; b=SCqav+eaoUlaIFesIByUjdzO1N nLLwsVyGZSHLmtDCgSCSbZXHqdlLDlZrIUbQkwOTY6yk857jQsA9wCZbICgglnXKyRj4ym5yb7tr0 cY+Rmwb1m+y1jOSTD+UR3C2f14ZTM1Xitzt/N1QfZz/Gdw57vQgoJSsDeHjWIH1pxbQT31IMH+VDT Prq8L4rxDLaneUB7d+FTmtQOFF6fAQ5zDfQwHxQmQEYbQnF2QC0v+FZaQJqGi4AJUYDywmTzDLTR1 KC4D4po01ZbHU/GNzTT4t4DUcuzFwx9I0gurtg4OP/x9+K3SoIHts/o5eWR/TxUZGtJUbhsETPb6J Mi9a8kdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbMB7-00000002CCu-0Epg; Tue, 06 Aug 2024 15:32:49 +0000 Received: from m16.mail.126.com ([220.197.31.7]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbMAX-00000002Bwz-3E4N for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 15:32:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=s1a9a AuiBzsbZG/XjQxHazfEVtr8j/hhLtoCBAGHVDE=; b=pDRPXg4ELyr3Ry7kw1TKV Efy4a04hXu0vhtpVWhYJ7uD3dQiJHUftRiA1z//pM4x+Idx0zSNPjxWDNsDFBOgn KA+qgTrpIeWewl+pIS7359obkLurVMeELAY46Fe2l52KKpAS73uCyxi6fJVcWtnU RDkYFrawynUoPAncxZuDB4= Received: from nilq-virtual-machine.. (unknown [60.27.227.124]) by gzsmtp2 (Coremail) with SMTP id pikvCgD3n07HQbJmk6QOAA--.4296S2; Tue, 06 Aug 2024 23:31:21 +0800 (CST) From: niliqiang To: jean-philippe@linaro.org Cc: Jonathan.Cameron@huawei.com, baolu.lu@linux.intel.com, devicetree@vger.kernel.org, eric.auger@redhat.com, guohanjun@huawei.com, iommu@lists.linux-foundation.org, jacob.jun.pan@linux.intel.com, joro@8bytes.org, kevin.tian@intel.com, lenb@kernel.org, linux-accelerators@lists.ozlabs.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lorenzo.pieralisi@arm.com, rjw@rjwysocki.net, robh+dt@kernel.org, robin.murphy@arm.com, shameerali.kolothum.thodi@huawei.com, sudeep.holla@arm.com, vivek.gautam@arm.com, wangzhou1@hisilicon.com, will@kernel.org, zhangfei.gao@linaro.org, zhukeqian1@huawei.com, ni.liqiang@zte.com.cn, li.zhichao@zte.com.cn, jin.qi@zte.com.cn Subject: Re: [PATCH v14 07/10] iommu/arm-smmu-v3: Maintain a SID->device structure Date: Tue, 6 Aug 2024 23:31:19 +0800 Message-Id: <20240806153119.8089-1-ni_liqiang@126.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20210401154718.307519-8-jean-philippe@linaro.org> References: <20210401154718.307519-8-jean-philippe@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: pikvCgD3n07HQbJmk6QOAA--.4296S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Xr13KryUZF15Kw4rZr4xWFg_yoW3Cwc_KF yDZrn7Jw4SyF48XanxKanruwsxKF40g34kX345XrWS93W7JFs8GrykGr9aqrZ7WrZrCwnI yrn3ta9xWr1agjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU14xRPUUUUU== X-Originating-IP: [60.27.227.124] X-CM-SenderInfo: xqlbzxxtld0wa6rslhhfrp/1tbirwoz5WVLbKD00wAAs2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_083214_346422_B6680FA0 X-CRM114-Status: UNSURE ( 7.37 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > It is expected that a single SMMU instance is highly likely to have more > than one device behind it, and therefore more than one StreamID to keep > track of. Thanks for your explanation. I now understand the role of the `mutex_lock` statement. However, I have a new question that I hope you can help me with: I noticed that the function `arm_smmu_insert_master`, which includes the `mutex_lock` statement, was introduced in Linux version 5.13. For kernel code before version 5.13, how do we ensure that there's no resource contention when multiple devices are loaded behind a single SMMU instance? Currently, we're indeed encountering resource contention issues when loading multiple device drivers on the 5.10 kernel. Do you have any suggestions on how to resolve this issue? Thanks.