Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp637333lqo; Wed, 8 May 2024 10:04:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWXsZkqnN/c1rGQThCTlYYsggNKyVjymRy1fPNarMRwMnoPi/y6NuaXP+dFhvllazM6de4ruFlqeh5B/s0cFOBLimIjhai5g5bRa7d8Zw== X-Google-Smtp-Source: AGHT+IHm0s1BvLsW9Vkqa4v50XHwHyTwxnRTxCKceAjpMCSDvkSuAQggeJyz+ATUwY9WwYVQlxEF X-Received: by 2002:a17:906:5054:b0:a59:8786:3850 with SMTP id a640c23a62f3a-a59fb9e720emr185901766b.72.1715187856428; Wed, 08 May 2024 10:04:16 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bt10-20020a170906b14a00b00a51d6079479si7231903ejb.452.2024.05.08.10.04.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 10:04:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-173591-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173591-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 29D041F22D70 for ; Wed, 8 May 2024 17:04:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A38F22E401; Wed, 8 May 2024 17:04:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C753110953; Wed, 8 May 2024 17:04:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715187848; cv=none; b=frwAoQn2QpArtI/+dqJJa4fRI2GhqGw9mm2fEqCYfrFf7uCowtH6FItBD/bQeeKewKHt14wpbhnvITCdqLtD4h6XgfkflW5FSzOr2PIa0pkbHBcq40h6vZ/VPIK/7FFTumrV/1BUOfHilBSiDADqJW88cGpsa/QEWmJgHV1tKxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715187848; c=relaxed/simple; bh=Wd3/Y3zb9sUUd0CcUKaAZJQE1xBqGNz2sOTMRrUHTCc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dk3+HSBgVW2m+mQnLZHst7OaxxmuOdw8djU/CtpL33E7qvyQcAdeLHMHHTqk8AJk+1NNMJPEvga3ZBGRH+8sKUxr/WcQ7oE8A1wc8nftDPc31phHLOOGMjpElnwj7HD2jDcmUPz6odYDgC6cKp3LnOPLuFme78cCUj43xm5tSl4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 856B81007; Wed, 8 May 2024 10:04:30 -0700 (PDT) Received: from pluto (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4B8933F6A8; Wed, 8 May 2024 10:04:03 -0700 (PDT) Date: Wed, 8 May 2024 18:04:00 +0100 From: Cristian Marussi To: "Peng Fan (OSS)" Cc: Sudeep Holla , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [PATCH 0/2] firmware: arm_scmi: add notification completion channel Message-ID: References: <20240507-scmi-notify-v1-0-1fdefc984d53@nxp.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240507-scmi-notify-v1-0-1fdefc984d53@nxp.com> On Tue, May 07, 2024 at 11:34:59PM +0800, Peng Fan (OSS) wrote: > Per spec: Hi Peng, thanks for doing this. > Completion interrupts This transport supports polling or interrupt driven > modes of communication. In interrupt mode, when the callee completes > processing a message, it raises an interrupt to the caller. Hardware > support for completion interrupts is optional. > > i.MX95 SCMI firmware is fully interrupt driven, so Platform expects > completion interrupt for Platform to Agent(P2A) notifictions. > > Add another optional mailbox channel for Agent to notify Platform that > notification message has been accepted > > After notification channel status become freed, Agent will use the > new mailbox channel to send completion interrupt to Platform. > > Add shmem_channel_intr_enabled to check channel flags. Glancing through the series I think the bindings and the code are quite good and sensible to achieve the addition of the optional P2A completion interrupt. Your current solution, though, addresses only the case of a mailbox controller providing unidirectional channels. (which I suppose is the one you are using on your platform) We should take care to add such optional P2A completion interrupt support also for the case of mailboxes sporting bidirectional channels. For bidirectional channels we really have already the needed bindings... ..no changes there...you have just to also ring the doorbell on that same P2A if completion IRQs are requested. IOW, when the DT description is made by 2 mboxes + 2 shmem, means we have both A2P and P2A provided via bidirectional channels...we currently just use the P2A (RX) channel to receive notifs/dresp via rx_callback (so using only the platform_to_agent direction)...now we should also ring the P2A doorbell on the existing P2A channel if the FLAG_INTR_ENABLED is set to signal the completion interrupt on the other direction (agent_to_platform) Not sure if I have been clear or make it worst with my explanation :P Thanks, Cristian