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 09CB5C433F5 for ; Tue, 10 May 2022 12:44:35 +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:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:CC:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=D315e7mH7j7EpfSMU+WVpDNXXoQ2K+IodctfFFF2SNg=; b=bf3G9LdFrjsE5U+MwxSr9+4bXv QmUYuOGkoSn1qquBXsSQskTM07qpPZDeqxu9s08evwy+ZoJxZyyQeNKlbMAd3mlYKwZGGomEL5qeC Kfs/yg5tdl5C2WA8iAXV/VrO9G08aoW7ZVuSjYZE1ZRnWGCsxS+4pxlv8MOt+xfgclFfbrEALV9TY jTBVvt+IwFDkLuq95kE82f9ylcpUc15kaLTlwheFEVbn15AO7NCcTfZOZ1sdElQgJDWn4hOWMxkiq ZpDKWCeLotWDZSk6ULHzPeptAOmR0iXUz7Rn0V24WlrkdIlbLY8pmvLryYRAOpK5rucswEbnjsTT6 OlrhNl8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1noPD1-001xsR-JQ; Tue, 10 May 2022 12:43:23 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1noPCu-001xpl-CM for linux-arm-kernel@lists.infradead.org; Tue, 10 May 2022 12:43:19 +0000 Received: from canpemm500009.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KyHkM6qnxzhZ3l; Tue, 10 May 2022 20:42:35 +0800 (CST) Received: from [10.67.102.169] (10.67.102.169) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 10 May 2022 20:43:13 +0800 CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v7 1/7] iommu/arm-smmu-v3: Make default domain type of HiSilicon PTT device to identity To: Will Deacon References: <20220407125841.3678-1-yangyicong@hisilicon.com> <20220407125841.3678-2-yangyicong@hisilicon.com> <20220510112326.GA27790@willie-the-truck> From: Yicong Yang Message-ID: Date: Tue, 10 May 2022 20:43:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: <20220510112326.GA27790@willie-the-truck> X-Originating-IP: [10.67.102.169] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220510_054316_701578_79D25F76 X-CRM114-Status: GOOD ( 17.60 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022/5/10 19:23, Will Deacon wrote: > On Thu, Apr 07, 2022 at 08:58:35PM +0800, Yicong Yang wrote: >> The DMA operations of HiSilicon PTT device can only work properly with >> identical mappings. So add a quirk for the device to force the domain >> as passthrough. >> >> Signed-off-by: Yicong Yang >> --- >> drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) > > I still don't like this being part of the SMMU driver, but given that > (a) Robin doesn't seem to agree with the objection and (b) you've been > refreshing the patch series: > > Acked-by: Will Deacon > > If you do respin, then: > >> diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >> index 627a3ed5ee8f..5ec15ae2a9b1 100644 >> --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >> +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c >> @@ -2839,6 +2839,21 @@ static int arm_smmu_dev_disable_feature(struct device *dev, >> } >> } > > It might be worth adding a brief comment here to explain what this device is > and why it needs an identity mapping. > >> +#define IS_HISI_PTT_DEVICE(pdev) ((pdev)->vendor == PCI_VENDOR_ID_HUAWEI && \ >> + (pdev)->device == 0xa12e) > Will add a brief comment here in next version. Thanks, Yicong _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel