Commit 2b070ccd authored by Guo Ren's avatar Guo Ren

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: default avatarGuo Ren <ren_guo@c-sky.com>
Reported-by: default avatarLiu Renwei <Renwei.Liu@verisilicon.com>
Tested-by: default avatarYuan Qiyun <qiyun_yuan@c-sky.com>
parent d770b256
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#define _PAGE_CACHE (3<<9) #define _PAGE_CACHE (3<<9)
#define _PAGE_UNCACHE (2<<9) #define _PAGE_UNCACHE (2<<9)
#define _PAGE_SO _PAGE_UNCACHE
#define _CACHE_MASK (7<<9) #define _CACHE_MASK (7<<9)
......
...@@ -32,6 +32,6 @@ ...@@ -32,6 +32,6 @@
#define _CACHE_MASK _PAGE_CACHE #define _CACHE_MASK _PAGE_CACHE
#define _CACHE_CACHED (_PAGE_VALID | _PAGE_CACHE | _PAGE_BUF) #define _CACHE_CACHED (_PAGE_VALID | _PAGE_CACHE | _PAGE_BUF)
#define _CACHE_UNCACHED (_PAGE_VALID | _PAGE_SO) #define _CACHE_UNCACHED (_PAGE_VALID)
#endif /* __ASM_CSKY_PGTABLE_BITS_H */ #endif /* __ASM_CSKY_PGTABLE_BITS_H */
...@@ -30,7 +30,7 @@ void __iomem *ioremap(phys_addr_t addr, size_t size) ...@@ -30,7 +30,7 @@ void __iomem *ioremap(phys_addr_t addr, size_t size)
vaddr = (unsigned long)area->addr; vaddr = (unsigned long)area->addr;
prot = __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE | prot = __pgprot(_PAGE_PRESENT | __READABLE | __WRITEABLE |
_PAGE_GLOBAL | _CACHE_UNCACHED); _PAGE_GLOBAL | _CACHE_UNCACHED | _PAGE_SO);
if (ioremap_page_range(vaddr, vaddr + size, addr, prot)) { if (ioremap_page_range(vaddr, vaddr + size, addr, prot)) {
free_vm_area(area); free_vm_area(area);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment