From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C235232A3EB for ; Mon, 8 Dec 2025 06:51:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765176682; cv=none; b=WTR0mKKJmf1cpafvOMFGSZWNPxciFlaFxL42azWskeKPA1KQSCkOz3G1R0elSjq2rWowN7uWtRhRecxLYiGtZEfZ3uaKqZDgPQaT7QdXckG8FcZVzRDNLehPv9oea8Q4a9hADMubMU2MsKKAzaOVjDxxJ36OGC12Q7QxShPMLWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765176682; c=relaxed/simple; bh=f9VlFWzR23xOosEi/Kmhd563+yiFXT0vJ2QhMLbBXc8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=plJeUaJHkIjqJBSbzzvxdfKAkrNA7CcAoKujApEG9t5WZc2AbFKgy9FeZqjnRO2e4i03FAE20YBIn70Ey25zFUPychsCj4cpZBj/p4PC99CC8l30r+c0oq52mLuvMVbHJiOhc6iNSvYpwspIrj/RQZTUe3z7NbIzKQqJ2crWbH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=eLx1oi2g; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joonwonkang.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="eLx1oi2g" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-29848363458so86367325ad.2 for ; Sun, 07 Dec 2025 22:51:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765176679; x=1765781479; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=f9VlFWzR23xOosEi/Kmhd563+yiFXT0vJ2QhMLbBXc8=; b=eLx1oi2gt2RhFWyi/3RoIDNbGIn2v+UDIYssHA2Jel2dbumAKyTjcWcJ728yC+Sc3c N1BAl1ZE8fMSjVXYnc+M75xMSLtCk3OjXoys6qAz6UTUHt6hTsFp2JXg89npeGg8pDkr ldPpUu5qaqibfgdzmvD50ABem422Fl88REoDQpeCsQUxHOhXXOmlcfxt1Dk5IITa1Z9p MGutsUm9FpWdiCzgnWRSj7R/S1u3NPzdhvc4Qi9mgBGnOc9nWtqqhsgQWHPmDiFcpb2h cA9Ogyx03yv8PIpPhA/Q7uDTRkkxb8mvFAkSTsagMTTVefNMCddY5CUBwrICv7RJWcsY NjTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765176679; x=1765781479; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=f9VlFWzR23xOosEi/Kmhd563+yiFXT0vJ2QhMLbBXc8=; b=QpcJJ6OwARazPOdwLNqsL/firNXpOphabChXQbCiazLOidF9aOQyM+igDXBbgiRb1j CmwT6tJ+S0woBO9TZnGMSDPsgJnHimgsbnSTjrTSXem4UY5PurdFF2R7ZAuy2EYJ+Aq9 9xRjspYkp/jdbSIRf7RAkJGlabA0vGRIuvvLqCzvMz4aWQ6zZ0LqxxVBccc3DXlaQzHu SspwXHWnTe8zLFueUYMfnxhNjQTnFyfO5gjVrZmvSqVZSEhHV4lbuZ+heMH9bnd3Lcsh 7LzWvI4fRabLtNBbknEeHGcpkHA+C7yyPfkvuc4dcFAnUlnh3XpcVWhV900/gWbZuA+K Blag== X-Forwarded-Encrypted: i=1; AJvYcCXqwq/ZuCtMYZvAiKbQdxd9ldNSlgJ2CkPaxTHZruqDdhP9qwhfBk9HjbOVYyocQN33caWt+WLr3QNdB/k=@vger.kernel.org X-Gm-Message-State: AOJu0YydnyTBfjl2SVBIzJcx1hKAxvNmm6j5jKUcqTMaq0uLfFa2LK0v aUED1iRXPzGkdIxrfXIHBEy4HYskT4dDRj+6/13JWocVJpM2nuGrbdwPWJGwEaiqkgsBQK/ngdB iDkLt1TFA+XqaMRVrqlrkKfkdZg== X-Google-Smtp-Source: AGHT+IFsi5ZTs0kEXoqbCCwZsWqOTsnoprsg90YxJJzwfDMGshmyjBB5rZ6jaeZ93YLGdWpDvXjwgKakWKJmHZOSuA== X-Received: from pldb3.prod.google.com ([2002:a17:902:ed03:b0:290:95df:d050]) (user=joonwonkang job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:d506:b0:297:dfb5:5b90 with SMTP id d9443c01a7336-29df5de3e32mr60455755ad.28.1765176679476; Sun, 07 Dec 2025 22:51:19 -0800 (PST) Date: Mon, 8 Dec 2025 06:51:15 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: X-Mailer: git-send-email 2.52.0.223.gf5cc29aaa4-goog Message-ID: <20251208065117.1664403-1-joonwonkang@google.com> Subject: Re: [PATCH] mailbox: Allow NULL message sending From: Joonwon Kang To: jassisinghbrar@gmail.com Cc: jonathanh@nvidia.com, joonwonkang@google.com, linux-kernel@vger.kernel.org, sudeep.holla@arm.com, thierry.reding@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 3, 2025 at 11:57=E2=80=AFPM Joonwon Kang wrote: > > > > On Tue, Nov 25, 2025 at 11:00=E2=80=AFPM Joonwon Kang wrote: > > > > > > > > Clients may want to send interrupt only without any useful message > > > > involved. Since the current mailbox framework does not allow NULL > > > > message sending(although it allows receiving it), the clients shoul= d > > > > allocate a dummy message buffer and pretend sending it. Besides, if > > > > the mailbox controller calls `mbox_chan_txdone()` when the client > > > > drivers happen to send NULL message anyway, it will result in unexp= ected > > > > results by making the tx status messed up. This commit lifts the > > > > limitation and allows the clients to send interrupt only without an= y > > > > message buffer allocated. > > > > > > > Interrupts without data messages are called 'doorbells' and we alread= y > > > support them. > > > thanks > > > > I am not sure if it is already supported. Let me draw two cases which i= mply > > that it is not supported. If the cases make sense, could you reconsider= the > > patch? If it is supported in another branch, could you refer me to that > > branch? I am currently referring to the `for-next` branch of your mailb= ox > > repo. > > > I believe you are talking about some hypothetical situation? > Otherwise, which controller is that? > A controller driver is supposed to either expect data or not, but not bot= h. I did not notice this controller's expectation since I could not find this = info in the API doc. So, now I believe that Case 2 could be seen as a hypothetic= al situation. However, what about Case 1? If the message to send is NULL, `chan->cl->tx_done(chan->cl, mssg, r)` and `complete(&chan->tx_complete)` w= ill **never** be called from `tx_tick()`. It also means that there is no way fo= r a client to know that the sending is really done or not. Even though a contro= ller driver(I mean any typical controller, not a specific controller) calls `mbox_chan_txdone()` after receiving the corresponding ACK interrupt from t= he remote to the previously sent NULL message, the client will be blocking not knowing the sending is done. Thanks.