From patchwork Tue Jun 30 08:51:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 6694721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7BDA69F39B for ; Tue, 30 Jun 2015 08:55:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A148E203A9 for ; Tue, 30 Jun 2015 08:55:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C6F9620380 for ; Tue, 30 Jun 2015 08:55:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9rID-00056p-1j; Tue, 30 Jun 2015 08:53:25 +0000 Received: from szxga03-in.huawei.com ([119.145.14.66]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9rI9-0004zv-UK for linux-arm-kernel@lists.infradead.org; Tue, 30 Jun 2015 08:53:23 +0000 Received: from 172.24.2.119 (EHLO szxeml433-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BIL08103; Tue, 30 Jun 2015 16:51:52 +0800 (CST) Received: from [127.0.0.1] (10.177.27.142) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.158.1; Tue, 30 Jun 2015 16:51:26 +0800 Message-ID: <5592588B.9090706@huawei.com> Date: Tue, 30 Jun 2015 16:51:23 +0800 From: leizhen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Will Deacon Subject: Re: [PATCH 6/8] iommu/arm-smmu: add support for non-pci devices References: <1435307584-9812-1-git-send-email-thunder.leizhen@huawei.com> <1435307584-9812-7-git-send-email-thunder.leizhen@huawei.com> <20150629172831.GL17474@arm.com> In-Reply-To: <20150629172831.GL17474@arm.com> X-Originating-IP: [10.177.27.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.559258AA.002C, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1fb8b531cc3abc8b3d5485eed140956e X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150630_015322_313931_0E8C07E3 X-CRM114-Status: GOOD ( 14.97 ) X-Spam-Score: -4.8 (----) Cc: laurent.pinchart+renesas@ideasonboard.com, Joerg Roedel , "huxinwei@huawei.com" , iommu , Zefan Li , Tianhong Ding , linux-arm-kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 2015/6/30 1:28, Will Deacon wrote: > On Fri, Jun 26, 2015 at 09:33:02AM +0100, Zhen Lei wrote: >> Now, we only support a master with only one stream id. It will cover most >> hardware platforms and coding so easy. >> >> Please refer Documentation\devicetree\bindings\iommu\iommu.txt on how to >> bind device tree. > > Can you build this on top of Laurent's series, please? > > http://lists.infradead.org/pipermail/linux-arm-kernel/2015-May/343686.html Sorry, I have a meeting for a long time. So my email writing was interrupted. Because Laurent's series has not been upstreamed. So this patch can not work correctly after patched Laurent's series. It should modified slightly as below: Should I merge these two patches as one after Laurent's series, or send two times (one before Laurent's series, and one after). What's your opinion? > > Will > > . > diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 2e09f10..c940522 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -1953,7 +1953,7 @@ static int arm_smmu_of_xlate(struct device *dev, struct of_phandle_args *args) dev->archdata.of_smmu = args->np; dev->archdata.sid = args->args[0]; - return 0; + return arm_smmu_add_device(dev); } static struct iommu_ops arm_smmu_ops = { @@ -1966,7 +1966,6 @@ static struct iommu_ops arm_smmu_ops = { .map = arm_smmu_map, .unmap = arm_smmu_unmap, .iova_to_phys = arm_smmu_iova_to_phys, - .add_device = arm_smmu_add_device, .remove_device = arm_smmu_remove_device, .domain_get_attr = arm_smmu_domain_get_attr, .domain_set_attr = arm_smmu_domain_set_attr,