lkml.org 
[lkml]   [2015]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Linaro-acpi] [V2 PATCH 2/5] arm64 : Introduce support for ACPI _CCA object
Date
On Tuesday 05 May 2015 11:24:03 Tom Lendacky wrote:
> On 05/05/2015 11:13 AM, Suravee Suthikulanit wrote:
> > On 5/5/2015 11:12 AM, Arnd Bergmann wrote:
> >> On Tuesday 05 May 2015 11:09:38 Suravee Suthikulanit wrote:
> >>>
> >>> However, codes in several places are making use of dma_map_ops without
> >>> checking if the ops are NULL (i.e.
> >>> include/asm-generic/dma-mapping-common.h and in arch-specific
> >>> implementation). If setting it to NULL is what we are planning to
> >>> support, we would need to scrub the current code to put NULL check.
> >>> Also, would you consider if that is safe to do going forward?
> >>>
> >>>
> >>
> >> I mean the dma_mask pointer, not dma_map_ops.
>
> Except a lot of drivers will actually set the dma_mask pointer during
> probe (usually by setting dev->dma_mask = &dev->coherent_dma_mask or by
> calling dma_coerce_mask_and_coherent). So I think the dummy_dma_ops
> might be the safest way to go.

Those drivers are broken already, I don't think we should worry about
them. Let's just fix them properly when we run into problems with them.

Basically any use of dma_coerce_mask_and_coherent() is an annotation
for a bug where a driver used to set dev->dma_mask = &dev->coherent_dma_mask
manually.

Arnd


\
 
 \ /
  Last update: 2015-05-05 20:41    [W:0.087 / U:1.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site