Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2269631iof; Wed, 8 Jun 2022 01:00:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnYQI7yS2iR/KBJFWXTkfyX0RX9yCLg1bHcTibqGtvXN7K+O/jorCegoRVeXx4BhS6CCAn X-Received: by 2002:a17:903:2485:b0:161:da96:1701 with SMTP id p5-20020a170903248500b00161da961701mr33290387plw.58.1654675250366; Wed, 08 Jun 2022 01:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654675250; cv=none; d=google.com; s=arc-20160816; b=fDRc7dnyleoEcHmdT1S4aAet4y5Dlr0yvrRSXs1LG6TpRBBauF4mLLURDMHfvGUmEv phE2nAib0ptZfCDn9fF25iew/wQt1DkaKRmaGEnOlztVgirnHHKbw4/WTQr7UNl92/Bx ktXi7y2q/spGs6fkFFTiF9D9/OHRCy67qBZkKtdO1GpsWqpCixOcrknt8IEHbzJdk/3d +n0TyKrfo9pOWL9mE4E2469F1EGIdIz6TH2NfAwoDntGCmvABN3HMR+NoPZyVIuoiv4k Dun3m0QJW3hKwpYk+HKpnY/TAdK6iGNz2pl1XWTiUz5Dtjeuk/2TjIv2N+s+xjE0JKok tfEQ== 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=TJkUaJ2uyoBvYO1rFUVH7oUemMw38HOg4ayaLLyLW7U=; b=Z+B/ij9iz27jDLiS3QqxBFP6pXPBEOen3rzOJJRdFyfJpkQhfLh4yqod1yxlFF5bb/ Aoabu9Bdiha0D2fYrjpl1cLp8zHjqjtZCtx1ri4k8eyC6o1MzHyipsuZEB5UGKFAFsYb W3ncArLviE58EglxAk9/c0LAFHSAsMgu+Po2mdVBja8/ZQV5Uy6YZkyzLfB0KRUK+Szg us2kkZn1Ai5+Mj5NyXO75o9n7JEWw3EMb+1WzS8ZVnWupw3dWc+IzFCVGqz/uF3BVHlA UDE9zKyZhFw4xAtK4oMKOydefBtWepiMjEkhl1xeAeNgoTcmv7oJiG1wqZeI3hq2bZW8 JxVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bT8TX9JO; 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 b2-20020a63d802000000b003c631686abbsi1310481pgh.536.2022.06.08.01.00.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:00:50 -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=bT8TX9JO; 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7C76E1EA05C; Wed, 8 Jun 2022 00:30:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391548AbiFHAv1 (ORCPT + 99 others); Tue, 7 Jun 2022 20:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383625AbiFGWGD (ORCPT ); Tue, 7 Jun 2022 18:06:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C258195937; Tue, 7 Jun 2022 12:16:11 -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 067AD61846; Tue, 7 Jun 2022 19:16:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13502C385A2; Tue, 7 Jun 2022 19:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629370; bh=zpIlo2dhr55SAn7L6nptZO8nID03IAKitfbd/IXs1qc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bT8TX9JOqz6rCmCZwtCZwTsuwLlw2j27aWO2M03AYBR9HhPNCCWVPDw4Z6x0+0RbV E4BnoMFuhfp7tuLt0ZxUyNqc6GYUZdVjK74iGHxT2OZlKfKcBMWUIPOVKhwqkjdmkJ OfK7pmgc5drp0GZoyOQ2WZah/IIOPyDkpxnOZ4nU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hsin-Yi Wang , Yong Wu , AngeloGioacchino Del Regno , Matthias Brugger , Joerg Roedel , Sasha Levin Subject: [PATCH 5.18 666/879] iommu/mediatek: Remove clk_disable in mtk_iommu_remove Date: Tue, 7 Jun 2022 19:03:04 +0200 Message-Id: <20220607165022.177239560@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 98df772bdd1c4ce717a26289efea15cbbe4b64ed ] After the commit b34ea31fe013 ("iommu/mediatek: Always enable the clk on resume"), the iommu clock is controlled by the runtime callback. thus remove the clk control in the mtk_iommu_remove. Otherwise, it will warning like: echo 14018000.iommu > /sys/bus/platform/drivers/mtk-iommu/unbind [ 51.413044] ------------[ cut here ]------------ [ 51.413648] vpp0_smi_iommu already disabled [ 51.414233] WARNING: CPU: 2 PID: 157 at */v5.15-rc1/kernel/mediatek/ drivers/clk/clk.c:952 clk_core_disable+0xb0/0xb8 [ 51.417174] Hardware name: MT8195V/C(ENG) (DT) [ 51.418635] pc : clk_core_disable+0xb0/0xb8 [ 51.419177] lr : clk_core_disable+0xb0/0xb8 ... [ 51.429375] Call trace: [ 51.429694] clk_core_disable+0xb0/0xb8 [ 51.430193] clk_core_disable_lock+0x24/0x40 [ 51.430745] clk_disable+0x20/0x30 [ 51.431189] mtk_iommu_remove+0x58/0x118 [ 51.431705] platform_remove+0x28/0x60 [ 51.432197] device_release_driver_internal+0x110/0x1f0 [ 51.432873] device_driver_detach+0x18/0x28 [ 51.433418] unbind_store+0xd4/0x108 [ 51.433886] drv_attr_store+0x24/0x38 [ 51.434363] sysfs_kf_write+0x40/0x58 [ 51.434843] kernfs_fop_write_iter+0x164/0x1e0 Fixes: b34ea31fe013 ("iommu/mediatek: Always enable the clk on resume") Reported-by: Hsin-Yi Wang Signed-off-by: Yong Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20220503071427.2285-7-yong.wu@mediatek.com Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/mtk_iommu.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index e4b4ebbcb73f..81b8db450eac 100644 --- a/drivers/iommu/mtk_iommu.c +++ b/drivers/iommu/mtk_iommu.c @@ -957,7 +957,6 @@ static int mtk_iommu_remove(struct platform_device *pdev) list_del(&data->list); - clk_disable_unprepare(data->bclk); device_link_remove(data->smicomm_dev, &pdev->dev); pm_runtime_disable(&pdev->dev); devm_free_irq(&pdev->dev, data->irq, data); -- 2.35.1