From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DF92CEDD95 for ; Wed, 9 Oct 2024 13:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9HUSkV6NXADMt8Ix4tGsmYgWnPjL3w/ngKBf8YLKI10=; b=baYHWp+/sDO6Q5plYFoZwX+Mnj hD1jCjurheabXH3uwBzPEjDa/bhrmfM7viYB32h8xMrw685F4Ih4oEBopEaykMTx9WUSEcvXGzWBl J7LVuuqioEf4E1q4gzPqwGM3nroZghEtTPztPZTcgcBjFQfF2kSzZp3OmbG4q7fIyOphheA89YE5F EL6CdQKq5ZAB0SBsVLMHGQoA81J9z5DteKFFH50++Yp2tR9llAgz3IA0JKzqkRwHNPMpUIpvoauGq sF4Hewu4i0NlR0aKAN2SEkoV4scDo6KOT31twFY1awmJB3JvYVVDraKqUP/ZzQvlhvo67MdlcEzUy W9Vns9Mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syX2x-00000009T8K-1wIO; Wed, 09 Oct 2024 13:48:11 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syX1c-00000009SwK-2snO for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 13:46:50 +0000 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 A6E92FEC; Wed, 9 Oct 2024 06:47:15 -0700 (PDT) Received: from bogus (e133711.arm.com [10.1.196.77]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5F65F3F58B; Wed, 9 Oct 2024 06:46:44 -0700 (PDT) Date: Wed, 9 Oct 2024 14:46:42 +0100 From: Sudeep Holla To: Sibi Sankar Cc: , , , , , , , , , , , , "Johan Hovold" Subject: Re: [PATCH V3 1/4] firmware: arm_scmi: Ensure that the message-id supports fastchannel Message-ID: References: <20241007060642.1978049-1-quic_sibis@quicinc.com> <20241007060642.1978049-2-quic_sibis@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241007060642.1978049-2-quic_sibis@quicinc.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_064648_790743_63F1053E X-CRM114-Status: GOOD ( 15.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 07, 2024 at 11:36:39AM +0530, Sibi Sankar wrote: > Currently the perf and powercap protocol relies on the protocol domain > attributes, which just ensures that one fastchannel per domain, before > instantiating fastchannels for all possible message-ids. Fix this by > ensuring that each message-id supports fastchannel before initialization. > Looks good to me. With the minor nit below addressed, Reviewed-by: Sudeep Holla (assuming you will take this all via pmdomain or qcom soc tree) > Reported-by: Johan Hovold > Closes: https://lore.kernel.org/lkml/ZoQjAWse2YxwyRJv@hovoldconsulting.com/ > Fixes: 6f9ea4dabd2d ("firmware: arm_scmi: Generalize the fast channel support") > Signed-off-by: Sibi Sankar > --- > drivers/firmware/arm_scmi/driver.c | 9 +++++++++ > drivers/firmware/arm_scmi/protocols.h | 2 ++ > 2 files changed, 11 insertions(+) > > diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c > index 88c5c4ff4bb6..80a9a615672a 100644 > --- a/drivers/firmware/arm_scmi/driver.c > +++ b/drivers/firmware/arm_scmi/driver.c > @@ -56,6 +56,9 @@ static atomic_t transfer_last_id; > > static struct dentry *scmi_top_dentry; > > +static int scmi_protocol_msg_check(const struct scmi_protocol_handle *ph, > + u32 message_id, u32 *attributes); > I prefer to just move the function above if possible to avoid this extra declaration just keep keep it consistent with other such internal/static function calls within this file. No hard opinion, just preference to avoid me thinking(or scratching my head) why only this is done different few months down the line. -- Regards, Sudeep