From patchwork Wed Nov 28 09:23:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 10702117 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7528515A8 for ; Wed, 28 Nov 2018 09:23:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6335B2C352 for ; Wed, 28 Nov 2018 09:23:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 53EB72C826; Wed, 28 Nov 2018 09:23:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1B4F2C352 for ; Wed, 28 Nov 2018 09:23:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727616AbeK1UYg (ORCPT ); Wed, 28 Nov 2018 15:24:36 -0500 Received: from mail-eopbgr1400110.outbound.protection.outlook.com ([40.107.140.110]:5184 "EHLO JPN01-TY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727382AbeK1UYg (ORCPT ); Wed, 28 Nov 2018 15:24:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tpSgGYlW5xHX0Xy5ZFHnricChcVk+lRGqwI+IgqEHsA=; b=hyPj8qXlNIVwR6XXvSyLzLUNJDwAsIj05CPK77xJcc8MLEfYW79ZTpeaOXFkg8KjeFAqSA69PEcMI6n3MJHrEf+dFyOBCjmFHFBy5aWGADCxG39y/Ly0RCQz1TaVo4H3+Met6vl5FNv7PZfzUHHDAa5tnf8SzAsIxWlRIvhtiEo= Received: from OSBPR01MB2293.jpnprd01.prod.outlook.com (52.134.243.14) by OSBPR01MB3589.jpnprd01.prod.outlook.com (20.178.96.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.16; Wed, 28 Nov 2018 09:23:36 +0000 Received: from OSBPR01MB2293.jpnprd01.prod.outlook.com ([fe80::c070:7362:375f:74c5]) by OSBPR01MB2293.jpnprd01.prod.outlook.com ([fe80::c070:7362:375f:74c5%4]) with mapi id 15.20.1339.032; Wed, 28 Nov 2018 09:23:36 +0000 From: Yoshihiro Shimoda To: "joro@8bytes.org" CC: "magnus.damm@gmail.com" , "geert+renesas@glider.be" , "horms+renesas@verge.net.au" , "iommu@lists.linux-foundation.org" , "linux-renesas-soc@vger.kernel.org" , Yoshihiro Shimoda Subject: [PATCH 0/2] iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() Thread-Topic: [PATCH 0/2] iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() Thread-Index: AQHUhvwJLpT9BQJ2gUuDKa4zURjCwA== Date: Wed, 28 Nov 2018 09:23:35 +0000 Message-ID: <1543396868-14723-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> Accept-Language: ja-JP, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 1.9.1 x-clientproxiedby: TY2PR02CA0030.apcprd02.prod.outlook.com (2603:1096:404:a6::18) To OSBPR01MB2293.jpnprd01.prod.outlook.com (2603:1096:603:26::14) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yoshihiro.shimoda.uh@renesas.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [211.11.155.144] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;OSBPR01MB3589;20:k2ecw9yjxma5SNtM/TLaWQ+rMW9OgfTnnG8lkowqnzc1oEaQC56DvfyWRRFJGFb4EReHvX9zEqgq8D8DNZ2/JalwH+0PjE0AsWFW5jPQHOq7kRbXKCJptRm9zjK5oXNc0uAjzpsNNqlADjKjIzoIsbS1LHrtugd6KOExgh2Uu2E= x-ms-office365-filtering-correlation-id: d0448270-2ce9-4499-8bee-08d655132c0f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:OSBPR01MB3589; x-ms-traffictypediagnostic: OSBPR01MB3589: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231443)(999002)(944501410)(52105112)(93006095)(93001095)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:OSBPR01MB3589;BCL:0;PCL:0;RULEID:;SRVR:OSBPR01MB3589; x-forefront-prvs: 0870212862 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(136003)(39860400002)(396003)(366004)(189003)(199004)(39060400002)(4326008)(3846002)(6116002)(5640700003)(53936002)(6306002)(107886003)(71190400001)(71200400001)(6512007)(186003)(14454004)(26005)(25786009)(102836004)(6506007)(6486002)(386003)(52116002)(97736004)(86362001)(6436002)(478600001)(966005)(575784001)(50226002)(8936002)(2351001)(106356001)(8676002)(305945005)(66066001)(316002)(7736002)(2501003)(54906003)(5660300001)(81166006)(81156014)(2906002)(36756003)(68736007)(476003)(2616005)(256004)(486006)(1730700003)(99286004)(105586002)(6916009);DIR:OUT;SFP:1102;SCL:1;SRVR:OSBPR01MB3589;H:OSBPR01MB2293.jpnprd01.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: bITLb2g8fMBCFsSzAa1FMyneHtC/Q0t1eSUSxnXz5Vc7pzn8PVzT4Y39Tmmkfj0p1Jcpfa3aASFKcdJGdDlx8DHQdsH1ztHf+7Z4/DaRC5hx1vR2PC6e5Gatik1jKDlTpXKEEjchSLKjOkvanLcVuFYTBzJ22C0pAM7ywu7WVouMLeErZOSbVrYcYgaGI25Y/xNXM8Yc4Xyk+SOMyIMb5M7W6ADvmDzAUv5WpkW7DlwngqMLJnVWE0lLf7ooUXr+7tVcVnSedIr5czi1J9YlHhszqKbNW894HHJP7WdhTtPKGBN7CeLNHMNqT5/R335VQKXYbfx8RlEKN2GterwQ4Q45tpzjNlg3xe/aqEvvXsU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0448270-2ce9-4499-8bee-08d655132c0f X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2018 09:23:35.7866 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB3589 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch set is based on iommu.git / latest next branch (commit id = f262283c224537962cba0f41b8823e3be9f7b0ff) I talked with Geert-san about this topic on below: https://patchwork.kernel.org/patch/10651375/ Also Simon-san suggests we should keep the whitelist. So, not to change behavior of R-Car Gen2, this patch set adds two conditions. After applied this patch set, we can add slave devices easily like below: Changes from v1: - Use "ES3.*" instead of "ES3.0" for r8a7795 in patch 1. - Use "unsigned int" instead of "int" in patch 2. - Add Geert-san's Reviewed-by. Yoshihiro Shimoda (2): iommu/ipmmu-vmsa: Modify ipmmu_slave_whitelist() to check SoC revisions iommu/ipmmu-vmsa: add an array of slave devices whitelist drivers/iommu/ipmmu-vmsa.c | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -774,6 +774,8 @@ static int ipmmu_init_platform_device(struct device *dev, }; static const char * const rcar_gen3_slave_whitelist[] = { + "e6700000.dma-controller", + "e7300000.dma-controller" }; static bool ipmmu_slave_whitelist(struct device *dev)