From patchwork Wed Feb 20 14:56:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 10822243 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 3DFD21575 for ; Wed, 20 Feb 2019 14:55:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 265682E84D for ; Wed, 20 Feb 2019 14:55:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2465A2E8BE; Wed, 20 Feb 2019 14:55:27 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 C9A632A92A for ; Wed, 20 Feb 2019 14:55:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726326AbfBTOz0 (ORCPT ); Wed, 20 Feb 2019 09:55:26 -0500 Received: from mail-pg1-f180.google.com ([209.85.215.180]:41144 "EHLO mail-pg1-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726194AbfBTOz0 (ORCPT ); Wed, 20 Feb 2019 09:55:26 -0500 Received: by mail-pg1-f180.google.com with SMTP id m1so11975670pgq.8 for ; Wed, 20 Feb 2019 06:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=71CbCkjnn64ElPdk5SEvwBY/3SSL7BTD9zmSLlhmP1M=; b=Sl+Ako0zNx7JEnPWpeBoIyye3gO7tDUjuF8kvpVcDu34KGFQwGzwh0/ewbZOAVmQoT XRzRuIUafcxXfnOArAcE/8VPnrF3RiZ5ahsrcEbX5tn+JZmDwEXK0JKRv6rUhg4pEZDM 6FN09nT4PQFoI8HVCUC6yBoh/SQgrbRtRujUIlb+rYF1UVhMQk7k7+oOnFYxi7fRZokk izL3At7pozoAuAbdOJvIfwLTy8Gbk0Q6/MKrjzZOHRleuLmGCu0J0zlqC/k8/X9ZLAEX 9d/6TEeiRKjudHA9MzHWombjonNHjMEfkUR/Qy7bwCKAfT5fTqgQaBwFRHfrHyHe/esx pQow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:date:message-id:in-reply-to :references:subject; bh=71CbCkjnn64ElPdk5SEvwBY/3SSL7BTD9zmSLlhmP1M=; b=EkAvjaA0AeYrDShuuZoPfIXtWt6vge9yHTjKRYzQiQAQd3N/LoRxzocGVHP/tNLv0v mlUM+41KdjJCcBs3PZnroECP2JMV5AMsH1tdDnxkVeSlgd7JfKgbXaOpXJH+lgFYrMMG rryiiYcQNxVqvasuq8Sg8wrDo0r0YoSlaycrXhsrdvd+hGJo+w/9Os/lUOhGD7e9tOXm 8KdarkFwqTMcSa4EDrdZ8JeWsBg9dd0oL+vXLcWAqwCEnO09ogHmV01FpsH7PSb732or 9Ffl2xVLoXQNxNuiDLeJsSUYlByT0wwlaHGSriR8rzcvAdocQWzQ+I1INF/i5DP5I2TE KXBg== X-Gm-Message-State: AHQUAuYSTyEG9NdzzzKSgwmYDFYC9xJJwSc4fOhJHD1sEdAdHjY1TjC8 JvJ/AEJxU6MpbGHk+zVcq2fZ4vyq X-Google-Smtp-Source: AHgI3IZDrbSGg6117SqBYr9r+jpPjz+AgSCnq/CZxetTbVE12mtdDdgftxiw9igidwTBKGajRk7MYQ== X-Received: by 2002:a65:5003:: with SMTP id f3mr29783442pgo.39.1550674525331; Wed, 20 Feb 2019 06:55:25 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by smtp.gmail.com with ESMTPSA id i74sm42849526pfi.33.2019.02.20.06.55.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Feb 2019 06:55:24 -0800 (PST) From: Magnus Damm To: linux-renesas-soc@vger.kernel.org Cc: Magnus Damm Date: Wed, 20 Feb 2019 23:56:17 +0900 Message-Id: <155067457726.15971.1787990365004385103.sendpatchset@octo> In-Reply-To: <155067454871.15971.12157033067057246708.sendpatchset@octo> References: <155067454871.15971.12157033067057246708.sendpatchset@octo> Subject: [PATCH/RFC 03/09] iommu/ipmmu-vmsa: Introduce keepipmmu boot parameter 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 From: Magnus Damm Introduce a keepipmmu boot paramenter to let the user override. Not-Yet-Signed-off-by: Magnus Damm --- drivers/iommu/ipmmu-vmsa.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) --- 0004/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2019-02-20 23:17:54.038850305 +0900 @@ -759,6 +759,17 @@ static int ipmmu_init_platform_device(st return 0; } + +static int keep_ipmmu; + +static int __init keepipmmu_setup(char *__unused) +{ + keep_ipmmu = 1; + return 1; +} + +__setup("keepipmmu", keepipmmu_setup); + static const struct soc_device_attribute soc_rcar_gen3[] = { { .soc_id = "r8a774a1", }, { .soc_id = "r8a774c0", }, @@ -802,7 +813,8 @@ static bool ipmmu_slave_whitelist(struct * then assume the IPMMU will not be needed for address expansion. */ if (memblock_end_of_DRAM() <= SZ_4G) - return false; + if (!keep_ipmmu) + return false; /* Check whether this slave device can work with the IPMMU */ for (i = 0; i < ARRAY_SIZE(rcar_gen3_slave_whitelist); i++) {