Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4592824rdh; Wed, 29 Nov 2023 05:58:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGjYROhF3DT6ovh8THcEf1JOIW+yT+dk+JBtHhiaJFbPFMtyXrulOLGCV1oj+fL2VQGhkwQ X-Received: by 2002:a05:6808:1211:b0:3b8:3fce:5fc3 with SMTP id a17-20020a056808121100b003b83fce5fc3mr25247799oil.33.1701266318115; Wed, 29 Nov 2023 05:58:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701266318; cv=none; d=google.com; s=arc-20160816; b=c0FM8/dN4ljhRfz7jgpc8UPMcoRxoqSUUbYmHZBF0IVBC5orLG5ufy8qh5DivfajtI kHI6Drq4wAlXOLs9CoEc1AlzwYxy8jPOZbo8DY2lpyb/BVvAXGlMXjWkYOatjvXaoYcr 1gtWbuJ25bEq3gD+do6dLNj8wVleGMlyr1jAUdnbg+YyOAFwOonNe57DS3WTA4GgNYsT yFzV6Q7pSYp8ooV6FAQIWsm/DCFUw3k4qQNcx3jKFNUBZwaCoWzWtpaqOR7ab7ldRAK7 LSYBWn+T/U9tApqyPQ35luTUT4bgxGMHnKpetoOuDjF0iLfIg0Ew6iP6nl5kNKK1d9AW YjuQ== 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=ZfTfdXTp+yMT3mYQewRUIosVebrHQ8SQKCMMMwY3nr0=; fh=+NDfU1qjud6rX9mya66FwLR1tHCiFHUB61r4SBMJh5w=; b=v89dsGM/aQY8/gG6boub/VRyKiWBzfwnQGiLJ9cgiUuG8VBuwruWsKY2ndCTpXbLNe eYhJnlfTXgYQj5qjfE4+GVOHRomY2XzU2H1+gNd4emv3aA0YXVa6ut8Me/ZRIjVttl3K R/yXrrgAoWh00M7Y6QiyyMZ3U75VqvndpqJDu0UlrSihFnv9R858vz8G6I2poTpk2WAX XJgJMZc//rQs/eeX0oBlYiNywODujmRK+GWe2iIo0gQE65BaFFQOz1Vgkli65WYVY8hS zRIgPbWXzW92QK+YaagnsR5ZZjF6qTGOkPFuTZOH+SpBoVce7Fu5IA9cj6jXohxAwKn5 ZVtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z3M0hUNQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id e38-20020a631e26000000b005c5e2488c32si4309024pge.405.2023.11.29.05.58.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 05:58:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z3M0hUNQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 91AEF80AEFBF; Wed, 29 Nov 2023 05:58:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234434AbjK2N6R (ORCPT + 99 others); Wed, 29 Nov 2023 08:58:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230472AbjK2N6Q (ORCPT ); Wed, 29 Nov 2023 08:58:16 -0500 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9890BCA for ; Wed, 29 Nov 2023 05:58:22 -0800 (PST) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-5cc86fcea4fso57358517b3.3 for ; Wed, 29 Nov 2023 05:58:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701266302; x=1701871102; 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=ZfTfdXTp+yMT3mYQewRUIosVebrHQ8SQKCMMMwY3nr0=; b=z3M0hUNQgYZr38qfMjlSGmP74m/oqc6tZo4qCv3RdIpA7xLojpWxhx3/6tfsLpfNCQ 7ijR6WjbH4+Ic3PDEs7xZMZf32G3xx7qypJ89O0vCd6YU9ORk2KMU3czjtMyz7F1AKDo 9JZ0cdUm4D5nVGkq96XbTuO+/7FlwMHWVk2nSi1XEwMMa/a7f4HNCYcc9sZrfeewmIEX wSBMvV5eU026ypkfrarOsc6fcBUrULdAxUbkeP13QtGrYDeBPfTnAHZz5lDo3sxnbPBc VIWx8tOS6s9yLlHydw1ZP0inxIvE2c/GpOU65rLHlwZto5mAzrnhpY/O3Iu/oy1Rm7/n z34g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701266302; x=1701871102; 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=ZfTfdXTp+yMT3mYQewRUIosVebrHQ8SQKCMMMwY3nr0=; b=G/TRLATQB4IQrff7bjmBPxHsR2dbFT8r/s8Pzv3gzyKCk3Ds22AMW5nM3F6g9ZWsN8 HQAQ9nICCbC2vGPHm9+df0W27cz1O96TZl+NFtDrDCkli9BblG+1McmXkfAS5Vsrge8u HpY9l5DBuCqr/y1mZHM2lmQTCsmAvnf35c/PzcRLex01bbrO2GcbnphiQ+g7wwP/GJm6 BPatDwOqccMs7JUj2qHYp5nDKl37zzN6mzn0Gfd0GaDQWpsK27HLzD5qNVn6vhooyUC0 1BsLS/QccKdQ5bMBXLCL8j0M8tkSBkVvmwSR3ExirtYZrHdkQz9VhexMj+SqsIdX2c2y esog== X-Gm-Message-State: AOJu0YxZa0zsh1TIMZGHWy2YVFVibfh561ei/N+tUYxHAPI0cDqzNDhh fVkpxkJOGki5nfSdIDYjobbJTDHwNUqSrTzacTjGWg== X-Received: by 2002:a81:4322:0:b0:5d1:d1de:e8eb with SMTP id q34-20020a814322000000b005d1d1dee8ebmr4699621ywa.18.1701266301817; Wed, 29 Nov 2023 05:58:21 -0800 (PST) MIME-Version: 1.0 References: <4a0aa2f626f5f6e5509f9d0d64345fc8fe3b34d9.1701264413.git.namcao@linutronix.de> In-Reply-To: <4a0aa2f626f5f6e5509f9d0d64345fc8fe3b34d9.1701264413.git.namcao@linutronix.de> From: Linus Walleij Date: Wed, 29 Nov 2023 14:58:10 +0100 Message-ID: Subject: Re: [PATCH 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 fry.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 (fry.vger.email [0.0.0.0]); Wed, 29 Nov 2023 05:58:35 -0800 (PST) On Wed, Nov 29, 2023 at 2: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 > --- > Tested with polling mode and interrupt mode, NOT with DMA mode. > Support with testing very appreciated! Oh this is great! Because I think Mark started nagging me something like 10 years ago to fix this in this driver... I have a device using DMA mode, I will dig it out and make sure to get this tested ASAP, in the meantime: Reviewed-by: Linus Walleij Yours, Linus Walleij