Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4352720pxk; Wed, 30 Sep 2020 00:11:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV3owg+bLW4iz1yo9FGxq//VYZRA0xjUEevGirLIAn5dDZ963UYlcuuXEemInrq2eKC1w1 X-Received: by 2002:a17:906:1945:: with SMTP id b5mr1499613eje.102.1601449866321; Wed, 30 Sep 2020 00:11:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601449866; cv=none; d=google.com; s=arc-20160816; b=PsdiWQ/TuawTgKJgC2LPIXT6cvbq6+Fr5xJAcGOEuv4Pt5r7zLFEmtM0oUd/CsJQOJ Sj9g2GWVhfkSWa5B3O914IxnYuwGfxw9cBz/UJXqwpuvXV2XKlP4QckQN24u2Kx9sVxs UIeKyCcediDiukfUSYUMdUoj6XYVG7Xs9925Nga2EsuiOpb2c1iFaozTF2pzGGxq34XD rMLWR6kOf49sdykkUvOgj26F4zfNWvnCm4OydmWPttdlj82CZrBFSQPw4G4WWiqmIfvd uqqdXwHeO5z7UuuRH5YM/6UGsgoqzOijuiuP8JnMCStINmqpuwhUz9qggg8NBOokIJRp qpnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gYNELGnpS6IhFJpjNhZ/I71ScZxIoDmwzmZcryuz/KE=; b=woPiGkE9NxTsitZD0jxnKDBp29+AnIf+9OFFgb50M9aJ96qOrnia5tialvQUP1kSe+ Y2/vuKT6EooeVOrkB5m3y2vOuYWlwhnmwu30j1fVIg1WLq+TrmRdtq1XjjN0xTNhwqRb khSUrPkR6I5dFUbeaq0kQU/i6XynR1Z17/RcF1m0Z3/O02/RKwV8VtYi7umC2DLDo5f3 c/GYYIAhKMoyyCzyFI/nr3kQprz2qQp9aBA0tk9dK/v5O4Y6FUZa6ZeV6KVArOG5ZrGv nuPUqr4WEs+m2J5aKrczdlWD+4qXpwYtfrtB+JBfg+sEiWeHnVxp0MbDeIcNaBDsnIl9 9BBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=ZuFq2wdr; 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 c14si455957edj.174.2020.09.30.00.10.43; Wed, 30 Sep 2020 00:11:06 -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=ZuFq2wdr; 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 S1728618AbgI3HJL (ORCPT + 99 others); Wed, 30 Sep 2020 03:09:11 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:40670 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725440AbgI3HJL (ORCPT ); Wed, 30 Sep 2020 03:09:11 -0400 X-UUID: d77eb30b66694ddbbace35c78c52c4db-20200930 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=gYNELGnpS6IhFJpjNhZ/I71ScZxIoDmwzmZcryuz/KE=; b=ZuFq2wdrWp1fRzfdp8/D0wFvyEurZKDHAeAQTHCWIogRU89Z5MjH/Z26nG+HfQXe5Mz6FF/qZWudSyD9Gxq59cjF47Vo9HRrYNvfPJWdzoMCd/G20NIwnzauM7fNbv0dMeUY2snaAirLQh9HTFRz0yR3ufoNO3XSCfztmjdD4Ss=; X-UUID: d77eb30b66694ddbbace35c78c52c4db-20200930 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.14 Build 0819 with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1996715374; Wed, 30 Sep 2020 15:09:05 +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; Wed, 30 Sep 2020 15:09:03 +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; Wed, 30 Sep 2020 15:09:04 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy , Krzysztof Kozlowski , Will Deacon CC: Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , , Greg Kroah-Hartman , Subject: [PATCH v3 10/24] iommu/io-pgtable-arm-v7s: Add cfg as a param in some macros Date: Wed, 30 Sep 2020 15:06:33 +0800 Message-ID: <20200930070647.10188-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200930070647.10188-1-yong.wu@mediatek.com> References: <20200930070647.10188-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: FFDBEC49ECEFA09E78A45829BB412B2B312E593CE04F1DBF7E08737226EA43C32000:8 X-MTK: N Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QWRkICJjZmciIGFzIGEgcGFyYW1ldGVyIGZvciBzb21lIG1hY3Jvcy4gVGhpcyBp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