Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp526139lqt; Fri, 19 Apr 2024 03:03:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUiS6GC2IoPcTMLZuBloWTnpu8uj8GuQYlBAPCDD6inqkTWoB7MtRXk6psC3tQRsZoloorSEYauhJt+x9xrnT5BKrn5uwNV31w+OEndLw== X-Google-Smtp-Source: AGHT+IEiCVHLcLgwTsaA0G+zgzetoxgP7S/iQKTy7sLdZnKK9M2tErtajNTG7c81JUKB9GiQaN9P X-Received: by 2002:a05:6512:224a:b0:519:3cbf:f734 with SMTP id i10-20020a056512224a00b005193cbff734mr1459863lfu.49.1713521030531; Fri, 19 Apr 2024 03:03:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713521030; cv=pass; d=google.com; s=arc-20160816; b=s3nY4GUnvOo/NKi84KjEXC9Mp3n+O3lWx4Pp8kS0jDVx0QKBs/Siq8Dw/iLn/j7GPr LhuyzApU6DnruPaFfK/uP9GlFE1VKTJW9ZWdLRPEv1EygNQ5BbL5o2nz7eu7yOpX3KtC qst1eZJ5CvsEPBJC1EfqTMnkd+p2GpVXAcr2UlT+VdyXT4Uc7hD72hZong1gQaCmOiSR IKi2dLLNM57kmUQO4ivHVCAM5Vj2/pQgzm1AX9B9og/L05wr+iidLr0z5t7KG3lPQzj1 r/XzbNaeM5HIgDf3N1IoN/tWsImSQdc9YDd/EINxyDckEoDrsxiIjW5OBIqry9Tep1WL Ad7g== 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:dkim-signature; bh=dXvyKtfmGy3kRbFnZWqI6mm2RDbaxRFqwHCIj4yyFbk=; fh=clGdd0M5thio6sP6uDa82Xwr8f99xseH0yt85GVHMB8=; b=bk/2skL56SaEe92FptkxF1aqN1vQaFVRqGuUr/9/h0p4hkvZvs4RhlDiaW63EmGaSc s6jXD7KhplY1lTJaCTbRDZcHs86F/FIC590+uSd1nQss+PPA8h3k2DBWeokAsKorCtgA ISOvErZNexJDYVHvzcZd1jNIA5Sd1IWZZl7c1xHKqCrKKDojAFhyxe36TFYNednmvpUx tpjzsdZGqW0CPN50hKq9n2jGi4kFV33eCZspzqW8rMdbmhwKxXD/HXb8j6MCDLqukKgM PFtVbQqVAI1zfrHVp7HQDHWwaf3KfDEeIdn0DecBwLruh3FBI1gqCW7gYbenu1kfM1Ix OQWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qNp4CEeH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151280-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 i13-20020a1709064fcd00b00a51cb6f49dfsi2040605ejw.828.2024.04.19.03.03.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 03:03:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151280-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qNp4CEeH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151280-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151280-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 408A81F21B4A for ; Fri, 19 Apr 2024 10:03:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3236F7CF1A; Fri, 19 Apr 2024 10:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qNp4CEeH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4D5E47BB19; Fri, 19 Apr 2024 10:03:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713521020; cv=none; b=avm6J7GN8JjcHYR2rPqxqQGhmazlCcKSCptTPdeaWQMqnTTMH/Pe07u7O2ATITw5/qCYIom13evbj8qJtLjlnZFa86iJU9L2pFF0/WkNOem0eHY1HJJi4gf+qgHNQVSHY9gzLZ7TJ90MXRYN39YUl09mP99YBG6jl1wttZSs8ko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713521020; c=relaxed/simple; bh=Y+l/5wzPKHUbS5RS+cGf0Dhxvzxyf8nHK5sorhrqVPs=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=T8sZLULXlw0I+xPtMuUhLsA3cTkcyIEMnFyEftac1bCCzAIsts1sb8TwkClfLI8MiQBUx7V/YY32EzHisaWVN54UdIXh+dRDK4sQIBOAJFS+x0KGmQyxC72a6jr4ZbMLJ/dtehxL79HMAIsswKqhqEQcY0VEyO+6h20e7AyyFAo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qNp4CEeH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F597C072AA; Fri, 19 Apr 2024 10:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713521019; bh=Y+l/5wzPKHUbS5RS+cGf0Dhxvzxyf8nHK5sorhrqVPs=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=qNp4CEeH/RtTaj6c0/jyji1DErFEvmLvA92sY4so1y3KYC/ks7SaahgVq73vRFfyC 721AQNRNvig2459UGf0y2hfBSiI8S4ZTmo0TFB3FPM1YXjF0yPIre5DIcPdG1CYM6T qjW/w/UfrCQ0cIqi0SB/B0BrNySAkVpRI5zIC0mJ521c4v2z89/mulx2bQlvKzpx90 n8XT6DHr8MlWaTGFXevMdeE0iFjSWWbIWxrS8fHQxJ4i/gOpDBVQhEzrGiF/0iBdpB tuhx4c9SXceMAev1iGFrAd5kHh/e4NvtB5GwdNeIhZ11qwgiKcxe8S0Mruu2+Y13BP Gi5DtPBR0WmGQ== From: Mark Brown To: Peter Ujfalusi , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Joao Paulo Goncalves Cc: Joao Paulo Goncalves , Jai Luthra , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org In-Reply-To: <20240417184138.1104774-1-jpaulo.silvagoncalves@gmail.com> References: <20240417184138.1104774-1-jpaulo.silvagoncalves@gmail.com> Subject: Re: [PATCH] ASoC: ti: davinci-mcasp: Fix race condition during probe Message-Id: <171352101774.1723702.5403683019757123784.b4-ty@kernel.org> Date: Fri, 19 Apr 2024 19:03:37 +0900 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.14-dev On Wed, 17 Apr 2024 15:41:38 -0300, Joao Paulo Goncalves wrote: > When using davinci-mcasp as CPU DAI with simple-card, there are some > conditions that cause simple-card to finish registering a sound card before > davinci-mcasp finishes registering all sound components. This creates a > non-working sound card from userspace with no problem indication apart > from not being able to play/record audio on a PCM stream. The issue > arises during simultaneous probe execution of both drivers. Specifically, > the simple-card driver, awaiting a CPU DAI, proceeds as soon as > davinci-mcasp registers its DAI. However, this process can lead to the > client mutex lock (client_mutex in soc-core.c) being held or davinci-mcasp > being preempted before PCM DMA registration on davinci-mcasp finishes. > This situation occurs when the probes of both drivers run concurrently. > Below is the code path for this condition. To solve the issue, defer > davinci-mcasp CPU DAI registration to the last step in the audio part of > it. This way, simple-card CPU DAI parsing will be deferred until all > audio components are registered. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: ti: davinci-mcasp: Fix race condition during probe commit: d18ca8635db2f88c17acbdf6412f26d4f6aff414 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark