[PATCH v2 17/18] firmware: arm_ffa: Add support for handling framework notifications
Viresh Kumar
viresh.kumar at linaro.org
Mon Feb 10 02:17:43 PST 2025
On 31-01-25, 11:24, Sudeep Holla wrote:
> +static void handle_fwk_notif_callbacks(u32 bitmap)
> +{
> + void *buf;
> + uuid_t uuid;
> + int notify_id = 0, target;
> + struct ffa_indirect_msg_hdr *msg;
> + struct notifier_cb_info *cb_info = NULL;
> +
> + /* Only one framework notification defined and supported for now */
> + if (!(bitmap & FRAMEWORK_NOTIFY_RX_BUFFER_FULL))
> + return;
> +
> + mutex_lock(&drv_info->rx_lock);
> +
> + msg = drv_info->rx_buffer;
> + buf = kmalloc(msg->size, GFP_KERNEL);
> + if (!buf) {
> + mutex_unlock(&drv_info->rx_lock);
> + return;
> + }
> + memcpy(buf, (void *)msg + msg->offset, msg->size);
Can use kmemdup() here instead.
--
viresh
More information about the linux-arm-kernel
mailing list