Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp962122ybx; Wed, 30 Oct 2019 07:52:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/NKCBU0EczzOM5FTrXUEg4FOzOZk2QODXEew+O20p4ePxP7/E8a/xPVdb3bg47Dz1kv6T X-Received: by 2002:a50:9993:: with SMTP id m19mr32628edb.208.1572447156310; Wed, 30 Oct 2019 07:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572447156; cv=none; d=google.com; s=arc-20160816; b=myU6w05/x09S1BGWGr8Q6n9a80qJjW+LYZWg3jrWyxO314jaBIvZzwuKW+CfT+ck1I bByKmaoFKlGPtRInpUldYpDuivrRvY5NCKxUtLLQKaZeBa5O1wl1r8kMx3f2VcGiPkAc VO1zEX6nrWO3IsNudOme9Fn/ZXcQJWPka1G6hG7WpmGqmxQ57KFi1OXUrTExk2roid5k 39vlEX3zpA6UC+iRFqnxWGiDX9s+Tv3DbRkLCxw9CL5HqI8cstSHVj0Xu+p8KPCHUZ2s oC6zGMhEARl/w0Tx0BnBmadA4NWUOU15MHOsvwfLfXifdFufErLsTx3QcDWhdIwHEatx 9nLA== 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=Iz3Vm8Uzj2NSJMS0aa7xj/dDvXli8FZc4VNCH0bxD24=; b=LSYStwdJZ/ShQ/krFdwBvUAD4rgOIoBuhpxTLeoKfV3CIWx5f8aJqGsb5BGN20IjWR OHbfJ/o88zjqb1w5qWO+HOJ54iLFJ/iK55rksXHpbUdXSQ88riDuzhusd2E5JsNM2Hzw 9FpkPENmRq5Ztw3Arnd6YgVI7ihMJDDblVg+su0m3979QQ2oljb1/lLHdxlHgsTwT7ue GPJ4AQSIQdtuS/6qKFJA0OlUUrGlwhJ5hyYKiYRPq+Q+AVxI+9SsiLDg5/+C0ziR7zh+ AaJOgBmsuBiehOT6tn5x3Mv4r9cFUAdikLCUrnl5i6VPbR6d3DaM6yu6DgQE+C+G9zI0 7L2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XIjO0eEV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si1347986ejb.67.2019.10.30.07.52.12; Wed, 30 Oct 2019 07:52:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XIjO0eEV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726744AbfJ3Ov1 (ORCPT + 99 others); Wed, 30 Oct 2019 10:51:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:57696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbfJ3Ov0 (ORCPT ); Wed, 30 Oct 2019 10:51:26 -0400 Received: from localhost.localdomain (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 783E320856; Wed, 30 Oct 2019 14:51:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572447085; bh=brW6fp/UFvGvOgU4UgFazFj3pgvjI/gIURAsSARgRYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XIjO0eEVu91Yt6zUTaoq86dVh4rXOhNOfTRdyapva17xNxBeD1C8H/vL3nxe2VIDQ af0e3xO8kIv9h6Hi5GsS9E9t6PDZMiuAUZEKfYHCXo+ScanHBfARinzpfWyZq5iNSJ mTpfaW3or5H5IYKOiF6DySxwfdLY4H6u0JDLz9Wg= From: Will Deacon To: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: Will Deacon , Robin Murphy , Joerg Roedel , Bjorn Helgaas , Lorenzo Pieralisi Subject: [PATCH 4/7] Revert "iommu/arm-smmu: Make arm-smmu-v3 explicitly non-modular" Date: Wed, 30 Oct 2019 14:51:09 +0000 Message-Id: <20191030145112.19738-5-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191030145112.19738-1-will@kernel.org> References: <20191030145112.19738-1-will@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit c07b6426df922d21a13a959cf785d46e9c531941. Let's get the SMMUv3 driver building as a module, which means putting back some dead code that we used to carry. Signed-off-by: Will Deacon --- drivers/iommu/arm-smmu-v3.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 8da93e730d6f..2ad8e2ca0583 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -21,8 +21,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -384,10 +383,6 @@ #define MSI_IOVA_BASE 0x8000000 #define MSI_IOVA_LENGTH 0x100000 -/* - * not really modular, but the easiest way to keep compat with existing - * bootargs behaviour is to continue using module_param_named here. - */ static bool disable_bypass = 1; module_param_named(disable_bypass, disable_bypass, bool, S_IRUGO); MODULE_PARM_DESC(disable_bypass, @@ -3683,25 +3678,37 @@ static int arm_smmu_device_probe(struct platform_device *pdev) return 0; } -static void arm_smmu_device_shutdown(struct platform_device *pdev) +static int arm_smmu_device_remove(struct platform_device *pdev) { struct arm_smmu_device *smmu = platform_get_drvdata(pdev); arm_smmu_device_disable(smmu); + + return 0; +} + +static void arm_smmu_device_shutdown(struct platform_device *pdev) +{ + arm_smmu_device_remove(pdev); } static const struct of_device_id arm_smmu_of_match[] = { { .compatible = "arm,smmu-v3", }, { }, }; +MODULE_DEVICE_TABLE(of, arm_smmu_of_match); static struct platform_driver arm_smmu_driver = { .driver = { .name = "arm-smmu-v3", .of_match_table = of_match_ptr(arm_smmu_of_match), - .suppress_bind_attrs = true, }, .probe = arm_smmu_device_probe, + .remove = arm_smmu_device_remove, .shutdown = arm_smmu_device_shutdown, }; -builtin_platform_driver(arm_smmu_driver); +module_platform_driver(arm_smmu_driver); + +MODULE_DESCRIPTION("IOMMU API for ARM architected SMMUv3 implementations"); +MODULE_AUTHOR("Will Deacon "); +MODULE_LICENSE("GPL v2"); -- 2.24.0.rc0.303.g954a862665-goog