Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20514870rwd; Thu, 29 Jun 2023 03:27:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ47ePuunQspS6qLtpzHJMNGMvrsgt7gmJgW3o2eH9evekXnyPFw+CjB/dhQ0GK1YcXyjbd1 X-Received: by 2002:a05:6a20:1590:b0:122:e7d:99c0 with SMTP id h16-20020a056a20159000b001220e7d99c0mr27265651pzj.31.1688034477326; Thu, 29 Jun 2023 03:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688034477; cv=none; d=google.com; s=arc-20160816; b=cuFFzfC+z1d52ygR8wh9MMtq/PVjGkN9M1ut6P5qlr/s0mXKhNTfdhLZLj7svUozhc kweopXZJiuWngyfRWyGhTJgQhUP8eDvLSUK0FpNz7xDyIIrI69UXxlWkOZY6z54cks2z OZB5+3d5TIsQAMdyT7oP/qn5mXMcJ6inhzQoYwsKyxM+vzi+uwZ2QXxMjdFvyqBfi+qY R/a8B2UzPMcYETO943GCC9SISsRAnBzk/LaBOm0G/lO3aTYP6rgudjgY0unflPYaKgor G+nl3O8lNOqzl+IiDVY1EpOujwp/SV+YoQN9pk/AiuP10VJfPgGj0Ias1yai5zpBqb+d x8Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Rct2kiFrOd3Rrzu6mp65OH/eD3lqJ6oiDRmlbYZhg/M=; fh=sC6odv3su3umkBRqmkSBtDQyGciLLG78+9KCnigJ7+c=; b=DURbIKuwgZbotgwrSlM6HPUTgsMQlxUP1lL947+URIAfbsBnso7AWBHKgrtltrDh7/ DbFmjZ2GBSNajd9UOsNNRzZQq6iuN1myqnkbyD2+qZ0nOS1hiPPJ1tjEAbkh2mEx46QH ZO4L6NqHQmByYDxeHrRdTEgnRhJ0MXho2oNi8O9+3R/4erhtNb25zosOmbkyEhI9CKff z3rh64Ryc+VsJ7dSPJhrBtRjiSWxNh0SHlDSv2QnS1eSfp11ZNfwIjgkSFdm7ONANns/ qpFsHZ5JC6rw0k4HKhjQwd+LJ9ypuALGQ9BEwlXDFvEUb8JrkMDrpE23rVaa5WYoGeDG v2mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mtZqsGNK; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cd19-20020a056a00421300b00679a6ce03f6si6682767pfb.59.2023.06.29.03.27.45; Thu, 29 Jun 2023 03:27:57 -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=@kernel.org header.s=k20201202 header.b=mtZqsGNK; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231557AbjF2KPM (ORCPT + 99 others); Thu, 29 Jun 2023 06:15:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232033AbjF2KOe (ORCPT ); Thu, 29 Jun 2023 06:14:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E14743C14; Thu, 29 Jun 2023 03:11:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6C0BA61508; Thu, 29 Jun 2023 10:11:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71EACC433C8; Thu, 29 Jun 2023 10:11:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688033489; bh=7QmvM1Ky6hyRub5lLoveiNRl1PkeunqIVXKu1oYNN5U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mtZqsGNK+DgvnRm8fscT4hbHI2v/AUqGUlG1cuN2mjP0rZKvE2LrZRmgyv7PlTGuD cSZFRWTtytdvIsPSWmaufVFvW+vb3fPgcf6gfxovk08W3zROucmqbUjnSmOaS+5hBg TKom+2aMfhRgnePIZAsD2/a+IYIC8KvFX4Ie0naZukKd4mhqY9UFMw67aM6Fwb1ilG zOOpi6G8RnTml8MC6dydSr42HoAttiZQp480bbqh7WOD4aE6QoLW4HbtIrlFknujXh HMa4LLT2X40B4J/RyyB+RuSW233o9w3RDGoSH9x/VOC7dfmvKkfHSbOWfbq8PXaEoB KMlAFB1KVxGnA== Date: Thu, 29 Jun 2023 11:11:23 +0100 From: Mark Brown To: David Laight Cc: 'Sameer Pujar' , "robh+dt@kernel.org" , "krzk+dt@kernel.org" , "thierry.reding@gmail.com" , "lgirdwood@gmail.com" , "perex@perex.cz" , "tiwai@suse.com" , "jonathanh@nvidia.com" , "mkumard@nvidia.com" , "sheetal@nvidia.com" , "alsa-devel@alsa-project.org" , "devicetree@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Oder Chiou Subject: Re: [PATCH v2 3/5] ASoC: rt5640: Fix sleep in atomic context Message-ID: <550e5c8f-0bfb-4ffc-9a43-1ecb153c6a02@sirena.org.uk> References: <1688015537-31682-1-git-send-email-spujar@nvidia.com> <1688015537-31682-4-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+aXQRe9dUQ7rrBkZ" Content-Disposition: inline In-Reply-To: X-Cookie: Surprise due today. Also the rent. X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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 --+aXQRe9dUQ7rrBkZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 29, 2023 at 08:38:09AM +0000, David Laight wrote: > From: Sameer Pujar > > Following prints are observed while testing audio on Jetson AGX Orin wh= ich > > has onboard RT5640 audio codec: > >=20 > > BUG: sleeping function called from invalid context at kernel/workqueu= e.c:3027 > > in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swa= pper/0 > My 'gut feel' is that this will just move the problem elsewhere. > If the ISR is responsible for adding audio buffers (etc) then it is > also not unlikely that the scheduling delays in running a threaded ISR > will cause audio glitches if the system is busy. What makes you think this is anything to do with audio glitches? The bug is literally what is described, it is not valid to sleep in atomic contexts and if we ever actually try things are likely to go badly. --+aXQRe9dUQ7rrBkZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmSdWMoACgkQJNaLcl1U h9AtaQf8CxjCsdB1iRGBoRv5utkgYwI0VNyGiPs7GW70GzZc456Z381WvE94jU01 60leed9uBoJP3hs88KzS/G9Tg4StZFdmHQxVkjy78ArKLRUCPl4rMqc2bTODvWSf aYtTcgMRZZjgoY+mDHpBSFpPFJqB1DQs2CICy8BvoyOJDq05ghN8DU7dGQ+pl415 QaHrjbbOJkj7d+e2PftSuXOHfcF7Y0mj5E8yFjWQn1WwVfMCAhbRJvhYtpbzry6X UBWlM5GC6Hi1rx8zvMiKx6LemyxK924I92k8HiIa+75Rq5jM8JxldvYj+FuWlgIE 8BDY4GdfkgUBVHTn4ZJYjy2mb3nPEg== =eZLP -----END PGP SIGNATURE----- --+aXQRe9dUQ7rrBkZ--