From 22eb70f0632f26bd0ab604841979279ce6b4535e Mon Sep 17 00:00:00 2001 From: "Huang, Tao" Date: Tue, 23 Dec 2014 21:36:07 +0800 Subject: [PATCH] ion: rockchip: fix snapshot alignment fault on armv8 Fix this bug: Unhandled fault: alignment fault (0x96000061) at 0xffffff8000006016 Internal error: : 96000061 [#1] PREEMPT SMP Modules linked in: dc_fbdev(O) pvrsrvkm(O) CPU: 0 PID: 125 Comm: Binder_2 Tainted: G O 3.10.0 #36 task: ffffffc0530f7380 ti: ffffffc0531c0000 task.ti: ffffffc0531c0000 PC is at memcpy+0x2c/0x60 LR is at vsnprintf+0x100/0x598 [] memcpy+0x2c/0x60 [] seq_vprintf+0x48/0x84 [] seq_printf+0x54/0x60 [] ion_alloc+0x4fc/0x778 [] ion_ioctl+0x164/0x360 [] vfs_ioctl+0x20/0x3c [] do_vfs_ioctl+0x474/0x540 [] SyS_ioctl+0x5c/0x88 pgprot_noncached will map buffer as MT_DEVICE, but All store accesses to Device memory use the asynchronous abort mechanism on Cortex-A53. Signed-off-by: Huang, Tao --- drivers/staging/android/ion/rockchip/rockchip_ion_snapshot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/rockchip/rockchip_ion_snapshot.c b/drivers/staging/android/ion/rockchip/rockchip_ion_snapshot.c index 4814b42cde04..ea34e3ece796 100755 --- a/drivers/staging/android/ion/rockchip/rockchip_ion_snapshot.c +++ b/drivers/staging/android/ion/rockchip/rockchip_ion_snapshot.c @@ -112,7 +112,7 @@ static void * __init last_ion_vmap(phys_addr_t start, unsigned int page_count) pages[i] = pfn_to_page(addr >> PAGE_SHIFT); } pages[page_count] = pfn_to_page(start >> PAGE_SHIFT); - return vmap(pages, page_count + 1, VM_MAP, pgprot_noncached(PAGE_KERNEL)); + return vmap(pages, page_count + 1, VM_MAP, pgprot_writecombine(PAGE_KERNEL)); } static int __init rockchip_ion_snapshot_init(void) -- 2.34.1