All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cristian Marussi <cristian.marussi@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com,
	Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com,
	etienne.carriere@linaro.org, vincent.guittot@linaro.org,
	daniel.lezcano@linaro.org, tarek.el-sherbiny@arm.com,
	adrian.slatineanu@arm.com, souvik.chakravarty@arm.com,
	wleavitt@marvell.com, wbartczak@marvell.com,
	Cristian Marussi <cristian.marussi@arm.com>
Subject: [PATCH v2 5/7] firmware: arm_scmi: Make use of FastChannels configurable
Date: Mon,  6 Jun 2022 11:02:28 +0100	[thread overview]
Message-ID: <20220606100230.3465828-6-cristian.marussi@arm.com> (raw)
In-Reply-To: <20220606100230.3465828-1-cristian.marussi@arm.com>

Add a Kernel configuration entry used to optionally disable the usage of
SCMI FastChannels even on platforms where they are available.

Make such option default-yes to preserve the original SCMI system behaviour
of using any available FC.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 drivers/firmware/arm_scmi/Kconfig    | 13 +++++++++++++
 drivers/firmware/arm_scmi/perf.c     |  3 ++-
 drivers/firmware/arm_scmi/powercap.c |  3 ++-
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
index 1e7b7fec97d9..624f32b61825 100644
--- a/drivers/firmware/arm_scmi/Kconfig
+++ b/drivers/firmware/arm_scmi/Kconfig
@@ -42,6 +42,19 @@ config ARM_SCMI_HAVE_MSG
 	  This declares whether a message passing based transport for SCMI is
 	  available.
 
+config ARM_SCMI_USE_FASTCHANNELS
+	bool "Use SCMI FastChannels when available"
+	default y
+	help
+	  Use SCMI FastChannels when advertised as available by the platform.
+
+	  On systems where the SCMI platform advertises the availability of
+	  FastChannels, supported SCMI commands can be issued triggering a
+	  one-way FastChannel request, much more quicker than using a
+	  regular SCMI message transfer.
+	  When set to N forces the OSPM to use instead regular SCMI message
+	  transfers even if FastChannels are available. If unsure say Y.
+
 config ARM_SCMI_TRANSPORT_MAILBOX
 	bool "SCMI transport based on Mailbox"
 	depends on MAILBOX
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index 587b334589b0..3c491b3aa0bd 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -820,7 +820,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
 		scmi_perf_domain_attributes_get(ph, domain, dom, version);
 		scmi_perf_describe_levels_get(ph, domain, dom);
 
-		if (dom->perf_fastchannels)
+		if (dom->perf_fastchannels &&
+		    IS_ENABLED(CONFIG_ARM_SCMI_USE_FASTCHANNELS))
 			scmi_perf_domain_init_fc(ph, domain, &dom->fc_info);
 	}
 
diff --git a/drivers/firmware/arm_scmi/powercap.c b/drivers/firmware/arm_scmi/powercap.c
index e9b4c34e1fb4..9e3a803d4f16 100644
--- a/drivers/firmware/arm_scmi/powercap.c
+++ b/drivers/firmware/arm_scmi/powercap.c
@@ -830,7 +830,8 @@ scmi_powercap_protocol_init(const struct scmi_protocol_handle *ph)
 		if (ret)
 			return ret;
 
-		if (pinfo->powercaps[domain].fastchannels)
+		if (pinfo->powercaps[domain].fastchannels &&
+		    IS_ENABLED(CONFIG_ARM_SCMI_USE_FASTCHANNELS))
 			scmi_powercap_domain_init_fc(ph, domain,
 						     &pinfo->powercaps[domain].fc_info);
 	}
-- 
2.32.0


WARNING: multiple messages have this Message-ID (diff)
From: Cristian Marussi <cristian.marussi@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: sudeep.holla@arm.com, james.quinlan@broadcom.com,
	Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com,
	etienne.carriere@linaro.org, vincent.guittot@linaro.org,
	daniel.lezcano@linaro.org, tarek.el-sherbiny@arm.com,
	adrian.slatineanu@arm.com, souvik.chakravarty@arm.com,
	wleavitt@marvell.com, wbartczak@marvell.com,
	Cristian Marussi <cristian.marussi@arm.com>
Subject: [PATCH v2 5/7] firmware: arm_scmi: Make use of FastChannels configurable
Date: Mon,  6 Jun 2022 11:02:28 +0100	[thread overview]
Message-ID: <20220606100230.3465828-6-cristian.marussi@arm.com> (raw)
In-Reply-To: <20220606100230.3465828-1-cristian.marussi@arm.com>

Add a Kernel configuration entry used to optionally disable the usage of
SCMI FastChannels even on platforms where they are available.

Make such option default-yes to preserve the original SCMI system behaviour
of using any available FC.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 drivers/firmware/arm_scmi/Kconfig    | 13 +++++++++++++
 drivers/firmware/arm_scmi/perf.c     |  3 ++-
 drivers/firmware/arm_scmi/powercap.c |  3 ++-
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/arm_scmi/Kconfig b/drivers/firmware/arm_scmi/Kconfig
index 1e7b7fec97d9..624f32b61825 100644
--- a/drivers/firmware/arm_scmi/Kconfig
+++ b/drivers/firmware/arm_scmi/Kconfig
@@ -42,6 +42,19 @@ config ARM_SCMI_HAVE_MSG
 	  This declares whether a message passing based transport for SCMI is
 	  available.
 
+config ARM_SCMI_USE_FASTCHANNELS
+	bool "Use SCMI FastChannels when available"
+	default y
+	help
+	  Use SCMI FastChannels when advertised as available by the platform.
+
+	  On systems where the SCMI platform advertises the availability of
+	  FastChannels, supported SCMI commands can be issued triggering a
+	  one-way FastChannel request, much more quicker than using a
+	  regular SCMI message transfer.
+	  When set to N forces the OSPM to use instead regular SCMI message
+	  transfers even if FastChannels are available. If unsure say Y.
+
 config ARM_SCMI_TRANSPORT_MAILBOX
 	bool "SCMI transport based on Mailbox"
 	depends on MAILBOX
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index 587b334589b0..3c491b3aa0bd 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -820,7 +820,8 @@ static int scmi_perf_protocol_init(const struct scmi_protocol_handle *ph)
 		scmi_perf_domain_attributes_get(ph, domain, dom, version);
 		scmi_perf_describe_levels_get(ph, domain, dom);
 
-		if (dom->perf_fastchannels)
+		if (dom->perf_fastchannels &&
+		    IS_ENABLED(CONFIG_ARM_SCMI_USE_FASTCHANNELS))
 			scmi_perf_domain_init_fc(ph, domain, &dom->fc_info);
 	}
 
diff --git a/drivers/firmware/arm_scmi/powercap.c b/drivers/firmware/arm_scmi/powercap.c
index e9b4c34e1fb4..9e3a803d4f16 100644
--- a/drivers/firmware/arm_scmi/powercap.c
+++ b/drivers/firmware/arm_scmi/powercap.c
@@ -830,7 +830,8 @@ scmi_powercap_protocol_init(const struct scmi_protocol_handle *ph)
 		if (ret)
 			return ret;
 
-		if (pinfo->powercaps[domain].fastchannels)
+		if (pinfo->powercaps[domain].fastchannels &&
+		    IS_ENABLED(CONFIG_ARM_SCMI_USE_FASTCHANNELS))
 			scmi_powercap_domain_init_fc(ph, domain,
 						     &pinfo->powercaps[domain].fc_info);
 	}
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-06-06 10:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 10:02 [PATCH v2 0/7] SCMIv3.1 Powercap protocol and driver Cristian Marussi
2022-06-06 10:02 ` Cristian Marussi
2022-06-06 10:02 ` [PATCH v2 1/7] dt-bindings: firmware: arm,scmi: Add powercap protocol Cristian Marussi
2022-06-06 10:02   ` Cristian Marussi
2022-06-06 10:02 ` [PATCH v2 2/7] firmware: arm_scmi: Add SCMIv3.1 Powercap protocol basic support Cristian Marussi
2022-06-06 10:02   ` Cristian Marussi
2022-06-06 10:02 ` [PATCH v2 3/7] firmware: arm_scmi: Generalize FastChannel support Cristian Marussi
2022-06-06 10:02   ` Cristian Marussi
2022-06-06 10:02 ` [PATCH v2 4/7] firmware: arm_scmi: Add SCMIv3.1 Powercap FastChannels support Cristian Marussi
2022-06-06 10:02   ` Cristian Marussi
2022-06-06 10:02 ` Cristian Marussi [this message]
2022-06-06 10:02   ` [PATCH v2 5/7] firmware: arm_scmi: Make use of FastChannels configurable Cristian Marussi
2022-06-06 15:04   ` Randy Dunlap
2022-06-06 15:04     ` Randy Dunlap
2022-06-06 10:02 ` [PATCH v2 6/7] firmware: arm_scmi: Add scmi_driver optional setup/teardown callbacks Cristian Marussi
2022-06-06 10:02   ` Cristian Marussi
2022-06-06 10:02 ` [PATCH v2 7/7] powercap: arm_scmi: Add SCMI Powercap based driver Cristian Marussi
2022-06-06 10:02   ` Cristian Marussi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220606100230.3465828-6-cristian.marussi@arm.com \
    --to=cristian.marussi@arm.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --cc=adrian.slatineanu@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=etienne.carriere@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=james.quinlan@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=souvik.chakravarty@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=tarek.el-sherbiny@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=wbartczak@marvell.com \
    --cc=wleavitt@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.