History log of /linux-master/arch/csky/mm/ioremap.c
Revision Date Author Comments
# 0055f67b 13-Aug-2019 Christoph Hellwig <hch@lst.de>

csky: use generic ioremap

Use the generic ioremap_prot and iounmap helpers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Guo Ren <guoren@kernel.org>


# 1246b814 16-Oct-2019 Christoph Hellwig <hch@lst.de>

csky: remove ioremap_cache

No driver that can be used on csky uses ioremap_cache, and this
interface has been deprecated in favor of memremap.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Guo Ren <guoren@kernel.org>


# 5336c179 15-Aug-2019 Guo Ren <ren_guo@c-sky.com>

csky: Fixup ioremap function losing

Implement the following apis to meet usage in different scenarios.

- ioremap (NonCache + StrongOrder)
- ioremap_nocache (NonCache + StrongOrder)
- ioremap_wc (NonCache + WeakOrder )
- ioremap_cache ( Cache + WeakOrder )

Also change flag VM_ALLOC to VM_IOREMAP in get_vm_area_caller.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@infradead.org>


# 7f80fe20 30-Jul-2019 Guo Ren <ren_guo@c-sky.com>

csky: Fixup dma_alloc_coherent with PAGE_SO attribute

This bug is from commit: 2b070ccdf8c0 (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>


# 76d21d18 30-Jan-2019 Guo Ren <ren_guo@c-sky.com>

csky: Fixup io-range page attribute for mmap("/dev/mem")

Some user space drivers need accessing IO address and IO remap need
SO(strong order) page-attribute to make IO operation correct. So we
need add SO-page-attr for all non-memory address.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reported-by: Fan Xiaodong <xiaodong.fan@boyahualu.com>


# 2b070ccd 30-Dec-2018 Guo Ren <ren_guo@c-sky.com>

csky: fixup abiv2 mmap(... O_SYNC) failed.

Glibc function mmap(... O_SYNC) will make page to _PAGE_UNCACHE +
_PAGE_SO and strong-order page couldn't support unalignment access.
So remove _PAGE_SO from _PAGE_UNCACHE, also sync abiv1 with the macro
of _PAGE_SO.

Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reported-by: Liu Renwei <Renwei.Liu@verisilicon.com>
Tested-by: Yuan Qiyun <qiyun_yuan@c-sky.com>


# 013de2d6 05-Sep-2018 Guo Ren <ren_guo@c-sky.com>

csky: MMU and page table management

This patch adds files related to memory management and here is our
memory-layout:

Fixmap : 0xffc02000 – 0xfffff000 (4 MB - 12KB)
Pkmap : 0xff800000 – 0xffc00000 (4 MB)
Vmalloc : 0xf0200000 – 0xff000000 (238 MB)
Lowmem : 0x80000000 – 0xc0000000 (1GB)

abiv1 CPU (CK610) is VIPT cache and it doesn't support highmem.
abiv2 CPUs are all PIPT cache and they could support highmem.

Lowmem is directly mapped by msa0 & msa1 reg, and we needn't setup
memory page table for it.

Link:https://lore.kernel.org/lkml/20180518215548.GH17671@n2100.armlinux.org.uk/
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Cc: Christoph Hellwig <hch@infradead.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>