mirror of https://lore.kernel.org/lkml/
 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,
	souvik.chakravarty@arm.com, wleavitt@marvell.com,
	peter.hilber@opensynergy.com, nicola.mazzucato@arm.com,
	tarek.el-sherbiny@arm.com, cristian.marussi@arm.com
Subject: [PATCH v3 8/9] firmware: arm_scmi: Reject SCMI drivers while in Raw mode
Date: Sat,  3 Sep 2022 19:30:41 +0100	[thread overview]
Message-ID: <20220903183042.3913053-9-cristian.marussi@arm.com> (raw)
In-Reply-To: <20220903183042.3913053-1-cristian.marussi@arm.com>

Reject SCMI driver registration when SCMI Raw mode support is configured,
so as to avoid interferences between the SCMI Raw mode transactions and the
normal SCMI stack operations.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 drivers/firmware/arm_scmi/driver.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 056796b2dcae..78879e23fef8 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -2345,6 +2345,12 @@ int scmi_protocol_device_request(const struct scmi_device_id *id_table)
 	pr_debug("Requesting SCMI device (%s) for protocol %x\n",
 		 id_table->name, id_table->protocol_id);
 
+	if (IS_ENABLED(CONFIG_ARM_SCMI_RAW_MODE_SUPPORT)) {
+		pr_warn("SCMI Raw mode active. Rejecting '%s'/0x%02X\n",
+			id_table->name, id_table->protocol_id);
+		return -EINVAL;
+	}
+
 	/*
 	 * Search for the matching protocol rdev list and then search
 	 * of any existent equally named device...fails if any duplicate found.
-- 
2.32.0


  parent reply	other threads:[~2022-09-03 18:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-03 18:30 [PATCH v3 0/9] Introduce a unified API for SCMI Server testing Cristian Marussi
2022-09-03 18:30 ` [PATCH v3 1/9] firmware: arm_scmi: Refactor xfer in-flight registration routines Cristian Marussi
2022-09-03 18:30 ` [PATCH v3 2/9] firmware: arm_scmi: Simplify chan_available transport operation Cristian Marussi
2022-09-03 18:30 ` [PATCH v3 3/9] firmware: arm_scmi: Use dedicated devices to initialize channels Cristian Marussi
2022-09-03 18:30 ` [PATCH v3 4/9] firmware: arm_scmi: Add xfer raw helpers Cristian Marussi
2022-09-03 18:30 ` [PATCH v3 5/9] firmware: arm_scmi: Move errors defs and code to common.h Cristian Marussi
2022-09-03 18:30 ` [PATCH v3 6/9] firmware: arm_scmi: Add raw transmission support Cristian Marussi
2022-09-03 18:30 ` [PATCH v3 7/9] firmware: arm_scmi: Add debugfs ABI documentation for Raw mode Cristian Marussi
2022-09-03 18:30 ` Cristian Marussi [this message]
2022-09-03 18:30 ` [PATCH v3 9/9] firmware: arm_scmi: Call Raw mode hooks from the core stack Cristian Marussi
2022-10-07 14:23 ` [PATCH v3 0/9] Introduce a unified API for SCMI Server testing Vincent Guittot
2022-10-07 15:37   ` Cristian Marussi
2022-10-07 15:58     ` Vincent Guittot
2022-10-07 16:07       ` 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=20220903183042.3913053-9-cristian.marussi@arm.com \
    --to=cristian.marussi@arm.com \
    --cc=Jonathan.Cameron@Huawei.com \
    --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=nicola.mazzucato@arm.com \
    --cc=peter.hilber@opensynergy.com \
    --cc=souvik.chakravarty@arm.com \
    --cc=sudeep.holla@arm.com \
    --cc=tarek.el-sherbiny@arm.com \
    --cc=vincent.guittot@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®