* [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices
@ 2025-01-17 10:05 Viresh Kumar
2025-01-17 10:09 ` Sudeep Holla
2025-03-03 11:48 ` Sudeep Holla
0 siblings, 2 replies; 7+ messages in thread
From: Viresh Kumar @ 2025-01-17 10:05 UTC (permalink / raw)
To: Sudeep Holla
Cc: Viresh Kumar, Vincent Guittot, Alex Bennée, Bill Mills,
linux-arm-kernel, linux-kernel
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>
---
drivers/firmware/arm_ffa/bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
index 587118f5285b..9dd5f6f805aa 100644
--- a/drivers/firmware/arm_ffa/bus.c
+++ b/drivers/firmware/arm_ffa/bus.c
@@ -247,6 +247,7 @@ ffa_device_register(const struct ffa_partition_info *part_info,
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;
--
2.31.1.272.g89b43f80a514
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices
2025-01-17 10:05 [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices Viresh Kumar
@ 2025-01-17 10:09 ` Sudeep Holla
2025-02-28 8:27 ` Viresh Kumar
2025-03-03 11:48 ` Sudeep Holla
1 sibling, 1 reply; 7+ messages in thread
From: Sudeep Holla @ 2025-01-17 10:09 UTC (permalink / raw)
To: Viresh Kumar
Cc: Vincent Guittot, Sudeep Holla, Alex Bennée, Bill Mills,
linux-arm-kernel, linux-kernel
On Fri, Jan 17, 2025 at 03:35:52PM +0530, Viresh Kumar wrote:
> 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
>
Looks good, will add to my queue after next -rc1.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices
2025-01-17 10:09 ` Sudeep Holla
@ 2025-02-28 8:27 ` Viresh Kumar
2025-02-28 9:21 ` Sudeep Holla
0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2025-02-28 8:27 UTC (permalink / raw)
To: Sudeep Holla
Cc: Vincent Guittot, Alex Bennée, Bill Mills, linux-arm-kernel,
linux-kernel
On 17-01-25, 10:09, Sudeep Holla wrote:
> On Fri, Jan 17, 2025 at 03:35:52PM +0530, Viresh Kumar wrote:
> > 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
> >
>
> Looks good, will add to my queue after next -rc1.
Ping.
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices
2025-02-28 8:27 ` Viresh Kumar
@ 2025-02-28 9:21 ` Sudeep Holla
2025-02-28 11:07 ` Viresh Kumar
0 siblings, 1 reply; 7+ messages in thread
From: Sudeep Holla @ 2025-02-28 9:21 UTC (permalink / raw)
To: Viresh Kumar
Cc: Vincent Guittot, Sudeep Holla, Alex Bennée, Bill Mills,
linux-arm-kernel, linux-kernel
On Fri, Feb 28, 2025 at 01:57:45PM +0530, Viresh Kumar wrote:
> On 17-01-25, 10:09, Sudeep Holla wrote:
> > On Fri, Jan 17, 2025 at 03:35:52PM +0530, Viresh Kumar wrote:
> > > 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
> > >
> >
> > Looks good, will add to my queue after next -rc1.
>
> Ping.
>
Sorry I forgot to respond. I kept this out for now as we need to resolve
the DT bindings.
If you think it can be used/needed irrespective of how we resolve that
issue ? If so, I can queue this.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices
2025-02-28 9:21 ` Sudeep Holla
@ 2025-02-28 11:07 ` Viresh Kumar
2025-02-28 11:19 ` Sudeep Holla
0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2025-02-28 11:07 UTC (permalink / raw)
To: Sudeep Holla
Cc: Vincent Guittot, Alex Bennée, Bill Mills, linux-arm-kernel,
linux-kernel
On Fri, 28 Feb 2025 at 14:51, Sudeep Holla <sudeep.holla@arm.com> wrote:
> Sorry I forgot to respond. I kept this out for now as we need to resolve
> the DT bindings.
>
> If you think it can be used/needed irrespective of how we resolve that
> issue ? If so, I can queue this.
Yes, this has nothing to do with the DT bindings and reserved-mem thing.
We can anyways map memory on need basis at runtime and this is required
for that to work. The reserved-mem thing only allows us to map everything in
advance.
--
Viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices
2025-02-28 11:07 ` Viresh Kumar
@ 2025-02-28 11:19 ` Sudeep Holla
0 siblings, 0 replies; 7+ messages in thread
From: Sudeep Holla @ 2025-02-28 11:19 UTC (permalink / raw)
To: Viresh Kumar
Cc: Vincent Guittot, Alex Bennée, Bill Mills, linux-arm-kernel,
linux-kernel
On Fri, Feb 28, 2025 at 04:37:24PM +0530, Viresh Kumar wrote:
> On Fri, 28 Feb 2025 at 14:51, Sudeep Holla <sudeep.holla@arm.com> wrote:
> > Sorry I forgot to respond. I kept this out for now as we need to resolve
> > the DT bindings.
> >
> > If you think it can be used/needed irrespective of how we resolve that
> > issue ? If so, I can queue this.
>
> Yes, this has nothing to do with the DT bindings and reserved-mem thing.
>
> We can anyways map memory on need basis at runtime and this is required
> for that to work. The reserved-mem thing only allows us to map everything in
> advance.
>
Understood, will apply this soon.
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices
2025-01-17 10:05 [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices Viresh Kumar
2025-01-17 10:09 ` Sudeep Holla
@ 2025-03-03 11:48 ` Sudeep Holla
1 sibling, 0 replies; 7+ messages in thread
From: Sudeep Holla @ 2025-03-03 11:48 UTC (permalink / raw)
To: Viresh Kumar
Cc: Sudeep Holla, Vincent Guittot, Alex Bennée, Bill Mills,
linux-arm-kernel, linux-kernel
On Fri, 17 Jan 2025 15:35:52 +0530, Viresh Kumar wrote:
> 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
>
>
Applied to sudeep.holla/linux (for-next/ffa/updates), thanks!
[1/1] firmware: arm_ffa: Set dma_mask for ffa devices
https://git.kernel.org/sudeep.holla/c/cc0aac7ca17e
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-03-03 12:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 10:05 [PATCH] firmware: arm_ffa: Set dma_mask for ffa devices Viresh Kumar
2025-01-17 10:09 ` Sudeep Holla
2025-02-28 8:27 ` Viresh Kumar
2025-02-28 9:21 ` Sudeep Holla
2025-02-28 11:07 ` Viresh Kumar
2025-02-28 11:19 ` Sudeep Holla
2025-03-03 11:48 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).