Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp920480pxp; Wed, 16 Mar 2022 21:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpdBOySm5uIlK8IVh1qUtIVvZr22tz1y2gkqQS4kTp36IiHt56+hHNgr9jWvwF/d5oW5Ij X-Received: by 2002:a05:6a00:174f:b0:4f3:fe06:61b5 with SMTP id j15-20020a056a00174f00b004f3fe0661b5mr3188829pfc.50.1647490863562; Wed, 16 Mar 2022 21:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647490863; cv=none; d=google.com; s=arc-20160816; b=Ld5Ajvq+e+kMipyzlG3IJllMtv4hFcBixLS9IYE4LCX5U3SXqWysT1kZ19M846kIQp R5VMTv7IzMjPBd7XlVkEXyp5oCPzD1snFAECF/Yon9WFydkMhGX6muewwhNHETqOxELX HAIFVGhll2LFOSdm7TZYW+ALragS1y3smX9VbAB3zc9V6hYgVT9G4wf7wFudQXUQwQfG DH7Xth8u/+N6VCbgO2PsJK9Lxh3oSHxZ3QOYFLALlYTeJORqzhs4fgAWpxecj4JwfH3B 32ihI8Sl511irzkW/E5zPBz0HLylp+pRh/gOVpOlPYpGgl9I+vdFu6h4lCUiw5HueFxA tOcw== 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=5ha63cA1iMjHX8s87c7n2kolHfqFbmLzNe1WLNjs1WE=; b=UZ9FOBrfaFV3KUyxLu9Czuked8HGIZnoHx4IyqlPAU9MkMr42q4yTWz6gEiu9I9nbr eNfwsyCgGNMCYoH57gWLncsj6/ST4V8TUgCyvvR2w/f8dWVCNTDksnyDFzX4y7RfNVhH g6wb1Nz+c2XHEqAV2pfMAWtuXbuiO4q9lXco/efMfogDY97rAZdQXe9Mi9pVhFrJlebg 0u3DjM7AZ9M4ssa1otyoiax7h+FVLneoKpDA+ZvGQJAHE/TlDexMmbwVCjr41V59WgZU XjW0Q2JPWnYf2MNV6OfOOO2/7mHJKnCLQ2tx95LxHOgND4/uGsLk7IB0sm0pN8S9jnV5 NnGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=bMCllI0O; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s18-20020a17090302d200b0014a26adbdddsi3554337plk.398.2022.03.16.21.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=bMCllI0O; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F0AED3ADB; Wed, 16 Mar 2022 20:54:55 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349657AbiCOPf7 (ORCPT + 99 others); Tue, 15 Mar 2022 11:35:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231708AbiCOPf5 (ORCPT ); Tue, 15 Mar 2022 11:35:57 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A592B53B7F for ; Tue, 15 Mar 2022 08:34:45 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 531F41F391; Tue, 15 Mar 2022 15:34:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1647358484; 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=5ha63cA1iMjHX8s87c7n2kolHfqFbmLzNe1WLNjs1WE=; b=bMCllI0OEAhpTR/xo/nQZpGembmiqDKLvCjpZsLaRwk38/hIQOlo2N0vLq7HJPuH9lzS6C Uq1Uc2Ce5qyLN0s4/EHpmvktOGsUCXnAcSspEMS4bvDPOhARI/cHcN9Jt2JPrtKBDAY4Cz Jtb/OpIJ0w5dzanOsSGBN6/ilO/CG10= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1647358484; 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=5ha63cA1iMjHX8s87c7n2kolHfqFbmLzNe1WLNjs1WE=; b=IYqjuc4KM10+WvhWGIkJ3JehgCkXUN0ALfdgcnbvvFSNq9VIgyt/PUFiRFAJLN0bTkDd4x /X7ED/9OJsRhglDw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id F14DBA3B81; Tue, 15 Mar 2022 15:34:43 +0000 (UTC) Date: Tue, 15 Mar 2022 16:34:43 +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=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 16:27:40 +0100, Arnaud POULIQUEN wrote: > > > > > ST Restricted > > > -----Original Message----- > > From: Takashi Iwai > > Sent: mardi 15 mars 2022 15:35 > > 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 > > > > 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. > > You are right, trying to use the snd_pcm_stop_xrun needs deeper update > that could introduce regression. > It seems wiser to revert your commit dc865fb9e7c2 as you propose. OK, I'm going to submit the revert. thanks, Takashi