X-Received: by 2002:a05:6a00:2311:b0:4e1:52bf:e466 with SMTP id h17-20020a056a00231100b004e152bfe466mr1872926pfh.77.1645654944264; Wed, 23 Feb 2022 14:22:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645654944; cv=none; d=google.com; s=arc-20160816; b=adwSdlx1eTMNV/RElxdbgM1jMx3GM5L3XD5pC2Acin+k2ZXQQvteeXN4BJMjVgEA4d fKUmGJ2Vstw/VhEQ0r5gguG1FX9A5wmzgOR/YKPVUsEuhDzH8j4qT/cDvfPOU7Fd0sgQ aee8KOcszgxerzxyVHdBct4u4+EoxGyHeJi4e5eMwBnHZNOUx47KLVSiFc0ffHTd5+wf 4dg7uu8TD/+/vZgXMATv6+mMjaznTD+ndOQmT+XOizmj6A90iOBudmZmWN8rID86v6u0 2B4Csd9BUOEyXD9i/l+CS2fZSIM4boYvHl3wI702JbAzhFYVAKYp/CDVHhUccQehgFeh f/LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=rcDFY1LItees6+FK2W/ySTQ3y1fFxVSJVrQTw6kYb/A=; b=mluUdWedBY477g4saIcACpvhhnjcExP08caZ8l/mJIhrcN37U1nzmZC16idzBhMTdh XmHjldMoBywu8IGg3Qlm4GYvwEkpxH3b+Zyi9YU9C44ul6ccr7QrQVlHZN1P34euzu0P +V5f22OHYjBeSbPUD0KosxahhN3nvuMrlsoUfloVQkC/KEWgE8GZ8wmtEzKAxG/ASTw+ jhyX8OseGjwG0uGg8A1gMo3kft4AFYz+tCpJCPrzAFjv38/ak+UBToDvXq6DUKvAjNg3 hQEDuKC2N8TrHxCQds9kkDXhxGXbI6vD23slPu9E+Yx+MqGVubKg962zy06cVxzCU1CC xsmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Z5/x7cgf"; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2si774493pge.721.2022.02.23.14.22.08; Wed, 23 Feb 2022 14:22:24 -0800 (PST) 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=@intel.com header.s=Intel header.b="Z5/x7cgf"; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244058AbiBWS4X (ORCPT + 99 others); Wed, 23 Feb 2022 13:56:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233132AbiBWS4Q (ORCPT ); Wed, 23 Feb 2022 13:56:16 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E953EF00; Wed, 23 Feb 2022 10:55:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645642548; x=1677178548; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=6ATkQ3SPbHg1uNzvDgcRhzJ0i/tVyFJ14GLbD7i2C7I=; b=Z5/x7cgfL+wmN5LEhS37WJvKKPLWSaRlotoTzQF2MKTgFjLfdsy6OOBA yl77mbCSfpfewHpLCcw2hWYjUxH7EmSGGWkKFwSpzb2ubIxv9IpckgohI LfK/7l69ren13/A/hsWrY1pgYw2y3WJ4OGC6zuC/AGQ4R5DY65RQMwbyS mbtCl56MqosSCmLqDfbS4V9I3fdnR/2dgxqKjXaw3pwap2IFh3i77dFM2 ur1PpMupnZFcLJVSlevSZiHVEBnKnj2RFGSxsnpXZiGKnKwRPXnBNKyaS x1xtliB71CJvUZxfR6MBghQJ3pNOBew0Atb8248V6rAFV+z7aA4yTA6Tm Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10267"; a="251792689" X-IronPort-AV: E=Sophos;i="5.88,391,1635231600"; d="scan'208";a="251792689" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 10:55:38 -0800 X-IronPort-AV: E=Sophos;i="5.88,391,1635231600"; d="scan'208";a="491319470" Received: from aacunaco-mobl1.amr.corp.intel.com (HELO [10.209.144.93]) ([10.209.144.93]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2022 10:55:37 -0800 Message-ID: <6e79238c-2ceb-0ae7-2b37-7ffac777db60@linux.intel.com> Date: Wed, 23 Feb 2022 12:14:58 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.0 Subject: Re: [PATCH 3/3] soundwire: qcom: add wake up interrupt support Content-Language: en-US To: Srinivas Kandagatla , robh+dt@kernel.org, vkoul@kernel.org, yung-chuan.liao@linux.intel.com Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, quic_srivasam@quicinc.com References: <20220221104127.15670-1-srinivas.kandagatla@linaro.org> <20220221104127.15670-4-srinivas.kandagatla@linaro.org> <5e050d4c-e3d2-35fb-ca49-7be53579bc31@linux.intel.com> <1cb4e02f-f040-23bd-44d0-0675429332bd@linaro.org> <49099bcb-35e9-0bea-9658-006caed3ab33@linux.intel.com> From: Pierre-Louis Bossart In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 >> Not following, sorry. if you use pm_runtime functions and it so happens >> that the resume already started, then those routines would wait for the >> resume to complete. > yes that is true, > > TBH, I was trying to reproduce the issue since morning to collect some > traces but no luck so far, I hit these issues pretty much rarely. Now > code has changed since few months back am unable to reproduce this > anymore. Or it might be just the state of code I had while writing this up. > > But when I hit the issue, this is how it looks like: > > 1. IRQ Wake interrupt resume parent. > > 2. parent is in middle of resuming > > 3. Slave Pend interrupt in controller fired up > > 4. because of (3) child resume is requested and then the parent resume > blocked on (2) to finish. > > 5. from (2) we also trying to resume child. > > 6. (5) is blocked on (4) to finish which is blocked on (2) to finish > > we are dead locked. Only way for me to avoid dead lock was to wake the > child up after IRQ wake interrupts. Maybe a red-herring, but we're seen cases like this where we called pm_runtime_get_sync() while resuming, that didn't go so well. I would look into the use of _no_pm routines if you are already trying to resume.