Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1051699iob; Fri, 13 May 2022 21:10:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTUe5aNNWn5nLiY9Fd/9SVjZYhhQudzU7EoryHFHpozBS2NSROf8W1DeZOGBfrz8vGaosI X-Received: by 2002:a5d:47c9:0:b0:20c:80bb:a296 with SMTP id o9-20020a5d47c9000000b0020c80bba296mr6144405wrc.384.1652501449141; Fri, 13 May 2022 21:10:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652501449; cv=none; d=google.com; s=arc-20160816; b=HFer/Jyrimt26CVcuj/1Q3+n91BeMLgLuPfAAUkeQDI3ZwWC3gJ62aMJP4OQ+YIStb MVV/tTSia5mvlq7ECP+NjcUhFA5wc9heI24tjhKEfJnty5gWjkl2ZV86PASP3M0fiMHf lFUwhPG+PGUFpSKd35kts6QfVX8P2wT/vGS8OCa388mqbljQ+q9qZ08P8PtcFLKp7FTy Zge3CR1J/pP9Ws/R+51afSm/jY9snu3H7Pbmou2mKlyEOxKfRlEpDKozQt8Xpd3p7YZ4 4bH2hyN6bApZOFbnjmHvGxmj0LfP/fcpCpikJcLmAATG8kv8HQwyXSf7ZS10If+Pr4Og 24NA== 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=M7ZsqWNyJ7Mju2d6fJaAbLsgXSka5FqfedSemrMfuXs=; b=T8KZsZWUZmoLqs+mm7FJ1qHYwvxPmhIxyg8awwZrxlK9iMlVFnigqZRQ3wE0kth/bF 7bdvkOuB6x+cIZaQb62EDsPdHqQtHoTWS685/Flnsr2kYoV0fn6XWQiuhlc1a2CILAj0 WyXPwqAiMj1LXjULGK/KlwQWhWpZPTHgAfxC9KUY2+tTBclNR16aRmDBNHiACM+V78Ek w9zzryl/zu7Zs3Njz018MlYpl5xTAJBpSE2K+nQNPPMS/EELlXLzh0aEfMjxE+NnNAlV gnhPKSXDiGQMwC1m+FZDHWwOITu/ARkkazXNW8aCF6ETpc5T8uN0DogdhEVfRBriTOtl sDLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O3D+iKn1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q3-20020a5d6583000000b0020adeabec43si3995420wru.157.2022.05.13.21.10.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 21:10:49 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=O3D+iKn1; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5F04C4D3B2B; Fri, 13 May 2022 17:42:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378297AbiEMSKY (ORCPT + 99 others); Fri, 13 May 2022 14:10:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244159AbiEMSKX (ORCPT ); Fri, 13 May 2022 14:10:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3B325253D; Fri, 13 May 2022 11:10:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6DB17B83029; Fri, 13 May 2022 18:10:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E4F1C34100; Fri, 13 May 2022 18:10:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652465418; bh=QVFRHciwVHsT/StrKZNZPPyBLNp0Pv3TiO/oD8UrSLo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O3D+iKn1wRG3Mgt93Dx8a0sfe8hCyc4kqJHi25y9xPg88/MH4jTk1xPdjsZywacre ly7tUzk0m7KNEpK9Fu460QX4M6OoSKHbnQw1zz1dAl6lhmdGzSgmzQOYpy2L5kczqp akHofx0s9JBZs/rJkPGqlz9MRNFezD2tRvxj5z1cemyP/y2ytFsdrRHrrl4ZoaACia 9l0jCg8Rjjego6i1/espF8Dy4n4pnw9GqpAuSPtQ2pxt8A732G7c/AXVJt+qMyQwDg vBtDNXLwwkpQKIER6eqFbfSJam6qdBCM43entSW918d5wJ1LlfQIgWuz6MiUMdcddk G9pzrRPVEaMDg== Date: Fri, 13 May 2022 21:08:48 +0300 From: Jarkko Sakkinen To: Lino Sanfilippo Cc: peterhuewe@gmx.de, jgg@ziepe.ca, stefanb@linux.vnet.ibm.com, linux@mniewoehner.de, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: Re: [PATCH v4 1/6] tpm, tpm_tis_spi: Request threaded irq Message-ID: References: <20220509080559.4381-1-LinoSanfilippo@gmx.de> <20220509080559.4381-2-LinoSanfilippo@gmx.de> <486cec01-ec02-3f11-0b81-037e0700c503@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <486cec01-ec02-3f11-0b81-037e0700c503@gmx.de> X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 11, 2022 at 09:18:39PM +0200, Lino Sanfilippo wrote: > Hi, > > On 11.05.22 at 13:22, Jarkko Sakkinen wrote: > > On Mon, May 09, 2022 at 10:05:54AM +0200, Lino Sanfilippo wrote: > >> From: Lino Sanfilippo > >> > >> Interrupt handling at least includes reading and writing the interrupt > >> status register within the interrupt routine. Since accesses over the SPI > >> bus are synchronized by a mutex, request a threaded interrupt handler to > >> ensure a sleepable context during interrupt processing. > >> > >> Fixes: 1a339b658d9d ("tpm_tis_spi: Pass the SPI IRQ down to the driver") > >> Signed-off-by: Lino Sanfilippo > > > > When you state that it needs a sleepable context, you should bring a > > context why it needs it. This not to disregard the code change overally but > > you cannot make even the most obvious claim without backing data. > > > > so what kind of backing data do you have in mind? Would it help to emphasize more > that the irq handler is running in hard irq context in the current code and thus > must not access registers over SPI since SPI uses a mutex (I consider it as basic > knowledge that a mutex must not be taken in hard irq context)? There's zero mention about specific lock you are talking about. Providing the basic knowledge what you are trying to do is the whole point of the commit message in the first place. I'd presume this patch is related to the use bus_lock_mutex but it is fully ingored here. BR, Jarkko