Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp586457iog; Mon, 13 Jun 2022 08:38:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1unQdVY6+r17j+3/6AnGdehfPTUBNl+QAMktDYKVyyhMhhlEATRX24ufE8RfhC1QBf+Jm0G X-Received: by 2002:a17:90b:23d8:b0:1e2:e3cb:ac08 with SMTP id md24-20020a17090b23d800b001e2e3cbac08mr400512pjb.35.1655134691198; Mon, 13 Jun 2022 08:38:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655134691; cv=none; d=google.com; s=arc-20160816; b=VBxU4MO7DHh9nlNkEPV5CNw9xqhQYiKmd/5DT4XZdjX79AvPOR66/k7XCyhgYnRs5q PI+3+SD5lAU/1eQgqzkW45eHCVdCtV4il1xuzH5CA0T7MmKOz9MzL0jsw2M0B4ZEa5W/ hi+Z3W4GEQBYf/9bTb0qeB2A/+t4FVGlElJXJwkPEoIYy46YYVVSF7Ak+DM54NL7wWJT 3nD1WW4zpfQiaOXmge8E0q710PXKqgpqncsMaBpp9zcMRlWBLQ/uhkLuJG711ZxYLIYN n3oGoRUlhg0QKsLrasfepfr+jKlAYFvPxrij0H3lOCPXwIZeyvmHfFYZlPj0TcCgSyOu rTIw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rcXlfLDXgC1eZr+A7xgPGWXKSBcJel9ZfCRfE/o0h4M=; b=zOz8VsoZ0cXxDJfPEfGWSjEwoMGr25T5qZWSCS4GOlQqPCLWaChRutc0tabhIMXwb+ 4YHvI2iSkv+Rg8Wih+faw3HoA/Cao9aLPBdo0ndY1d1UQdS7YCzh5FNt9ZPEXDXdn3pD y4Iio1RxYMWGu9o4wQFtPsX+dW5mCE0c8Zi6/XtUtAxdxJewgjIg6l+IbDZQb691mnkJ 0H0ZbFwZiWpUyuQwVJaTFKjBCzKStJdwnbVjSerQBtaGLJSiH+BHhIWptYJMHuWMFhTE Ype4OtIIfcza+mRTn5Qj0/nsY5EdJHhIZR41IC6U0aeAunBMOTqRLO3lK1347umdiSHY Lkng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XM67yK8A; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p24-20020a1709028a9800b0016356bd88e5si10070213plo.419.2022.06.13.08.37.56; Mon, 13 Jun 2022 08:38:11 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XM67yK8A; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347122AbiFMKvk (ORCPT + 99 others); Mon, 13 Jun 2022 06:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345814AbiFMKsb (ORCPT ); Mon, 13 Jun 2022 06:48:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB6642C66B; Mon, 13 Jun 2022 03:26:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 27C96B80EA4; Mon, 13 Jun 2022 10:26:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86030C34114; Mon, 13 Jun 2022 10:26:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115967; bh=T0S4q852qc6i0xR7i/pEPgwa5LSAmd1UPlbrDduglXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XM67yK8AXc7zCqI7oWWva4JstJ1h8apNQNFgOa2/pLaIcNVHI2arsOxCXFXRmM1WP VlSAWW+7wj1sAfDy/DyVAntEDaPB7Ca4VqzDJpAxmuQkQoa1QDitJ/idDZF8EceueP Uw9A0wb47wf9k4CBzghpwuKzzFubesTltytRTzEg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yong Wu , AngeloGioacchino Del Regno , Matthias Brugger , Joerg Roedel , Sasha Levin Subject: [PATCH 4.14 097/218] iommu/mediatek: Add list_del in mtk_iommu_remove Date: Mon, 13 Jun 2022 12:09:15 +0200 Message-Id: <20220613094923.491109215@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,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 From: Yong Wu [ Upstream commit ee55f75e4bcade81d253163641b63bef3e76cac4 ] Lack the list_del in the mtk_iommu_remove, and remove bus_set_iommu(*, NULL) since there may be several iommu HWs. we can not bus_set_iommu null when one iommu driver unbind. This could be a fix for mt2712 which support 2 M4U HW and list them. Fixes: 7c3a2ec02806 ("iommu/mediatek: Merge 2 M4U HWs into one iommu domain") Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220503071427.2285-6-yong.wu@mediatek.com Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/mtk_iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 0f99e95a1a73..7ac868c71577 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -696,8 +696,7 @@ static int mtk_iommu_remove(struct platform_device *pdev) iommu_device_sysfs_remove(&data->iommu); iommu_device_unregister(&data->iommu); - if (iommu_present(&platform_bus_type)) - bus_set_iommu(&platform_bus_type, NULL); + list_del(&data->list); clk_disable_unprepare(data->bclk); devm_free_irq(&pdev->dev, data->irq, data); -- 2.35.1