Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2200465iof; Tue, 7 Jun 2022 23:01:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHXQiuwDMnO2cxJGRaMiG46QJblKleOnEKC2h8fauhY8+c9004BxrPHbevo279KvsBzUR1 X-Received: by 2002:a62:f90b:0:b0:51b:5836:ee91 with SMTP id o11-20020a62f90b000000b0051b5836ee91mr32846868pfh.51.1654668116278; Tue, 07 Jun 2022 23:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654668116; cv=none; d=google.com; s=arc-20160816; b=VTlK+PDJXBjLnQqFD5r9wVGZ1GbDCgn8ZqAWUEc74RIC9ODm2eAZeHMxfSFNxA7O2k gCBhyR7KMjhjYvlzdz+0uzThgbiz+yjUHacxD+1qan8es3oda+rTXJgumFfI9uyXnwGe OEOa1iTdG9K/xM9CcTnSqp3ynL5i6EX+Y1BSzRYyjmR+pdmzlimV+ny0fHKtQ0gV6xKC YWPBkLuuC6UjujmoYut0wGeQ4MVMhpefTysbDBt7h/C9HMdrwyckS3zzuokn7qUO3F2m 6STlby7+jwoppf5AGf1mYrgr/35GRjUlMbODy3oxTBtyHBIhZmT2SonE23loWvhfgiwJ xRfQ== 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=qBDHc/SgrAyvRRvvszlbGQlceBolF4/b/KWbiCkIo48=; b=hlHUdOCTvPgs2sHoFCkekzXXAJK4H37IUaEqVHdKR0MgqWEy/pHRZ6/txa/ASCz1GW UMhPIQ46+vR5zqNHg9ej9EWhTN01vP2mPGHS4a5kE5kIWLXtgoxvjaQ0WraXJitMNCYz meAsfG0giPAFEAe99V0OZU+65GHAQkIBvu2QUJL1b+xD1rVZxmaVOnU5QrTUgYQ7puHd hxFKfU9taIGqcfggkU62H5kiPd9yhnx0BTbtPr21enYFpLh23HQtTlCLlAm16E/VpMzg MnDr7zrIK2VOWQJYTJDyDyjz9tY13pSnPjUGkbsqTgY9jmE83gH/xqjVrRttBdy9hcFj JmJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="iqZsAR3/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x40-20020a056a0018a800b0050dcf85b9e1si18863410pfh.141.2022.06.07.23.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:01:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="iqZsAR3/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E3203139031; Tue, 7 Jun 2022 22:26:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379509AbiFHBOd (ORCPT + 99 others); Tue, 7 Jun 2022 21:14:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383461AbiFGWF0 (ORCPT ); Tue, 7 Jun 2022 18:05:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA180195927; Tue, 7 Jun 2022 12:16:08 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 47DC661922; Tue, 7 Jun 2022 19:16:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7023C385A2; Tue, 7 Jun 2022 19:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629367; bh=mphYbO6srjaRUuII25UtY+REzhdTdTHmRYtjyLnsmX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iqZsAR3/wcVBKNjbqtkU4tGRoHg3P2EY1ZUWUm/aHh67UXD5NOSaGYD4xYA5rCueu MO+KzQiA0PATRXAw2eMacDzdfJn5vxtmLQ+raPKOQeoOGPBMV7u9dBEnvfpqcaG1Dh zgzQvZ28ZmtEYbQ9CwwC2HUtUACu8JK3cYECq1qU= 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.18 665/879] iommu/mediatek: Add list_del in mtk_iommu_remove Date: Tue, 7 Jun 2022 19:03:03 +0200 Message-Id: <20220607165022.148272854@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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 95c82b8bcc35..e4b4ebbcb73f 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -955,8 +955,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); device_link_remove(data->smicomm_dev, &pdev->dev); -- 2.35.1