lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 23 Sep 2021 15:58:02 +0100 From: Cristian Marussi <cristian.marussi@....com> To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org Cc: sudeep.holla@....com, james.quinlan@...adcom.com, Jonathan.Cameron@...wei.com, f.fainelli@...il.com, etienne.carriere@...aro.org, vincent.guittot@...aro.org, souvik.chakravarty@....com, peter.hilber@...nsynergy.com, igor.skalkin@...nsynergy.com, cristian.marussi@....com Subject: [PATCH v5 13/13] firmware: arm_scmi: Make smc support atomic sync commands replies Enable sync_cmds_atomic_replies in the SMC transport descriptor and remove SMC specific .poll_done callback support since polling is bypassed when sync_cmds_atomic_replies is set. Signed-off-by: Cristian Marussi <cristian.marussi@....com> --- v4 --> v5 - removed RFC tag - added comment on setting flag - remove smc_poll_done --- drivers/firmware/arm_scmi/smc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c index 22c573458719..a338c696852d 100644 --- a/drivers/firmware/arm_scmi/smc.c +++ b/drivers/firmware/arm_scmi/smc.c @@ -225,14 +225,6 @@ static void smc_mark_txdone(struct scmi_chan_info *cinfo, int ret) smc_channel_lock_release(scmi_info); } -static bool -smc_poll_done(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) -{ - struct scmi_smc *scmi_info = cinfo->transport_info; - - return shmem_poll_done(scmi_info->shmem, xfer); -} - static const struct scmi_transport_ops scmi_smc_ops = { .chan_available = smc_chan_available, .chan_setup = smc_chan_setup, @@ -240,7 +232,6 @@ static const struct scmi_transport_ops scmi_smc_ops = { .send_message = smc_send_message, .mark_txdone = smc_mark_txdone, .fetch_response = smc_fetch_response, - .poll_done = smc_poll_done, }; const struct scmi_desc scmi_smc_desc = { @@ -255,4 +246,13 @@ const struct scmi_desc scmi_smc_desc = { */ .atomic_capable = IS_ENABLED(CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE), .atomic_enabled = IS_ENABLED(CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE), + /* + * Setting .sync_cmds_atomic_replies to true for SMC assumes that, + * once the SMC instruction has completed successfully, the issued + * SCMI command would have been already fully processed by the SCMI + * platform firmware and so any possible response value expected + * for the issued command will be immmediately ready to be fetched + * from the shared memory area. + */ + .sync_cmds_atomic_replies = true, }; -- 2.17.1
Powered by blists - more mailing lists