]> git.baikalelectronics.ru Git - kernel.git/commit
csky: Fixup dma_alloc_coherent with PAGE_SO attribute
authorGuo Ren <ren_guo@c-sky.com>
Tue, 30 Jul 2019 06:43:22 +0000 (14:43 +0800)
committerGuo Ren <ren_guo@c-sky.com>
Wed, 31 Jul 2019 03:05:25 +0000 (11:05 +0800)
commitd63f92d6d189de0df1acc0ec6c433849eaf3487f
tree4052003f821439f67f8be27a26c016075cf48e7d
parent0f0e19974006715c30522341f2cd82eafe493d4a
csky: Fixup dma_alloc_coherent with PAGE_SO attribute

This bug is from commit: 0b513ea0f921 (fixup abiv2 mmap(... O_SYNC)
failed). In that patch we remove the _PAGE_SO for memory noncache
mapping and this will cause problem when drivers use dma descriptors
to control the transcations without dma_w/rmb().

After referencing other archs' implementation, pgprot_writecombine is
introduced for mmap(... O_SYNC).

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
arch/csky/include/asm/pgtable.h
arch/csky/mm/ioremap.c