Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2751860lqt; Mon, 22 Apr 2024 23:36:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUa1v4hGV1thyGbd8167igYmFYauodaSAs9uHrVW8ERUBFJX5zOQ6mnBLX/1ZIndfxcEAlZlcAx4CAT5kQmgWtdAqhFzmflK4vVXwQdLA== X-Google-Smtp-Source: AGHT+IEC4/Pd69AQ52juUinmMhC8g//4Cu4eB5fcu52M5bTqbdgkVPg5IUmuF60R/Z6vL1CjDF6d X-Received: by 2002:a50:8e1e:0:b0:56d:faa2:7aca with SMTP id 30-20020a508e1e000000b0056dfaa27acamr8502201edw.17.1713854202366; Mon, 22 Apr 2024 23:36:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713854202; cv=pass; d=google.com; s=arc-20160816; b=dw0fnzrIQ1hdPSkjRIVvVJ5lZjGLP7ByE95qWbLKT9sZTpKfkfJPvi/e77nV+ATSF3 5sNvjqQEb2JUnV4q2ZQi8v47Y7qXgfSyKkX/NdqFe9FfgLL+FGIfvF4FHsk7PBBJJKPv iSSywjjs8UlhPy43kmoZQv3+jYPd4yzoLyY+1b2VKP9w5HIHne4LqQjUN6SyK5j3NNCT 8ghOIsRuR324alz/yhjEn+mzruMtCepeh5QZrRDjjM96prjEOENQi5x/PFemLyf4qSU0 6fRojZ6Zy7O+cJxpF2npnwCUNC3XfXiu4xSXIwbmYvkPQDhnhic1NE8Lx1tSdLxrxB6j qpJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from; bh=/bQrDKA2UBOVhWrFs4R8WbrUGWkcrnCXm3XE3Ap+m30=; fh=aSBuWJhq+wh/RJPhpz7hpJvsv19RnrMfKKwbvB74y0s=; b=dRTzpHo9Se0Kqy1yVXUY0flkL4zlaaI6FT67V4x+qYucPjaI6BlMXZH770z/X22skF j0e6eMDeLTpqE6u1Nc3KnAdUVLWaHeYSlrxTX/yLPsphgRzQSIQhqk5w0P5UDsCTXqyh foPBOp+Z7qjk22oOUnoABXn15Q+uQR/IX07YmwG2Dwy8XuKxpYYE1OTlW5UPRlcOC0uk BeR0rnzCT0OEotL1BLIw8Ll6V5549f3Napofjyyjd8m7RD6hhJMUhHCXj9AoT3i6pVYQ YouTYnkr4EQFOFUsd+SpSv34RPSZnpADmJ127eEy2rcFqO//g22o1TuP6vaVqbVUXDk9 TlWA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=etezian.org); spf=pass (google.com: domain of linux-kernel+bounces-154555-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154555-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f16-20020a50d550000000b00572040d55c4si287520edj.609.2024.04.22.23.36.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 23:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-154555-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=etezian.org); spf=pass (google.com: domain of linux-kernel+bounces-154555-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-154555-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0D61A1F2202E for ; Tue, 23 Apr 2024 06:36:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 58E8C23748; Tue, 23 Apr 2024 06:36:35 +0000 (UTC) Received: from 14.mo582.mail-out.ovh.net (14.mo582.mail-out.ovh.net [46.105.56.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F8351B974 for ; Tue, 23 Apr 2024 06:36:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.105.56.113 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713854194; cv=none; b=a3eww6mbOdUge7JkNZUsU5v/wgAI8N62XpXOLlzmq2wpb5YajtIgHFsGoDR+z1i8c2DE0nMbHjTBGCNSdDSZ1qBf/A7gDbQW36TeLeyCNsJvMOypGNJ+VNDdnrnLdOVkOgSncXYm1PKDHSi25Ktn98SFWsADzNromt6O6j5U2mQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713854194; c=relaxed/simple; bh=//7ShSPA2EP5NwaaZfEki8K7OlVZFgyEEue1rd1oyaw=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=MVwv0gJAMoBlENxeaApTYc8Bgl2yaQyUBWSau3AMOAAMin1/5s0cSLE1JauDcP90rHZXxVsrX99vmvquXhXq/zVpjUgE26tEBJcrT1Qix1wocEvhSRqZsV3ZSASVHY2gx4InCsgLNz/zIxYNAWrOXBzdLQb9fLWcSMXtoT7AWlo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=etezian.org; arc=none smtp.client-ip=46.105.56.113 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=etezian.org Received: from director11.ghost.mail-out.ovh.net (unknown [10.108.25.169]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 4VNgTj1l2jzywq for ; Mon, 22 Apr 2024 22:51:21 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-4tf5f (unknown [10.110.96.193]) by director11.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 3F4BD1FE78; Mon, 22 Apr 2024 22:51:18 +0000 (UTC) Received: from etezian.org ([37.59.142.106]) by ghost-submission-6684bf9d7b-4tf5f with ESMTPSA id +ft0C+bpJmbCFQIAE4RCCA (envelope-from ); Mon, 22 Apr 2024 22:51:18 +0000 Authentication-Results:garm.ovh; auth=pass (GARM-106R0069a4220ad-9504-47e7-a8ce-39f0ca134099, C447AC6F663E29B5B072953094682C3B23667ADA) smtp.auth=andi@etezian.org X-OVh-ClientIp:89.217.109.169 From: Andi Shyti To: Dong Aisheng , Shawn Guo , Sascha Hauer , Fabio Estevam , Pengutronix Kernel Team , Alexander Stein Cc: NXP Linux Team , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , imx@lists.linux.dev, linux-kernel@vger.kernel.org In-Reply-To: <20240422113629.1629891-1-alexander.stein@ew.tq-group.com> References: <20240422113629.1629891-1-alexander.stein@ew.tq-group.com> Subject: Re: (subset) [PATCH v3 1/1] i2c: lpi2c: Avoid calling clk_get_rate during transfer Message-Id: <171382627746.248626.17524804161385336410.b4-ty@kernel.org> Date: Tue, 23 Apr 2024 00:51:17 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13.0 X-Ovh-Tracer-Id: 16855003081161378475 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrudeltddgudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvegjfhfukfffgggtgffosehtjeertdertdejnecuhfhrohhmpeetnhguihcuufhhhihtihcuoegrnhguihdrshhhhihtiheskhgvrhhnvghlrdhorhhgqeenucggtffrrghtthgvrhhnpeffteehudffvdfhudfgffdugfejjeduheehgeefgeeuhfeiuefghffgueffvdfgfeenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppeduvdejrddtrddtrddupdekledrvddujedruddtledrudeiledpfeejrdehledrudegvddruddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomheprghnughisegvthgviihirghnrdhorhhgpdhnsggprhgtphhtthhopedupdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdfovfetjfhoshhtpehmohehkedvpdhmohguvgepshhmthhpohhuth Hi On Mon, 22 Apr 2024 13:36:29 +0200, Alexander Stein wrote: > Instead of repeatedly calling clk_get_rate for each transfer, lock > the clock rate and cache the value. > A deadlock has been observed while adding tlv320aic32x4 audio codec to > the system. When this clock provider adds its clock, the clk mutex is > locked already, it needs to access i2c, which in return needs the mutex > for clk_get_rate as well. > > [...] Applied to i2c/i2c-host on git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git Thank you, Andi Patches applied =============== [1/1] i2c: lpi2c: Avoid calling clk_get_rate during transfer commit: 7ec84d4d55504710a828047d079cb22f12d4133f