Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5823134rdb; Wed, 13 Dec 2023 23:50:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiyIPqBvjaT+m3xx+KcAG7drEGopbgwP5snhJ4W17BeDmnK6VDtSVzgyHV7ZMp0VUu4Wd+ X-Received: by 2002:a17:902:e74d:b0:1ce:6669:3260 with SMTP id p13-20020a170902e74d00b001ce66693260mr9934311plf.67.1702540214853; Wed, 13 Dec 2023 23:50:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702540214; cv=none; d=google.com; s=arc-20160816; b=k43i7GF7WCrnPfPkLTra9fzqrX4TNg+ivRuY5rdI9q0Hdu4wQ9ICtxMGN6KRxANwij sd8fkxmnLYox28KqVOLcSP5FALq4qu3jHeDFAhtOSCU7twVh+fG79ydqLHfNKnX0AWa7 hpIKwleIXR2Gl/HfhmgOyyjMkubEC9Bahuw90p5ClsPbayLGpFfyD/Yy5T6l7YnHjPhp pHJDY3TguJX2l22gudbOSV9d2bsJjTO0w/z4G9O/rrvU1OPl6yLB+BozQJfxm11wfaBB Eq2p5mGv8f+wDlzTN+Y4llvCCQ3c4de2Nh0BeTR8cL5tpOTJe7ayAoYizHs1T0ScrCfr Q1gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:dkim-signature :dkim-signature:date; bh=BasXHu44qmBA5Lb6x6s0xu3ntXxrQ9dJsYh6ASf+5Q0=; fh=ebu0wQGnt7BHeWqVIaWf6qVliPqSoqW204DBazR3Lc4=; b=CWu9DsbME24C4PojK7K+DLJj9Oyq/ezaznXGZyY+KR9aXAarmskr76V+7o4Toxx7C/ eOR9eAzIZ7uAskxJPv84ba+DmlZaCrI5rNHEoFtkwGVyGNd4V/ONDti9DJTf1sltGW+c 9fOKrvelawemLBPPvYbGKCkHQs4Asx34ty+WBXSPuEbDVm9eCJPZz7LDu+5WZF0WM9Hr cdikrBAtR5h7Of802fDLlWL1rWAOb31rEk2o8li7ONcFml2e64ENVsZi01je5/JTaEjP EOaQyBuBHDL7lFxrG/kX2qoTR5ZJxWbyJvwo6LLQqRxi0FMmkWWSzj5mcnRBFbJkMWWV VBWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=I1XyL+8U; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id p3-20020a170902e74300b001d3622d0c97si1327250plf.631.2023.12.13.23.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 23:50:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=I1XyL+8U; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id BAE9482FD7C9; Wed, 13 Dec 2023 23:50:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443383AbjLNHt7 (ORCPT + 99 others); Thu, 14 Dec 2023 02:49:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbjLNHt5 (ORCPT ); Thu, 14 Dec 2023 02:49:57 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A703CF; Wed, 13 Dec 2023 23:50:04 -0800 (PST) Date: Thu, 14 Dec 2023 08:49:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1702540201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BasXHu44qmBA5Lb6x6s0xu3ntXxrQ9dJsYh6ASf+5Q0=; b=I1XyL+8Umpiy9xMRIoBCQ62mE3dH8MfkDsiuVDOIX9s52SmeBk40yLE3RUWaNyeTmlPAeu a0lMiZ8zgboWaH8c5zFSJZg6JxG4a2jBjCwC07T1eXGs9BL+i/L0sBOY0UT/pYrATfz4wb m+jbZNQleTYY71EeSRWJcsH8r3Z4SqhH13GorZ+4ndAF+NDrMFQibzb0VLoNf3nfKUnjt4 FPrBh5rvIhhBPHRGqZdWTLiQr3rELljQMSVABf6gpnJ5lfUuTQ81mRvVX/3Kc/biwb16Td ypmHf4ZDgDRGSE8gVpYY8laEoAfrdUb+KEj7tqXzT8NQpyuG0IZjTjfuIjwFkw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1702540201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BasXHu44qmBA5Lb6x6s0xu3ntXxrQ9dJsYh6ASf+5Q0=; b=B3iBBKzeI2ZOWXjfJoRXt5xHT7NGKzWazSfux1I/Ezs7thV7PH8w4K0FS5X+IIkvFgai7R 7JtWNVDHY78RQpBA== From: Nam Cao To: Linus Walleij Cc: broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] spi: spl022: switch to use default spi_transfer_one_message() Message-ID: <20231214084955.7245c538@namcao> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=1.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,SUSPICIOUS_RECIPS,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 morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 23:50:12 -0800 (PST) X-Spam-Level: * On Thu, 14 Dec 2023 01:19:04 +0100 Linus Walleij = wrote: > On Wed, Nov 29, 2023 at 5:32=E2=80=AFPM Nam Cao wr= ote: > > Except for polling mode, this driver's transfer_one_message() makes use > > of interrupt handler and tasklet. This is problematic because > > spi_transfer_delay_exec(), who may sleep, is called in interrupt handler > > and tasklet. This causes the following warning: > > BUG: sleeping function called from invalid context at drivers/spi/spi.c= :1428 > > > > Switch to use the default spi_transfer_one_message() instead, which > > calls spi_transfer_delay_exec() appropriately. > > > > Signed-off-by: Nam Cao > > Reviewed-by: Linus Walleij > > --- > > Tested with polling mode and interrupt mode, NOT with DMA mode. > > Support with testing very appreciated! =20 >=20 > FWIW I tested this now on a device using DMA for the transfers > and everything works fine like before. Thanks for spending time reviewing and testing! Best regards, Nam