Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp468767pxp; Wed, 16 Mar 2022 09:18:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+G0v2ueeCEiZKaSIQwha1m5DSRcOrLonrdND9lB1ofDorIk3OlKnAgAnEQHfwkB8nF6XX X-Received: by 2002:a17:906:3412:b0:6db:6ad:381c with SMTP id c18-20020a170906341200b006db06ad381cmr668328ejb.302.1647447522344; Wed, 16 Mar 2022 09:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647447522; cv=none; d=google.com; s=arc-20160816; b=ptsu92RnyqwQvI+Suv72nPexkuO52WwmKeN7VwwDDcyyG8Q2dwIe0y7Ru7Svc5T0zK 0lmQIKTT98EGkjSaieF7VmQhjW3UjJO+cluxug+6RLcdLLc7HWY+AjLleByLVXQSBZD6 Cdt0e/aIecqew03dDfq7T2zzRLOZrbxX5qMvleOWgLjKES6o4fDgtCg0kkNVpR9E8/6S mqs2zV4IZvvtPtIlEJ9HstCLw6a9ovRzir9MXqxBqJVtogV0/6KTQGZjcM9S2xXeCXsa iGS4dzCRfsdRyvBG4v2UtizutMTcw+vPmo6/5w4fmo1Mm+pOHXHq09nwngIRAfep7yRh yO8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=6Lzcj/afrhcKyM8V22XGA9WjIG/zmiMFuC2sCGOCyNQ=; b=Y/bKUD3s9prxuB4x0Tgm1/3R77BoB+VWaagG/95w0R7rrz8eb5SkW2oiHbFb+j0n+w FhClK+fr0fuhRuStPNltGWUN0bU6jnrPBf465OIOD1Vjyek0njnH8kj4upSRz9SBaGy+ T5AqTcn5/d2idez6UyOzoczjVCdyEP4DaL68gBNsZ7RcXLL376raXRaZhsGn7Eoq8sXv 8g6UqNyBeLDcME8uGgZI3e2gN6S8vb5DE90/EELLRXBWIztgTh2H839pacShZOMrmLva 4oRFO917yTqCSpQ4nUBeXK6pV6dSJMsGWLla4yfVQsCu/r62RjLMSTyF5vfoHPVu+i7c lgCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZxVkZM0m; dkim=neutral (no key) header.i=@suse.de header.b=oX0UDiut; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a05640212ca00b00416274abb40si1508822edx.340.2022.03.16.09.18.16; Wed, 16 Mar 2022 09:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ZxVkZM0m; dkim=neutral (no key) header.i=@suse.de header.b=oX0UDiut; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349306AbiCOOgB (ORCPT + 99 others); Tue, 15 Mar 2022 10:36:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349290AbiCOOfz (ORCPT ); Tue, 15 Mar 2022 10:35:55 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5FFB36326 for ; Tue, 15 Mar 2022 07:34:42 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 6E34E210EC; Tue, 15 Mar 2022 14:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647354881; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Lzcj/afrhcKyM8V22XGA9WjIG/zmiMFuC2sCGOCyNQ=; b=ZxVkZM0mhEHJO24Z6UuJSix96fYscV7iw1qEJZE9JspJ+LuBBBvp8t0gCFreiOvUcMOsb1 EkXjanautZrSq1uWCe0wAp+oTUIwlY9boE3xMP3FZSxM5BxS3JCFhO6jiyvk+F2mvH57Sq AXs8zpuRZSqxk3J/XFIld4e0fU9kCJo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647354881; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Lzcj/afrhcKyM8V22XGA9WjIG/zmiMFuC2sCGOCyNQ=; b=oX0UDiutKdYU7ubmxYbL4awI/73YmK33gOsd9kx67SXBHjFRb7PdcksQRwfw7s6xz6KLDx 9oF/dKfbumPcEnDw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id CDB9DA3B9C; Tue, 15 Mar 2022 14:34:40 +0000 (UTC) Date: Tue, 15 Mar 2022 15:34:40 +0100 Message-ID: From: Takashi Iwai To: Arnaud POULIQUEN Cc: Daniel Palmer , "broonie@kernel.org" , "tiwai@suse.com" , "alsa-devel@alsa-project.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ASoC: sti: sti_uniperif: Remove driver In-Reply-To: References: <20220315091319.3351522-1-daniel@0x0f.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, 15 Mar 2022 14:15:20 +0100, Arnaud POULIQUEN wrote: > > Hello, > > > ST Restricted > > > -----Original Message----- > > From: Takashi Iwai > > Sent: mardi 15 mars 2022 11:28 > > To: Daniel Palmer > > Cc: broonie@kernel.org; tiwai@suse.com; Arnaud POULIQUEN > > ; alsa-devel@alsa-project.org; linux- > > kernel@vger.kernel.org > > Subject: Re: [PATCH] ASoC: sti: sti_uniperif: Remove driver > > > > On Tue, 15 Mar 2022 10:13:19 +0100, > > Daniel Palmer wrote: > > > > > > This driver seems to be in the "only good for attracting bot generated > > > patches" phase of it's life. > > > > > > It doesn't seem like anyone actually tested the patches that have > > > been applied in the last few years as uni_reader_irq_handler() > > > had a dead lock added to it (it locks the stream, then calls > > > snd_pcm_stop_xrun() which will also lock the stream). > > > > Mea culpa, that was an obvious deadlock I overlooked in the patch > > series. > > > > > Seems best just to remove it. > > > > > > Signed-off-by: Daniel Palmer > > > --- > > > I've never used this driver, don't have the hardware etc. > > > I just noticed that this looks broken when debugging my > > > own driver that uses snd_pcm_stop_xrun() and was looking > > > at other users to see if I was using it wrong and noticed > > > this was the only place that locked the stream before > > > calling snd_pcm_stop_xrun(). > > > > > > There are probably some other bits of the driver that > > > should be removed but I didn't look that hard. > > > > > > TL;DR; This driver seems broken, seems like nobody uses > > > it. Maybe it should be deleted? > > > > Yeah, that looks dead. > > > > The platform is still used for instance: > https://lore.kernel.org/all/1d95209f-9cb4-47a3-2696-7a93df7cdc05@foss.st.com/ > > So please do not remove the driver Ah, it's always good to see a vital sign! > The issue has not been detected because it is related to an error that > occurs only when we reach the limit of the platform, with application > that stop the stream at same time. > So almost no chance to occur. > > > OTOH, if anyone really wants to keep the stuff, please revert the > > commit dc865fb9e7c2251c9585ff6a7bf185d499db13e4. > > Yes reverting the commit is one solution. > The other is to clean-up the snd_pcm_stream_lock/ snd_pcm_stream_unlock in the > Handler. That would work, but maybe it's safer to keep that lock, as the state change isn't protected by irq_lock but only implicitly by stream lock in start/stop callbacks. thanks, Takashi