Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp768381rdb; Fri, 2 Feb 2024 03:37:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHr3CKNlaNL6SNWsJk5Ltq9sfH27fFGyC6/UwHKsqQZIJewUQ1mWq+6hB1crZaWkTogpxA X-Received: by 2002:a17:902:6bcc:b0:1d8:c767:d82d with SMTP id m12-20020a1709026bcc00b001d8c767d82dmr2366036plt.17.1706873826656; Fri, 02 Feb 2024 03:37:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706873826; cv=pass; d=google.com; s=arc-20160816; b=SgczXKGo9pxjw7ZLRgtsCoWKiNdyK6P2kgoR/BEkOqBrBODs9MfcI6Vsn0rei38udr Ae+0EUxQzqZ6Y+vyEfa10sbGH+Zq7peERlFLXk2LorhFvBFAnEe5guIJfDRcRiJDdfCN mL5he0gliixIhBmugzuRp7T9OraVaauL+Qc0fL5bq2Hd7gBXxpr7KGkCPIoOTJ8jJMRS 95AAcfoTXQBBb/XHMheBjpEGYGoyKWuOmLNebdivsvUq4RanSVEDp2F58u8gO2N23NJx bLVwXiT56JHUE7Q/EdggtCvGzFmido7yUqYd4ZD0DocK+vNSKeyCluKEgfaLi9F6QC88 qQGQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=WB/yjFsFNiE/ioDYOhDgHz8gTUHdB8MHxMJNuow7QYE=; fh=n/UChyMnFiMJiS3Yj81LP2xyP6op10FJw0X0uXqlip8=; b=AyLgYRGWob0Llae9AU9TLDu0rCooDXwnG6sIllw9wbSGOI/hV9xWPp5gAk3oZ+haMn gXHqqXunNmUb+JOekLmyxkJLBD0J2ZeSBpGUj7wr7EnHOAf3fR5JunLcO7dLgpGf7v2w rYG8rJ5Z494UlKTiQGWiKQPzn1/ItHYJwgZ8ANXj3TWRDE8rgTZ4hlOLzDYXP0jG88Kn cn1cW+SOfStToLapJjsZP3fki5KROtcbLinMEllkNiXwiSTkXCC1hzk3gnb4nXBmnZWD jvZRNvUCXIb8Ec8Fq64jEn/CrjWGZ0yGf05PQfXlMfDgbYSiMBYTH8bSlCpnhccG9JX9 MPKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-49716-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49716-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=1; AJvYcCUSSq1xclHSv0c7FauW7d6HY5PKNunahOjB28rDrgb0gcMFPkhRgh8PXRAxe4IRSLIYMB2MnfOPu3NeGdrHLyvUNOjE0zHvZ/TouDAqkA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id j12-20020a170903024c00b001d741dd5848si1661979plh.140.2024.02.02.03.37.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 03:37:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49716-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-49716-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49716-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DE187B2A56E for ; Fri, 2 Feb 2024 10:59:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4953C13E209; Fri, 2 Feb 2024 10:56:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 594C7199C7 for ; Fri, 2 Feb 2024 10:56:55 +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=1706871417; cv=none; b=OkUa3/AtYCewLj4vsIIwvKOKsVO5TWcGJD4a+xGTPjbHP+jgmQb1zB3vyKaRTG3q1n3wJkQArjG87/7OplkBdIXV3wZoFO4n3qYdnwAIspCPeKt45Xx4kuu2SkswWdbB5wAesE8mBB03y/3YyV3uDqsWjyVzpCDMf42aRzpoaQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706871417; c=relaxed/simple; bh=UhmxrKkpaIwAPkg2ey4m3RwDio87j4qiq2Bw8ceoDqo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AxxRkoq+Ol1YzY/btvMBErS7WFqOURK8u2HyKARHphniFSUyuFgRRKqJos/doWnYZx2k94WRRxS7eAS2DYiAaplIWl3aVBOkVH9HzzjKz6cxtsWi21pXcicRfEys8BX05YHsOeVh9tV1jLa8+Hyee20xUyTeTlsbn+dLYMcaQag= 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 E2B1EDA7; Fri, 2 Feb 2024 02:57:36 -0800 (PST) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1895D3F738; Fri, 2 Feb 2024 02:56:52 -0800 (PST) Date: Fri, 2 Feb 2024 10:56:50 +0000 From: Cristian Marussi To: Pin-Chuan Liu Cc: Sudeep Holla , Matthias Brugger , AngeloGioacchino Del Regno , wsd_upstream@mediatek.com, cylen.yao@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2] firmware: arm_scmi: Avoid to call mbox_client_txdone on txdone_irq mode Message-ID: References: <20240201095754.25374-1-flash.liu@mediatek.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: <20240201095754.25374-1-flash.liu@mediatek.com> On Thu, Feb 01, 2024 at 05:57:52PM +0800, Pin-Chuan Liu wrote: > On txdone_irq mode, tx_tick is done from mbox_chan_txdone. > Calling to mbox_client_txdone could get error message > and return directly, add a check to avoid this. > > Signed-off-by: Pin-Chuan Liu Hi Pin-Chuan, thanks for this, it was indeed sort of on my todo-list too, to allow MHUs equipped with Tx-Ack IRQ to work with SCMI. Having said that, this looks good to me in general, my only pain points are: the fact that we have to peek into the controller structures to know how it is configured, BUT I wouldn't know how to do it in any other way in fact as pof now...; and the fact that there is a constant runtime conditional check for each message sent even though the tx_ack irq presence can be detected once for all at setup time, BUT even this is not easily solvable as of now in the SCMI stack. So, after all of this babbling of mine, I would say that your patch is fine as it is, also because it is easy to backport; next week when I am back I'll give it a go on a couple of platforms and get back to you with a proper review/test. Thanks again ! Cristian