Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1883401pxk; Sat, 5 Sep 2020 01:14:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxk54b6R4xcJiSpbVoD6pwkLyIRXOxOpClS0HwA1ldETff1jotF5T4rjaN1gm+sF0t8zsR4 X-Received: by 2002:a50:d9c1:: with SMTP id x1mr12861355edj.283.1599293679354; Sat, 05 Sep 2020 01:14:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599293679; cv=none; d=google.com; s=arc-20160816; b=0p9CWwv8xcRR3Fek23E6W6sBb4mJh3gHkvDFFxfUxnnZey8RtLgaX3NPjX/jJRdAJY VgqOKtQiGruoXs9m33Sv8xJ+LGgynyKoDC7j/OeRypjgUw5OQpm5La5fCfy6Xk4sncSk 4CIDX4QRXUJZwyXqIJdApc4IHWvldvgpjWyZHhLnDKNW/LRqeyqzjKaafS7hbKbLwMpS rWL041iU55ZuJ4I/7/YArooMoqjNK6T5O4O9RIKkJRFfrwOvSLZYRRJL0FQWbGBHJqWV wo7cCJvkPdT00Mli90MbAPEHtlPA4+ppnE9RxSxstqO8Dz5ONBP8d1bvtKJfEFPDHmmV 1T4Q== 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=gYNELGnpS6IhFJpjNhZ/I71ScZxIoDmwzmZcryuz/KE=; b=nwIoPAz49iBOuoAY+N8NsnO7p+kccDcR+SVMkdKdjdcHqdX0J7pGmydsfh1HUL87Mg I9vU9melndWgjKIhP6lx0XzET3dHmg6vzGx4oP5yb0yEZdBTgjhZKb1nCctHN14KPZ2b ES4Rua7bk648PBMi33tS7jV2jGTUqZVRC4l02VxSPsrjuqF8S8zUl0hdAKUe0TPnE8Q6 dN3SrxrukMc9+MEOugywNsVTGSvMB2pLrli8vnksMgk97VETWy8XhCuO84hjWss1n9Xd GyxxS36koz3ITew+iKE3VP8VZ6d3B27i+IcIyWMmQEgKG0TSfXrE1vY0jqeyoRDg7X1b d6Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=St2CPV7n; 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 b27si901234ejc.658.2020.09.05.01.14.16; Sat, 05 Sep 2020 01:14:39 -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=St2CPV7n; 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 S1728459AbgIEIM6 (ORCPT + 99 others); Sat, 5 Sep 2020 04:12:58 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:27671 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728421AbgIEIMy (ORCPT ); Sat, 5 Sep 2020 04:12:54 -0400 X-UUID: f17c9c6d611548949e56bfd73dc0f5b9-20200905 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=St2CPV7nbtCvuVQH2P5DtHOjJDvCQjDZjVx0AHJoJY1qxInB8LUdYSrBf8NAWU0qZizBwx96DK2/OOB9z6WDau19Exj8hLWlJPwsblpNbWETw7sN0L55EA6ONceBMtRZx+3ljdiPKLgqTQyoOma7UcL7kHR8d4RkOOaE6AG6zGw=; X-UUID: f17c9c6d611548949e56bfd73dc0f5b9-20200905 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] 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 16671798; Sat, 05 Sep 2020 16:12:49 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 5 Sep 2020 16:12:46 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Sat, 5 Sep 2020 16:12:46 +0800 From: Yong Wu To: Joerg Roedel , Matthias Brugger , Rob Herring , Robin Murphy CC: Will Deacon , Evan Green , Tomasz Figa , , , , , , , , , Nicolas Boichat , , , Subject: [PATCH v2 10/23] iommu/io-pgtable-arm-v7s: Add cfg as a param in some macros Date: Sat, 5 Sep 2020 16:09:07 +0800 Message-ID: <20200905080920.13396-11-yong.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200905080920.13396-1-yong.wu@mediatek.com> References: <20200905080920.13396-1-yong.wu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 51F6A46B05255F749CDEA4309B5A10177F18D66266059B1587C288D83214EC0B2000: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 QWRkICJjZmciIGFzIGEgcGFyYW1ldGVyIGZvciBzb21lIG1hY3Jvcy4gVGhpcyBpcyBhIHByZXBh cm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