ASoC: arm64: use the same dma mmap codepath both for arm and arm64
PATCH 1/1 ASoC: arm64: use the same dma mmap codepath both for arm and arm64
This avoids following kernel crash when try to playback on arm64
[ 107.497203] [<ffffffc00046b310>] snd_pcm_mmap_data_fault+0x90/0xd4 [ 107.503405] [<ffffffc0001541ac>] __do_fault+0xb0/0x498 [ 107.508565] [<ffffffc0001576a0>] handle_mm_fault+0x224/0x7b0 [ 107.514246] [<ffffffc000092640>] do_page_fault+0x11c/0x310 [ 107.519738] [<ffffffc000081100>] do_mem_abort+0x38/0x98
Tested: backported to 3.14 and tried to playback on arm64 machine
Signed-off-by Anatol Pomozov <[email protected]>
--- sound/core/pcm_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/core/pcm_native.c +1 -1
@@ -3193,7 +3193,7 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = {#ifndef ARCH_HAS_DMA_MMAP_COHERENT /* This should be defined / handled globally! */ -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM ) || defined(CONFIG_ARM64 )#define ARCH_HAS_DMA_MMAP_COHERENT #endif #endif
Signature · 1 line
2.1.0.rc2.206.gedb03e5
At Fri, 17 Oct 2014 12:43:34 -0700,
Quoted 11 lines · Anatol Pomozov
This avoids following kernel crash when try to playback on arm64
[ 107.497203] [<ffffffc00046b310>] snd_pcm_mmap_data_fault+0x90/0xd4 [ 107.503405] [<ffffffc0001541ac>] __do_fault+0xb0/0x498 [ 107.508565] [<ffffffc0001576a0>] handle_mm_fault+0x224/0x7b0 [ 107.514246] [<ffffffc000092640>] do_page_fault+0x11c/0x310 [ 107.519738] [<ffffffc000081100>] do_mem_abort+0x38/0x98Tested: backported to 3.14 and tried to playback on arm64 machine
Signed-off-by Anatol Pomozov <[email protected]>
It's not specific to ASoC, so I applied the patch with modified subject now.
We should clean up the relevant part in general, as now more architectures support dma_mmap_coherent(). But it'd be a change for 3.19.
thanks,
Takashi
Quoted 20 lines
--- sound/core/pcm_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)sound/core/pcm_native.c +1
-1@@ -3193,7 +3193,7 @@ static const struct vm_operations_struct snd_pcm_vm_ops_data_fault = {#ifndef ARCH_HAS_DMA_MMAP_COHERENT /* This should be defined / handled globally! */ -#ifdef CONFIG_ARM +#if defined(CONFIG_ARM ) || defined(CONFIG_ARM64 )#define ARCH_HAS_DMA_MMAP_COHERENT #endif #endif Signature · 1 line
2.1.0.rc2.206.gedb03e5