Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2287086iof; Wed, 8 Jun 2022 01:28:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGIdP3Noeg7wGKr6dsj2pHPj7X/NWl7RXJ7NA659EtJV/8ReUqxvD3jYQnft1EGslW//dE X-Received: by 2002:a63:8b4b:0:b0:3fc:ea73:db40 with SMTP id j72-20020a638b4b000000b003fcea73db40mr26584067pge.399.1654676925512; Wed, 08 Jun 2022 01:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654676925; cv=none; d=google.com; s=arc-20160816; b=Mrr0/aaHo4TmD3O6rx+ln3W5VFg1Up9+MBWyY/VjcsxQtdoFPX+0FxWzm+FUFSxL6T UoCnaqqTp+RkF1zbCFjz2hFiN9FOangLXlobteAfzf0nRz4nwdMecTXqBZ4zZImK6WHc rTmGxSbPV44X91bV+DBQZUJxIbpYLA5GTWzJzYOwk4Q6MAoh6Gb5qbp5D3fvnC9tAvQx Y+YAISuNbzTxXQF1/7VTV3cUFlUkFw5K0F1ORaYjOdAqLJbR1HZDE5rBzMueq9yanR2H vgLOww7VdlH2MrCj6PSpfvnv/+cNS7+6vrRvIcdC4rwH/B4tZy3RKd9WS3bk2Mde5REE fRKQ== 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=eBuybAAWufuEnPUwqnHeUYhIFebIJv7mn2w3wMrIy9A=; b=vDHgMKUIWmCwVtPiizR1DZsPf21Korb2EgJ5vFff9EILiysSg/YM3HLX9CkVdCzGOZ JvaVhqmLULduhMniWvLE273pfJFxqCRvCgjA+wwNEnP63Qvcrqad+M3geaq1zpYbKg7d HR/qP1e9/y98TfjHbt2VKf7Y2gngFW97emHzdZ6QQc73yybwdWR+hGGWsA/P/acVKOv+ 3/PRW1RwBTbCBXwYA0QsYcoCdd+923J+1Q0WpfTKdH62/hgHCteuN+ch2nV3z9s4zM66 gimbo9XApDgy0g3Fy4yNMTq+wXmkfxuWWneC0yvYCfPHU03pxLxKHmxziCSN1Hvci9o0 GU6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xmaytr4B; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i3-20020a170902cf0300b00158f13b4872si1711055plg.7.2022.06.08.01.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:28:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xmaytr4B; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C693C14FCB4; Wed, 8 Jun 2022 00:57:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347992AbiFGR7r (ORCPT + 99 others); Tue, 7 Jun 2022 13:59:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348042AbiFGRkb (ORCPT ); Tue, 7 Jun 2022 13:40:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CDB25DA4E; Tue, 7 Jun 2022 10:33:46 -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 8B3A0B80B66; Tue, 7 Jun 2022 17:32:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEAADC385A5; Tue, 7 Jun 2022 17:32:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654623172; bh=gre4uAHrsKDi39ok3MaazrrARM/PvoktjsklLRrW6s8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xmaytr4BBrPiDGDlW0ak3XNBNgZQFj8M5tGGtf9264O7RDsDUFo1oh2lnZNRRB8ww FgqQeVxRj0KBECuq4Pv0OOEzqBKbiUAtoGABcsmRPAns3S5B4fTTgdQF3igyhZ7/sg VyQxMA2XlmI1kHFh74KGHnFTwXCOpNwX1EzfHsJw= 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 5.10 320/452] iommu/mediatek: Add list_del in mtk_iommu_remove Date: Tue, 7 Jun 2022 19:02:57 +0200 Message-Id: <20220607164918.092690377@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 19387d2bc4b4..051815c9d2bb 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -768,8 +768,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