[PATCH v2 5/6] firmware: raspberrypi: Document memory barriers in property list path

Manuel Ebner manuelebnerli at mailbox.org
Sat Nov 7 10:46:38 PST 2026


Hi Sander,

On Sat, 2026-11-07 at 19:21 +0100, Sander Speetjens wrote:
> Add comments explaining the wmb() before the firmware transaction and
> the rmb() before reading the response, as required by coding style.
> 
> Signed-off-by: Sander Speetjens <sander.speetjens at gmail.com>

For Patches 1-5/6:
Reviewed-by: Manuel Ebner <manuelebnerli at mailbox.org>

Thanks
 Manuel 

> ---
>  drivers/firmware/raspberrypi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/firmware/raspberrypi.c b/drivers/firmware/raspberrypi.c
> index d9a569a6dae7..57f21e4e65d6 100644
> --- a/drivers/firmware/raspberrypi.c
> +++ b/drivers/firmware/raspberrypi.c
> @@ -110,10 +110,12 @@ int rpi_firmware_property_list(struct rpi_firmware *fw,
>  	buf[1] = RPI_FIRMWARE_STATUS_REQUEST;
>  	memcpy(&buf[2], data, tag_size);
>  	buf[size / 4 - 1] = RPI_FIRMWARE_PROPERTY_END;
> +	/* Make sure the writes to the buffer are visible to the firmware. */
>  	wmb();
>  
>  	ret = rpi_firmware_transaction(fw, MBOX_CHAN_PROPERTY, bus_addr);
>  
> +	/* Make sure we see the firmware's response before reading it. */
>  	rmb();
>  	memcpy(data, &buf[2], tag_size);
>  	if (ret == 0 && buf[1] != RPI_FIRMWARE_STATUS_SUCCESS) {



More information about the linux-arm-kernel mailing list