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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB84598FFA4F7D8D1287D220D688842@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Sun, 11 Aug 2024 12:42:05 +0000
From: Peng Fan <peng.fan@....com>
To: Florian Fainelli <florian.fainelli@...adcom.com>,
	"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>
CC: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>, Sudeep Holla <sudeep.holla@....com>,
	Cristian Marussi <cristian.marussi@....com>, "open list:OPEN FIRMWARE AND
 FLATTENED DEVICE TREE BINDINGS" <devicetree@...r.kernel.org>, open list
	<linux-kernel@...r.kernel.org>, "arm-scmi@...r.kernel.org"
	<arm-scmi@...r.kernel.org>, "james.quinlan@...adcom.com"
	<james.quinlan@...adcom.com>, "justin.chen@...adcom.com"
	<justin.chen@...adcom.com>, "kapil.hali@...adcom.com"
	<kapil.hali@...adcom.com>, "bcm-kernel-feedback-list@...adcom.com"
	<bcm-kernel-feedback-list@...adcom.com>
Subject: RE: [PATCH 2/2] firmware: arm_scmi: Support 'reg-io-width' property
 for shared memory

> Subject: [PATCH 2/2] firmware: arm_scmi: Support 'reg-io-width'
> property for shared memory
> 
> Some shared memory areas might only support a certain access width,
> (e.g.: 32 bits accesses only). Update the shmem layer to support
> reading from and writing to such shared memory area using the
> specified I/O width in the Device Tree. The various transport layers
> making use of the shmem.c code are updated accordingly to pass the
> I/O width to the routines that need it.
> 
> Signed-off-by: Florian Fainelli <florian.fainelli@...adcom.com>
> ---

[...]
>  }
> 
>  static void smc_mark_txdone(struct scmi_chan_info *cinfo, int ret, diff
> --git a/drivers/firmware/arm_scmi/shmem.c
> b/drivers/firmware/arm_scmi/shmem.c
> index 01d8a9398fe8..192262d63baa 100644
> --- a/drivers/firmware/arm_scmi/shmem.c
> +++ b/drivers/firmware/arm_scmi/shmem.c
> @@ -34,9 +34,20 @@ struct scmi_shared_mem {
>  	u8 msg_payload[];
>  };
> 
> +#define __shmem_copy_toio_tpl(s)			\
> +	for (unsigned int i = 0; i < xfer->tx.len; i += shmem_io_width)
> 		\
> +		iowrite##s(((u##s *)(xfer->tx.buf))[i / shmem_io_width],
> 	\
> +			   shmem->msg_payload + i);

there will be a barrier with iowrite, use raw_write##s?

> +
> +#define __shmem_copy_fromio_tpl(s)			\
> +	for (unsigned int i = 0; i < xfer->rx.len; i += shmem_io_width)
> 		\
> +		((u##s *)(xfer->rx.buf))[i / shmem_io_width] =
> 		\
> +			 ioread##s(shmem->msg_payload +
> shmem_io_width + i);

Use raw_ioread##s?

Regards,
Peng.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ