From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796292023; b=IG20Jf49rL88R8laAnJcUHMSAd8avJdJpEgPN81RZ/rGgIut5t7mB4qjMfnkrOK6VKdn iktz+bs/0+KkgBCKyrAotSbl+4uJbd5xM8OS8G7rgplpfzoSnDgrQ6N+uCld2Egk6NLKE dN1j38AxyNkHqvU3auKmjMrRKXhGhjIq5wjxZbrRydh4JeE9SHqGxGsoEsytCHucwqJA3 NFkbdIHOnxFur4MWqFZpDG/Py4RTO/4y2/v63+qr+mNYgxjfdYsFF20LvwkOvA2kiW/A/ G8igPo9NrrlmJDl2PjbQK9qLTC87pAy3+zdyt7LKgeGQdQTnpotExD0kB0shQ7UQxAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796292023; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=d8vJnVCDvO3k7p+16/ZwKXAoz8XqELbjGjxsuucUvlI=; b=JCAuT+5r4gHAyWLyeSBqOSEcXEu9GlJsSxruoy263ah7moX6CV/JUDBK5N1Cneo3FquN d1tHk9O8XlabmwmC+7fvFy9ns/uQhusHN0OfBuNPZ/Fe6yGGJzUPNrqNFT9dY4cctFL6E QMA1sn8cytwNg8zF/zKkPlziLRBX7nCoGfoE7qLPjBXVHhv/lyzKaRFSfH6KsV9wScr1+ x46BdKmSG0zUEGnEmBmyxWnpmmrGr8BlACyCW5hEv+BaDSEunKsfuMX/op9gJ7yIe8nAU 4gsxJuMUt1owEnNUUWZhSE4MyUNbF3rVb/+Y7oDk1Hjn5iW5AGt0IBBflMe+g62eqHQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JAWRIJUL; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBA22606A32D for ; Thu, 3 Dec 2026 10:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JAWRIJUL Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D7581F000C1; Thu, 3 Dec 2026 10:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796292022; bh=d8vJnVCDvO3k7p+16/ZwKXAoz8XqELbjGjxsuucUvlI=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=JAWRIJULOGRKNHIVnVUpasCAnhtPB08KdfmR2DVCOXUlNP+yGd1/DcikyiivH1HgJ B5YJuP+tbsZn+FJZzTkfL5nFel3PRRNpYbNEJhsKSRdYvL8V7H7QUsCIUcL2bgPq2g mjwXkNzlV6CX+R8xsYONzNaTEb4BdMokSL7s11Zl2c8CUxmvxM+L5uP7K9S6a0vJZD oBNA7RQeE9IYpGSNjCnHy7oB1x5zT+y8O5xsd+7cvhwuW/bH+r/m3sgeX7OiJpAi17 FwCA4brTqCs5ikmD16fZV0wiScBMpEq/bjkx03S+5/wa2izJ5sGgqfeU9SyUbjbHsu VoB2MssbzfsoQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/5] ASoC: amd: ps: Use devm_pm_runtime_enable() Reply-To: sashiko-reviews@lists.linux.dev To: phucduc.bui@gmail.com Cc: linux-sound@vger.kernel.org In-Reply-To: <20261203094558.26423-2-phucduc.bui@gmail.com> References: <20261203094558.26423-1-phucduc.bui@gmail.com> <20261203094558.26423-2-phucduc.bui@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 10:00:22 +0000 X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] ASoC: amd: ps: runtime PM suspended before component unregistration -- commit afe126b816589bbc879239646442299aee4ce385 Author: bui duc phuc ASoC: amd: ps: Use devm_pm_runtime_enable() This commit replaces pm_runtime_enable() and the remove callbacks in the AMD PS PDM and SoundWire DMA drivers with devm_pm_runtime_enable(). > diff --git a/sound/soc/amd/ps/ps-pdm-dma.c b/sound/soc/amd/ps/ps-pdm-dma.c > index 359ca10b9ba49..7a894e8688ae1 100644 > --- a/sound/soc/amd/ps/ps-pdm-dma.c > +++ b/sound/soc/amd/ps/ps-pdm-dma.c > @@ -400,13 +400,8 @@ static int acp63_pdm_audio_probe(struct platform_dev= ice *pdev) > pm_runtime_use_autosuspend(&pdev->dev); > pm_runtime_mark_last_busy(&pdev->dev); > pm_runtime_set_active(&pdev->dev); > - pm_runtime_enable(&pdev->dev); > - return 0; > -} > =20 > -static void acp63_pdm_audio_remove(struct platform_device *pdev) > -{ > - pm_runtime_disable(&pdev->dev); > + return devm_pm_runtime_enable(&pdev->dev); > } [Severity: Medium] Can calling devm_pm_runtime_enable() after devm_snd_soc_register_component() suspend the device while its PCM streams can still be opened? Because devres runs in LIFO order, pm_runtime_disable_action() runs before devm_component_release() unregisters the component and disconnects the card. It calls pm_runtime_dont_use_autosuspend() while runtime PM is still enable= d, synchronously suspending the device and releasing the parent PCI device. CPU0 CPU1 __device_release_driver() devres_release_all() pm_runtime_disable_action() rpm_suspend() pm_runtime_disable() __soc_pcm_open() snd_soc_pcm_component_pm_runtime_get() pm_runtime_get_sync() -> -EACCES acp63_pdm_dma_open() <-- MMIO while suspended devm_component_release() snd_card_disconnect_sync() snd_soc_pcm_component_pm_runtime_get() ignores -EACCES from pm_runtime_get_sync(), so a concurrent open reaches acp63_pdm_dma_open() and accesses ACP registers without resuming the device or its parent PCI device. acp63_sdw_platform_probe() in sound/soc/amd/ps/ps-sdw-dma.c has the same bu= g. Moving the runtime PM setup and devm_pm_runtime_enable() before devm_snd_soc_register_component() in both probe functions keeps runtime PM enabled until after the component is unregistered. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203094558.2642= 3-1-phucduc.bui@gmail.com?part=3D1