Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1556704imw; Tue, 5 Jul 2022 11:29:16 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vVEOAybdIFv8OJNweoztRiGucff1EglETeMdVOw8GujW3o4fUra9eSOZHgJsMTCOTq3VVD X-Received: by 2002:a05:6402:4252:b0:437:6618:1738 with SMTP id g18-20020a056402425200b0043766181738mr48100915edb.259.1657045755838; Tue, 05 Jul 2022 11:29:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657045755; cv=none; d=google.com; s=arc-20160816; b=09rvlj8LEU76i5JzqWrhHa/318rcpBZ4lnZrtbriRw5kes/Qu5XC1+pJvvw/UEk8lo OiR/C66FjBnfOYZewkgxoyZwVn+M3HekGQB5x6ZAuCd/JWmNh9OHwYi9lUhu4bePgYs0 8SStBZfIAo8lNc0lk5BMAXnMqFx2ICdIa1fVoihrjkHCVk9gH7MG/LHPbuXe9BYuNT/R 7uhxveL0FhGulICThgTtpzFDKNe0LwVoGVV3egG3v9GO+KLjqmk0tbNMX+rtUCdFWNQ/ jut78nu/h/cgEX0M6mG2pHW8C89Xb39hJDFTSjqtOlA0p/Ie3B+z1g786aEzfOhwN4FX jH+w== 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; bh=OxNBaRgAHXhOyq/m9VyowybJVLmSVlxBJry8sQD+udw=; b=ap+DslPed9bffrjaXWdDP/UtePZ8LWF/w5gegElJ52StRs/kG3dfacbNEQioFKkiH+ i55xYJ9NK32jpeNLlz7KFDtnQzVzkCh877jRyjgIv6EiHs+bqCPd57Sded1OyS3KvMPz HFo4yulCP8TrlyR5N3l92LeCFoSshpUsu/KJeM1AUtf8yRMJ7ns8hXnFTJ0nfWeDasMK L8rHzHo7+AOkHj9u+uklKY1QWNbP/IAo1t+f160Ldyuc7QiLE9NfVq9eReK8ZwpwBZGZ dtgKq5hMTnP1EIRYMduCzXhMz+fZG5jdkw5MAW0Glw9+IG9Ih4Tucg3GJjCWzXClcNHM Ok4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd27-20020a1709076e1b00b00722fb4c5683si546229ejc.848.2022.07.05.11.28.51; Tue, 05 Jul 2022 11:29:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233289AbiGERJ3 (ORCPT + 99 others); Tue, 5 Jul 2022 13:09:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233318AbiGERJN (ORCPT ); Tue, 5 Jul 2022 13:09:13 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7AED61F2E7; Tue, 5 Jul 2022 10:09:01 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 717221595; Tue, 5 Jul 2022 10:09:01 -0700 (PDT) Received: from e121345-lin.cambridge.arm.com (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 90A0B3F66F; Tue, 5 Jul 2022 10:08:59 -0700 (PDT) From: Robin Murphy To: joro@8bytes.org Cc: will@kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, baolu.lu@linux.intel.com, suravee.suthikulpanit@amd.com, vasant.hegde@amd.com, mjrosato@linux.ibm.com, gerald.schaefer@linux.ibm.com, schnelle@linux.ibm.com, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 10/15] iommu/ipmmu-vmsa: Clean up bus_set_iommu() Date: Tue, 5 Jul 2022 18:08:33 +0100 Message-Id: <52d6d0ce3b2d51a67bd9d9fa6f41fd87ab28f417.1657034828.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.36.1.dirty In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Stop calling bus_set_iommu() since it's now unnecessary. This also leaves the custom initcall effectively doing nothing but register the driver, which no longer needs to happen early either, so convert it to builtin_platform_driver(). Signed-off-by: Robin Murphy --- v3: No change drivers/iommu/ipmmu-vmsa.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index 8fdb84b3642b..2549d32f0ddd 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -1090,11 +1090,6 @@ static int ipmmu_probe(struct platform_device *pdev) ret = iommu_device_register(&mmu->iommu, &ipmmu_ops, &pdev->dev); if (ret) return ret; - -#if defined(CONFIG_IOMMU_DMA) - if (!iommu_present(&platform_bus_type)) - bus_set_iommu(&platform_bus_type, &ipmmu_ops); -#endif } /* @@ -1168,32 +1163,4 @@ static struct platform_driver ipmmu_driver = { .probe = ipmmu_probe, .remove = ipmmu_remove, }; - -static int __init ipmmu_init(void) -{ - struct device_node *np; - static bool setup_done; - int ret; - - if (setup_done) - return 0; - - np = of_find_matching_node(NULL, ipmmu_of_ids); - if (!np) - return 0; - - of_node_put(np); - - ret = platform_driver_register(&ipmmu_driver); - if (ret < 0) - return ret; - -#if defined(CONFIG_ARM) && !defined(CONFIG_IOMMU_DMA) - if (!iommu_present(&platform_bus_type)) - bus_set_iommu(&platform_bus_type, &ipmmu_ops); -#endif - - setup_done = true; - return 0; -} -subsys_initcall(ipmmu_init); +builtin_platform_driver(ipmmu_driver); -- 2.36.1.dirty