Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1114409ybt; Fri, 10 Jul 2020 23:52:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0Tt2SvkyjRGlr3qdUjNBewhSejs2fyfcPR2F9aLFV9NbXVa17mXIyHS++P0vdUgTchAWv X-Received: by 2002:a17:906:2714:: with SMTP id z20mr64991814ejc.469.1594450346333; Fri, 10 Jul 2020 23:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594450346; cv=none; d=google.com; s=arc-20160816; b=IAjNBUtDzisH2SiFp958fkbIndF5nN77MvY+teYITRrtHiMtWsvrSv5FTUCwTuXkKb pe2PeE30P1N7nqcJRO6AtmgyzVUek6wexUrzMgpqIpd28RJHre1ryLuLQMCpV3+YgMCa P2jDEpxeX/giMiHWlqU4A6oFVEhQT7SfUeCoRQPRagFGilv0+uhvRA07zGyeSt/C03kq ki3x7TVCWdP/Lsrq+yIkHxF+NSSm/X25tE/2G+ujzw7sdmBfPDIfu+D4IL0k5M18cwsL cWCBXDgkHjcOfBm/AehgDzvr8K32mdiY/iNrYnqyGUTX/WqbWegYaPZlqXKA0r9FbgJU TkoA== 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=A6+q+22FagzSCao2f0Ta4oPidTfn5MvJ+7lol/cwNio=; b=lAOk0lnturYk+g3QNmpciMNC1Bj7gRfjWiyaedIpyotp3GBFO74l35HfJeDXeSYuJc lIYbP5Nmozosk/7SMJvshOAzoQVG/ZRLMcgicWLKQrocNu8Ib/YxFwc+TfcUedl96bKh Yap8gGu8vHPL/DX7P25wZYRBamLsOtEbzuS2e9o5Uj0gasdxt/BGLnKraqX3sqG5czI2 gY21Y2jJ6uKb2GU92SXq4km9wLTKe+cDHUATil1vHpvomdrcgCXokUgWoYsXL+JXCyI3 w6rGuOEHXeRKfIgnZBhmte6Yue2E++HPbbacsUCdhOTmQcAe+KAzWAEZph3eQWaeHP4Y AB+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=XRlcVbB6; 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 a16si5704663ejy.84.2020.07.10.23.52.03; Fri, 10 Jul 2020 23:52: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=XRlcVbB6; 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 S1728245AbgGKGvF (ORCPT + 99 others); Sat, 11 Jul 2020 02:51:05 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:46712 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728233AbgGKGvD (ORCPT ); Sat, 11 Jul 2020 02:51:03 -0400 X-UUID: 024ce4f14af9483495b76cbe6d81beb7-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=A6+q+22FagzSCao2f0Ta4oPidTfn5MvJ+7lol/cwNio=; b=XRlcVbB6VF7od5Q4sv5IC58e0DqKTqavd56/cRHtpRyAUhtZKhV+PrZt1bnm+mHHi3KKXzuvJyrWgX+Cdxn+s83G+SZO+3YMd5sRB9ur+XMDN6O8IfTX4G0SndBAm8RqA49EiH+f1PY3RStlm6zC/rjOirXeWaBZHLUG9uBunrg=; X-UUID: 024ce4f14af9483495b76cbe6d81beb7-20200711 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 715424698; Sat, 11 Jul 2020 14:50:59 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 11 Jul 2020 14:50:56 +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:50:55 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy CC: Will Deacon , Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Subject: [PATCH 08/21] iommu/io-pgtable-arm-v7s: Add cfg as a param in some macros Date: Sat, 11 Jul 2020 14:48:33 +0800 Message-ID: <20200711064846.16007-9-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-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 QWRkICJjZmciIGFzIGEgcGFyYW1ldGVyIGZvciBzb21lIG1hY3Jvcy4gVGhpcyBpcyBhIHByZXBh cmluZyBwYXRjaCBmb3INCm1lZGlhdGVrIGV4dGVuZCB0aGUgbHZsMSBwZ3RhYmxlLiBObyBmdW5j dGlvbmFsIGNoYW5nZS4NCg0KU2lnbm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