Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1115559ybt; Fri, 10 Jul 2020 23:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8soVxgGbU+oiU4ik4Y2ekF28JTDKUGMASpxeb8ydXt42ESh5wwGhQeEW+HpS//9Cvb42b X-Received: by 2002:a50:fc97:: with SMTP id f23mr70829792edq.255.1594450518441; Fri, 10 Jul 2020 23:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594450518; cv=none; d=google.com; s=arc-20160816; b=Tx+T4tT8mmu6+I1kIbHl2IlchW2F9flxLvx3t4SBK7hZSuHSEYHdaUwVuMB9Rtjn0j JMrbCG627V26dzvxO2yN5o+Ay2NZOmkwJYSeFUTeonFjW5tzIF287CvLDG+SysnKqo4f DKkLLnpb4kYuN+csPikoDmGnTZ97cbV2S1BZtmbKJxfYlrCNexK+gcNm1zAH8AdjS/uo q4BwQFZrTcmjb0qOgLcN1IZsfmd0j+ZSHT1TjGtlO/PPBejGPRXgoiCGTicO57WuWUVF nV+SM8Fnz5XnYfuhWx+y6pzixj8qZsEKwowJcs5KOlZhGRlR5X6Qs+cxF8s7fKryGXbz p52w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d323G7Mktfz5tSwUdjxxKwZXWuvpzrhkNVAsTwTZLqM=; b=HBfUHGeKhlfD4sxE6Odpe+/dPCCB9UruzaHVyEkNzn/xYwPxSqHcas9gwcyRKGHtMP v2BWGfoeusTld2hXn0jdgC3JwJOIpTtua7X8PVVUQzi8LPBjIJGK6/Ob2j6yK/DWXiC4 8Oio7YENSDmaIcCZDHkEHJqurjcXJaQ+yMRJR+jGD1O5nLXrI3w1uTgSQd4uwfnTAx9R XSisDaETO8O6SnZXqn1YWUJeZAzBb29AUKCfqQ20H7ERKLJ6A8fql+M0FU2INa4uZKtY 6GPPecj2YVVzCPGY9IZgCy6W0CSNHOOqvfgIcnhI4U2tBn+14YG2bMkyR05Rg/qANe4H b/rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=c6s831n2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si5756927edr.113.2020.07.10.23.54.56; Fri, 10 Jul 2020 23:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=c6s831n2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728133AbgGKGwl (ORCPT + 99 others); Sat, 11 Jul 2020 02:52:41 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:14909 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727984AbgGKGwl (ORCPT ); Sat, 11 Jul 2020 02:52:41 -0400 X-UUID: 9bbba3a6b7184c588404ea46dad26105-20200711 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=d323G7Mktfz5tSwUdjxxKwZXWuvpzrhkNVAsTwTZLqM=; b=c6s831n2n0e763qWOwTQN7IQh6gzK37ohixXPS34Dv7IrdFLjSI2jBokgITuTqMzAVZkJdlPOLqZdEHsdW0UpQPIj3hfQwmmZ9CR/RSOIaQFtk3UsxcwhsEzWqQtx0Iyb/lmUChieMjIJj93TP2ugtkuQ6JPP00Wsw+jfYibnjY=; X-UUID: 9bbba3a6b7184c588404ea46dad26105-20200711 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 845972161; Sat, 11 Jul 2020 14:52:35 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 11 Jul 2020 14:52:31 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 11 Jul 2020 14:52:30 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy CC: Will Deacon , Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Subject: [PATCH 19/21] iommu/mediatek: Adjust the structure Date: Sat, 11 Jul 2020 14:48:44 +0800 Message-ID: <20200711064846.16007-20-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200711064846.16007-1-yong.wu@mediatek.com> References: <20200711064846.16007-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 6F416FFE700F0D93CB718E9924FA470FBE369F7601B2F1E2AE68CD8978F525492000:8 X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWRkICJzdHJ1Y3QgbXRrX2lvbW11X2RhdGEgKiIgaW4gdGhlICJzdHJ1Y3QgbXRrX2lvbW11X2Rv bWFpbiIsDQpyZWR1Y2UgdGhlIGNhbGwgbXRrX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