From d97bada31e9f2b928ec5d947c32837aff2d604f8 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Thu, 26 Jul 2018 15:06:26 +0800 Subject: [PATCH] ARM: rk3308_linux_aarch32[_debug]_defconfig: coherent_pool=4k If coherent_pool size is zero, kernel will panic when arm_dma_free. It seems kernel do not like without atomic_pool, so keep this pool as small as possible. Unable to handle kernel NULL pointer dereference at virtual address 00000004 pgd = deb70000 [00000004] *pgd=1e571835, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT SMP THUMB2 Modules linked in: CPU: 2 PID: 674 Comm: sh Not tainted 4.4.138 #187 Hardware name: Generic DT based system task: deb89540 task.stack: df37a000 PC is at addr_in_gen_pool+0x10/0x3c LR is at addr_in_gen_pool+0xf/0x3c pc : [] lr : [] psr: 00000033 sp : df37be80 ip : df37a07c fp : 000686ec r10: debc6f48 r9 : 1e406000 r8 : 00000000 r7 : e091d000 r6 : e091d000 r5 : e091efff r4 : 00000000 r3 : 00000001 r2 : deb89540 r1 : e091d000 r0 : 00000000 [] (addr_in_gen_pool) from [] (arch_free_from_atomic_pool+0x19/0x54) [] (arch_free_from_atomic_pool) from [] (__arm_dma_free+0x53/0xb0) [] (__arm_dma_free) from [] (arm_dma_free+0xf/0x12) [] (arm_dma_free) from [] (serial8250_release_dma+0x71/0xd2) [] (serial8250_release_dma) from [] (serial8250_do_shutdown+0x23/0x98) [] (serial8250_do_shutdown) from [] (uart_shutdown+0x87/0xba) [] (uart_shutdown) from [] (uart_close+0x8b/0x116) [] (uart_close) from [] (tty_release+0x20d/0x318) [] (tty_release) from [] (__fput+0x8b/0x120) [] (__fput) from [] (task_work_run+0x6b/0x7c) [] (task_work_run) from [] (do_work_pending+0x65/0x66) [] (do_work_pending) from [] (slow_work_pending+0x9/0x18) Change-Id: If3fc962e4e936132fee021f5e6932cdabfd5ffda Signed-off-by: Tao Huang --- arch/arm/configs/rk3308_linux_aarch32_debug_defconfig | 2 +- arch/arm/configs/rk3308_linux_aarch32_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/configs/rk3308_linux_aarch32_debug_defconfig b/arch/arm/configs/rk3308_linux_aarch32_debug_defconfig index 973cee6d3482..2145ff8f4ebc 100644 --- a/arch/arm/configs/rk3308_linux_aarch32_debug_defconfig +++ b/arch/arm/configs/rk3308_linux_aarch32_debug_defconfig @@ -41,7 +41,7 @@ CONFIG_THUMB2_KERNEL=y CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 CONFIG_UACCESS_WITH_MEMCPY=y # CONFIG_SWIOTLB is not set -CONFIG_CMDLINE="coherent_pool=0 user_debug=31" +CONFIG_CMDLINE="coherent_pool=4k user_debug=31" CONFIG_CMDLINE_EXTEND=y CONFIG_CPU_FREQ=y # CONFIG_CPU_FREQ_TIMES is not set diff --git a/arch/arm/configs/rk3308_linux_aarch32_defconfig b/arch/arm/configs/rk3308_linux_aarch32_defconfig index 04378de8971c..b5b02a4ccfd5 100644 --- a/arch/arm/configs/rk3308_linux_aarch32_defconfig +++ b/arch/arm/configs/rk3308_linux_aarch32_defconfig @@ -41,7 +41,7 @@ CONFIG_THUMB2_KERNEL=y CONFIG_DEFAULT_MMAP_MIN_ADDR=32768 CONFIG_UACCESS_WITH_MEMCPY=y # CONFIG_SWIOTLB is not set -CONFIG_CMDLINE="coherent_pool=0 loglevel=0" +CONFIG_CMDLINE="coherent_pool=4k loglevel=0" CONFIG_CMDLINE_EXTEND=y CONFIG_CPU_FREQ=y # CONFIG_CPU_FREQ_TIMES is not set