Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp441750ybt; Wed, 8 Jul 2020 03:47:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlvZE0w9lTtARdll3GEnCP+Q78QeaIuye2Hi4OT1o5WR7obay44aJ4EFfE9+k5XkAQXjSc X-Received: by 2002:a17:906:b0d5:: with SMTP id bk21mr12609507ejb.93.1594205220501; Wed, 08 Jul 2020 03:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594205220; cv=none; d=google.com; s=arc-20160816; b=nDpArwpzZW+7X6t/2Pr88jTc+XCSnQKsc1sPLBLaGXu8VZpLsqAA3uW9yziIq/bhxT YO6DLpOtV86bhQuh1G58KuCcRSaHJJm/QG/SBXmhyzcMdlis6IbPdhnMr+drJ+tiOXd6 ucH1ZbcQhpFMGAz0sry0NzG+cXzM+hwrFL0xMvDvYM8DFB69or4b4n/PfkHPsq9k1VBJ YJ2cLXPNLhLqjAz7vbROvgNz1RvIrGg0QcZivn/vGgmXuVIT8KFGWi34PhF8NqQ90e+U /HSGSafjtq7qAdKQReOYOFpDF8vSNKNpcZMmgRNPPAoGICpYmSTdK5RcPVPxWBtDXxGc Q8kg== 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=8dImjezaDRln9/Yyf6oNcjPYX7KgWdZn4Xoqp2PpPSY=; b=EO2rvIKXH621s37qgxTAVLEEsDDXVvJPfU6mSIOFgczHBkkT3ODswmPIm+usEF8yf7 Wx2HiuM0SXTKb83IuLiDJsj1To2Vo700ilaRLc4sW3TPG9gM5vD7oCZW0xlDkT/r6IPa FO6rjGuKItoY84/uA7GGHXJBrzfWu5C0zQ9ukhI3DNsalOIsfNEMtITGgbeNyY6EZIRx Qj5oLzba7j7wbwud/524eEJc7oK7TRYgkvjNy87zY6wcPL9ak63miHkFwZWcfLYNRSsM OntqeQ/A1WycHLdx1PjeiZJtqjQdiMXcBzhFgK0HlQurj9k05nKLEFo+8CAQQHy+ARzw L0uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=dUrqQqJH; 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 mm30si17044315ejb.574.2020.07.08.03.46.37; Wed, 08 Jul 2020 03:47:00 -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=dUrqQqJH; 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 S1728421AbgGHKps (ORCPT + 99 others); Wed, 8 Jul 2020 06:45:48 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:8974 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725972AbgGHKpr (ORCPT ); Wed, 8 Jul 2020 06:45:47 -0400 X-UUID: fb6fe961e0cb41199bb057faa91bc639-20200708 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=8dImjezaDRln9/Yyf6oNcjPYX7KgWdZn4Xoqp2PpPSY=; b=dUrqQqJHdCnJNgDfpdPjGHbAT7DWetdOfIoZWnHAa1Blod49L7X5lITvz3y65cDNqXYKbMnvJy3S20JIBx1Te31A2EtuX3JrtmFveQ5uyqNx/7TML1DIQ8Vnnz3KxiNRcnvPEXbldsImEv7OhwaV93ApbD7WNUG32Rky/Aukw3g=; X-UUID: fb6fe961e0cb41199bb057faa91bc639-20200708 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1646857872; Wed, 08 Jul 2020 18:45:41 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 8 Jul 2020 18:45:37 +0800 Received: from [10.15.20.246] (10.15.20.246) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 8 Jul 2020 18:45:38 +0800 Message-ID: <1594205054.15266.5.camel@mbjsdccf07> Subject: Re: [PATCH v6 03/10] iommu/mediatek: Use a u32 flags to describe different HW features From: chao hao To: Matthias Brugger , Yingjoe Chen CC: Yingjoe Chen , Joerg Roedel , Rob Herring , , FY Yang , , , , TH Yang , , Yong Wu , , Chao Hao Date: Wed, 8 Jul 2020 18:44:14 +0800 In-Reply-To: References: <20200703044127.27438-1-chao.hao@mediatek.com> <20200703044127.27438-4-chao.hao@mediatek.com> <1593825398.4355.1.camel@mtksdaap41> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: C6F3F116F4E5F81A05C52BC326B71A4E52496CE3118B5B56139A8833B406E13C2000: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 SGkgTWF0dGhpYXMgYW5kIFlpbmdqb2UsDQpUaGFua3MgZm9yIHlvdXIgY29tb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