]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
firmware: arm_ffa: Set dma_mask for ffa devices
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 17 Jan 2025 10:05:52 +0000 (15:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:37:59 +0000 (14:37 +0200)
[ Upstream commit cc0aac7ca17e0ea3ca84b552fc79f3e86fd07f53 ]

Set dma_mask for FFA devices, otherwise DMA allocation using the device pointer
lead to following warning:

WARNING: CPU: 1 PID: 1 at kernel/dma/mapping.c:597 dma_alloc_attrs+0xe0/0x124

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Message-Id: <e3dd8042ac680bd74b6580c25df855d092079c18.1737107520.git.viresh.kumar@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/arm_ffa/bus.c

index f79ba6f733ba4be1784c24f91b3bb167b204b240..27820a59ce25ecf0cfedcaf5defc0c96d02a63d0 100644 (file)
@@ -190,6 +190,7 @@ struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id)
        dev = &ffa_dev->dev;
        dev->bus = &ffa_bus_type;
        dev->release = ffa_release_device;
+       dev->dma_mask = &dev->coherent_dma_mask;
        dev_set_name(&ffa_dev->dev, "arm-ffa-%d", id);
 
        ffa_dev->id = id;