Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5672909rdb; Wed, 13 Dec 2023 16:19:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8Tip2U7mYN7uY35rTHPbj5Yk4++vNUGOY3Mr27617CvF8J8l0JcBBVyAtQsplmNw2Try4 X-Received: by 2002:a17:90a:c798:b0:28a:ecad:25a2 with SMTP id gn24-20020a17090ac79800b0028aecad25a2mr781969pjb.58.1702513170214; Wed, 13 Dec 2023 16:19:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702513170; cv=none; d=google.com; s=arc-20160816; b=R+cn+nTU4pf3ell0GN4YfhQEa+f5E389Fj4EFcY6c2vrvwRdRsN47heY3HHoDpssll WnbV44qFtu7GlHyID9QVH207UXs5PkfVraoAT7GIlA5f/T+lm/O4nDHqpttRJaSMGjkq p+LR6Szxn4jijrI/zPWvWYs7I6N3Yx8lhZTtL9M3Ot2Au5mIsywmkTghEud4MAnmp8i0 F7ckxZcN0crCYSkPEBFzZ3yX+SHh/DhAqXk2mUZWsdcE+FVNb7tUgPUVbQFn5kG8WFk8 lXd4VvGA5q/8x+ENOlHAH8hQIW2OV55JlOFhlsEpotWuwycPACTmlUTfVDea4Kc5GIIt AFtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GrLd2F+/MsaeKRGUaAfFVP8pa0yNcQOUMwc1iB1Wr8I=; fh=+NDfU1qjud6rX9mya66FwLR1tHCiFHUB61r4SBMJh5w=; b=vZyVjBeEabk61O/VJtWQADQrY3G1F7B1rqqjQvxCstap4/ITj+DXjlF7pQvb+Lqoij hne/5zlcbUYeNE5Y6GDvKcIkXQhJf3/7QAxD7CLdOl+GGtk59MuQJvL1qqpZW4/D3x5o nwDLntECXXzfyFEBs0tcovB4fq40rkohB7NrAXby+pnvjnwR3lIBM6byqw+sC7i82X/r ULatBvFCIUt0fxEPJO75oaHOXKIqwZ8juXpm0Ck/+tmdCQJYMODEtDgcbQ7aOZJdDJ0f M7fNGsg7QDzXtzIVLOrqCy6yo3PZNMEMAAy+ajFk4iDYqyJ9k1eQSUQUny/ufDPV2qeX CYQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H69dHvKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id cu12-20020a17090afa8c00b0028af67606aesi953669pjb.173.2023.12.13.16.19.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 16:19:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H69dHvKH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7708A82BB1B6; Wed, 13 Dec 2023 16:19:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442807AbjLNATN (ORCPT + 99 others); Wed, 13 Dec 2023 19:19:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234108AbjLNATL (ORCPT ); Wed, 13 Dec 2023 19:19:11 -0500 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F36210E for ; Wed, 13 Dec 2023 16:19:17 -0800 (PST) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5e36848f6c6so3131277b3.1 for ; Wed, 13 Dec 2023 16:19:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702513156; x=1703117956; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GrLd2F+/MsaeKRGUaAfFVP8pa0yNcQOUMwc1iB1Wr8I=; b=H69dHvKH0e5m7hgm0/xCZ4a38VG0f7AHmgm6zCdfFrhWTBXYoy+hZAmyBJGjwJG2yv l56vfVk983Y3EiszCzlxLUrkLsGT34Q5lzh0rbeT2NhWR58BJlLnzrox5/A02r9Hfchc Lz7JqLQG5675qOQqYWQgtfpyobvKuABRUMi319KHSMteOGYK0kK+70BjTQ+eb4KdIRDA yVUKSyxhp0Ud8i4vr3ax6JvzCC2G/EKlPliqF4WpTGshHrny9UPV71LSkpoHqF3gjexB 6nnAsu9+W9CrG24N/NnYAFor2jpViSnPLJl9ipY8nAHTenLVoLJownZ3roFt7bGDgFt4 O7Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702513156; x=1703117956; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GrLd2F+/MsaeKRGUaAfFVP8pa0yNcQOUMwc1iB1Wr8I=; b=gYPkE9Zb8Vul16a34J8DIkryIQJ6wEOceHckqjjjIZ2OHL6xscmfqmVwaKQ0elBDr9 DvL3AwBzf/mhuuW114ekZlD1zDfDoQ8Hr6UQ+/sTRI6Beu/yb0ZKf31fgShHYdG/dgLm M71TqwKPjnkFbDD8SpC3F2Rnj0IXsIAU7RJDTb/Sj/mQvoYbHVX4xOuzTEciDNxWatB6 rYFD2NcrRHslYJkrIqdhsSssHeBgDVA532VGwVHoKS04ZxKGdGrQL4UhfYvxu2ZKnII6 fRLNPO2jKgAswN4lG6IByjuNN1ljy53ZbN2slY1hW/TvIsijoYUJoiGzOAGuEgykFmhk 4K8w== X-Gm-Message-State: AOJu0YzkQRqdEp7fHmlnfjHrzweaGOz6zSGV5DAowXeUbeNDvXX4MqI+ sGn0Zt/dsm2B8BS3uF63pEY9OJZDY8mwv+CjIjMVtQ== X-Received: by 2002:a0d:dc81:0:b0:5d1:430e:4b6f with SMTP id f123-20020a0ddc81000000b005d1430e4b6fmr6592283ywe.9.1702513156546; Wed, 13 Dec 2023 16:19:16 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Linus Walleij Date: Thu, 14 Dec 2023 01:19:04 +0100 Message-ID: Subject: Re: [PATCH v2 2/2] spi: spl022: switch to use default spi_transfer_one_message() To: Nam Cao Cc: broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Wed, 13 Dec 2023 16:19:27 -0800 (PST) On Wed, Nov 29, 2023 at 5:32=E2=80=AFPM Nam Cao wrot= e: > 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:1= 428 > > 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! FWIW I tested this now on a device using DMA for the transfers and everything works fine like before. Yours, Linus Walleij