On Thursday 06 November 2014 11:43:51 Arnd Bergmann wrote:
On Wednesday 05 November 2014 20:32:46 al.stone@linaro.org wrote:
From: Mark Salter msalter@redhat.com
ACPI 5.1 adds a _CCA object to indicate memory coherency of a bus master device. It is an integer with zero meaning non-coherent and one meaning coherent. This attribute may be inherited from a parent device. It may also be missing entirely, in which case, an architecture-specific default is assumed.
This patch adds a utility function to parse a device handle (and its parents) for a _CCA object and return the coherency attribute if found.
Signed-off-by: Mark Salter msalter@redhat.com
This should probably come before patch 26, so you can use it in that driver.
On a more general note, we also need to change the platform device creation path for ACPI to evaluate this and set the correct dma_map_ops based on it.
On second thought, I wonder why this is even required on ARM64. Are there any DMA masters that we want to support with ACPI that are not cache coherent? It sounds strange in a server context, so why not assume that everything is coherent and just set dma_mask=NULL for noncoherent devices to prevent them from doing DMA?
Arnd