Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2746465ybt; Fri, 3 Jul 2020 18:17:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDicxXP6bUGjfr642GoohlmpVcchsRdCrtn9woW+AnumH1G2WcGnbk73NO/k4QSavIkRuQ X-Received: by 2002:a17:906:c1c3:: with SMTP id bw3mr34156860ejb.8.1593825446871; Fri, 03 Jul 2020 18:17:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593825446; cv=none; d=google.com; s=arc-20160816; b=YVzeRKlS4CM9tpfCoXovJ+P1XsfGRqufhQAP7yytepTxrGwGZ9cPmPjO/U9mbu28/h 080aqlEZ1DJG+8QqBZV3l6SCQqsV3rcFFuTsRvxkFSFbXUVhrcYV1ZEqAQ7ubTxg0uvt NKJ5vgas6jY5yMdvWv0Pzz6hEqqpX5gDyrRMLD+Ee7GZ4gzMrUg9tMoTRydMg9SC+Rjn AiPoSs/K8ATUtFgzdK/YVioBNU4vp1PniA56FwOTl4+dYZn+1LZ/FL6yadjCKdWxgOS1 HlEpqkcbuym90yVNSr1FGhyhglGDcOxnlBQuFT/13UwE5Cqugyer+MILgsDS5DdGkgFx EUKg== 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:date:cc:to:from:subject:message-id :dkim-signature; bh=T1Dk7nQlgGGkbfMonA3Q9alxa/t5hffgX9wAPRQoUoI=; b=H5hueApx9+/yYsJxcqQ1jWywJBOK7JSfJNOCmKnKUYvIWXgECDQey9J4Al9CgbpFng xpCW2KFHw/G7kclAjPphBDA9bBFzFwzPavNt45IEnwqQ9pdI5oi295kw9swzYWziEDhf m9CAMP2o5MkeQYGdM8aZSUYUYyXUHM3Wk+dLZvkhWaNRx/ntO5g/ex0KPTWc5DlT7paf m+nUPEcMDS+HkURhBU+TP/MYgbjyeaqV7pe4++1IOI3UzM8+AZSSkh9p1c30wKfl36LN FD+DMl80auYVNlXQZhH4ig+8uIi6AcgrHzfGXVD+YrcvtbCJkYfNop+1v+EAwZ80wR6k TRVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="WH5S/C2a"; 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 ca10si8996245edb.224.2020.07.03.18.17.03; Fri, 03 Jul 2020 18:17:26 -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="WH5S/C2a"; 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 S1726631AbgGDBQw (ORCPT + 99 others); Fri, 3 Jul 2020 21:16:52 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:27439 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726455AbgGDBQw (ORCPT ); Fri, 3 Jul 2020 21:16:52 -0400 X-UUID: 412854032bf64e50bdfb8009928ded50-20200704 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=T1Dk7nQlgGGkbfMonA3Q9alxa/t5hffgX9wAPRQoUoI=; b=WH5S/C2amh/rSe5qc+nFhFAD8yCxiYi+gHuMLW7UhoE2PkrBDacdIBXv1zhIjhfoXKBivSmqItCDWz7bx0zObf+tKXlTNHLBcg++Jm9ajgVFiydgGhQrWqGPSZ6VCWOczCK+sb8SpWXNJ/cIN7+kD2dSJrin8gjpzces9qUDn70=; X-UUID: 412854032bf64e50bdfb8009928ded50-20200704 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 77149489; Sat, 04 Jul 2020 09:16:46 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 4 Jul 2020 09:16:37 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 4 Jul 2020 09:16:38 +0800 Message-ID: <1593825398.4355.1.camel@mtksdaap41> Subject: Re: [PATCH v6 03/10] iommu/mediatek: Use a u32 flags to describe different HW features From: Yingjoe Chen To: Chao Hao CC: Joerg Roedel , Rob Herring , Matthias Brugger , , "FY Yang" , , , , TH Yang , , Yong Wu , Date: Sat, 4 Jul 2020 09:16:38 +0800 In-Reply-To: <20200703044127.27438-4-chao.hao@mediatek.com> References: <20200703044127.27438-1-chao.hao@mediatek.com> <20200703044127.27438-4-chao.hao@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 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 T24gRnJpLCAyMDIwLTA3LTAzIGF0IDEyOjQxICswODAwLCBDaGFvIEhhbyB3cm90ZToNCj4gR2l2 ZW4gdGhlIGZhY3QgdGhhdCB3ZSBhcmUgYWRkaW5nIG1vcmUgYW5kIG1vcmUgcG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