Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5494436pxv; Wed, 21 Jul 2021 06:56:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsOzploIAySad9P0xWSiwNeZacUChC7EyVirXkeTdIsZ2D03yG7nE8AtIKWwn2Wa73eQAw X-Received: by 2002:a05:6602:59d:: with SMTP id v29mr16366989iox.132.1626875784674; Wed, 21 Jul 2021 06:56:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626875784; cv=none; d=google.com; s=arc-20160816; b=img+BYJCF05QSWXpHBDujy715Tn9VDDq32grygXi5At0lAE9fYJi3g/7Vj4zy1Lujk xJVOw2qzzvZxqqlml5iH6e0U7zOj/syZjgxITAIwPTlVzh9NdZtcfc3sTb8LmGQaa4u+ d3k4n0Qwxiq7vMiz3KLyn4vGs1J+hQVTiLzCJr/lK6pjgqP4NLY7GWV0GWQ8I4mpLaVB z2CZaHjtkpUjaQUFupSHW1G9L83YlqikRx2cvTHhF1lg2czhfCWuKtd1Z0dR+g21RnX7 FzdVwzkdQ/CZcsInogPlBLWlI69gW2hMAOpU34m1A8J6ARPxe3Xh/jO262pMqN/8OyGU tiqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=1CJqG1NCBUeAlVH4ATN+4oMP/boKrsPS3sTYtz5W6dQ=; b=dShvyM8d4gv8+LOVzdA6nzLt32EEoRCKz4+SieFCzt5gkib0UXKSH07fHdFo8EtwBu Bq+/XO4ecPNzRRMWdghCteZ+au43KFWGypr59JoPLULmQ3lgbShbdx39eG27tp7QOuVQ X6yF9Vlq9cOn7VVg+zO7N3NTeM1MyfwycT9xMLRFaaSxoV9IAG6C766gneOY9fiisn5S zD9cWp0fD4JqczzHA2HRVp2FFO7E5S+TEfjwCmE5VDg+TzaA7XluT1iwHoWshBnHf3oP M80USXQ1LZRNfEwKLx9HFm0tBYJ99Ev/LhTu0MjxSE+JOI+7m64X5vyiT7nga4sKpIge Af6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Xo8/ygYg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h21si14406571ila.73.2021.07.21.06.55.53; Wed, 21 Jul 2021 06:56:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Xo8/ygYg"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232426AbhGULvq (ORCPT + 99 others); Wed, 21 Jul 2021 07:51:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:48424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232908AbhGULvf (ORCPT ); Wed, 21 Jul 2021 07:51:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0697261221; Wed, 21 Jul 2021 12:32:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626870732; bh=XQHf2979Xlx/iaZS18v88toAob2o+9Cb5fbI2ZSNIWw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Xo8/ygYg4NMC7fOpp2VARr/Gu/BNupkOCXn5WIVbNPdXXb7n5QN3CK+IeDlMMONIL 6yUO9Ll1v8GyjRbyTFgIliumZxtDobA2FZCXtpjx1yUyFWEw/LLXm8mjVzcDBJZCEf RByxyvVfmGvGk0TsrHoDyGvKU9NFCp/3dSQSk7BuhLmkXalFEvQMYrCJPl9qmKMrCa GH1diIeE1an+UCi6hkSM1wEQU7Nm1RZBa5Zo79RGMEkxgaInIrn/EzYD9733iptVfy UT3PRNV8FfotQ92YWBd6r7uzbURtBoCj4WG5e6oxlZc+TMzcnS+wu1MX3MGTqY0Pqo zuB92JuqPlsAw== Date: Wed, 21 Jul 2021 13:32:07 +0100 From: Mark Brown To: "Sa, Nuno" Cc: "Tachici, Alexandru" , "linux-kernel@vger.kernel.org" , "linux-spi@vger.kernel.org" , "nsaenz@kernel.org" , "f.fainelli@gmail.com" , "rjui@broadcom.com" , "swarren@wwwdotorg.org" , "bcm-kernel-feedback-list@broadcom.com" , "bootc@bootc.net" Subject: Re: [PATCH 0/1] spi: spi-bcm2835: Fix deadlock Message-ID: <20210721123207.GD4259@sirena.org.uk> References: <20210716210245.13240-1-alexandru.tachici@analog.com> <162680680557.11423.14003826010912823109.b4-ty@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9dgjiU4MmWPVapMU" Content-Disposition: inline In-Reply-To: X-Cookie: Many pages make a thick book. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --9dgjiU4MmWPVapMU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jul 21, 2021 at 06:47:01AM +0000, Sa, Nuno wrote: > > To: Tachici, Alexandru ; linux- > > kernel@vger.kernel.org; linux-spi@vger.kernel.org > > Cc: Mark Brown ; nsaenz@kernel.org; > > f.fainelli@gmail.com; rjui@broadcom.com; swarren@wwwdotorg.org; > > bcm-kernel-feedback-list@broadcom.com; bootc@bootc.net; Sa, > > Nuno > > Subject: Re: [PATCH 0/1] spi: spi-bcm2835: Fix deadlock Please delete unneeded context from mails when replying. Doing this makes it much easier to find your reply in the message, helping ensure it won't be missed by people scrolling through the irrelevant quoted material. > I'm really curious about this one and how should we proceed. Maybe this is not > new (just to me) and the way to go is just to "fix" the spi controller when we hit the > issue? I'm asking this because there's a more fundamental problem when this pieces > align together (CCF + SPI). What I mean is that this can potentially happen in every > system that happens to have a spi based clock provider and in which the spi controller > tries to access the CCF in the spi transfer function... Doing a quick and short look I can > already see that [1], [2], [3] and [4] could hit the same deadlock... The clock API just doesn't work very well for things on buses that might sleep, I2C is another example - it's a long standing general issue that needs to be addressed in the clock framework for example with finer grained locking but nobody has come up with anything yet. --9dgjiU4MmWPVapMU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmD4E8YACgkQJNaLcl1U h9CYAAf7BWXFxsLJR0wtgTKipOtavmlW4sbr+1qOD4EqV53Q0uCO+u9UhLqhqDKf pah8nixXNUSfNW6Yc+myXrrwNm9wBBw638E2OMEnFo5w5+/m8cL/a/Y2LQimtpfl Nw9aWwGaiPUSqbByaPqWQyNgR4VG2N5qN6hLLdCKlkMHI6xejBqc0WBXSmyIDqi3 HVxRS7a9H2GwIYcjyoBtowguYCuD3vPux7eaFPvdBG1D/K8Rn2jHuWXGNb589h/C 6xPnM7jmPghS/CrAL6+YZW3/Iz/iX5TZn9/X82PPQbKd694h+dOSbOLd/MlOx6vi NsgO/BBT2qkVAX6aoE3Vu+3oNcwJZg== =VEKT -----END PGP SIGNATURE----- --9dgjiU4MmWPVapMU--