linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/14] csky: fixup abiv2 mmap(... O_SYNC) failed.
@ 2018-12-31 15:32 guoren
  2018-12-31 15:32 ` [PATCH 02/14] csky: bugfix gdb coredump error guoren
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: guoren @ 2018-12-31 15:32 UTC (permalink / raw)
  To: arnd; +Cc: guoren, linux-kernel, rostedt, mingo, oleg, linux-arch, Guo Ren

From: Guo Ren <ren_guo@c-sky.com>

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>
---
 arch/csky/abiv1/inc/abi/pgtable-bits.h | 1 +
 arch/csky/abiv2/inc/abi/pgtable-bits.h | 2 +-
 arch/csky/mm/ioremap.c                 | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/csky/abiv1/inc/abi/pgtable-bits.h b/arch/csky/abiv1/inc/abi/pgtable-bits.h
index 455075b..d605445 100644
--- a/arch/csky/abiv1/inc/abi/pgtable-bits.h
+++ b/arch/csky/abiv1/inc/abi/pgtable-bits.h
@@ -26,6 +26,7 @@
 
 #define _PAGE_CACHE		(3<<9)
 #define _PAGE_UNCACHE		(2<<9)
+#define _PAGE_SO		_PAGE_UNCACHE
 
 #define _CACHE_MASK		(7<<9)
 
diff --git a/arch/csky/abiv2/inc/abi/pgtable-bits.h b/arch/csky/abiv2/inc/abi/pgtable-bits.h
index b20ae19..137f793 100644
--- a/arch/csky/abiv2/inc/abi/pgtable-bits.h
+++ b/arch/csky/abiv2/inc/abi/pgtable-bits.h
@@ -32,6 +32,6 @@
 #define _CACHE_MASK		_PAGE_CACHE
 
 #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 */
diff --git a/arch/csky/mm/ioremap.c b/arch/csky/mm/ioremap.c
index 7ad3ff1..cb7c03e 100644
--- a/arch/csky/mm/ioremap.c
+++ b/arch/csky/mm/ioremap.c
@@ -30,7 +30,7 @@ void __iomem *ioremap(phys_addr_t addr, size_t size)
 	vaddr = (unsigned long)area->addr;
 
 	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)) {
 		free_vm_area(area);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-12-31 15:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-31 15:32 [PATCH 01/14] csky: fixup abiv2 mmap(... O_SYNC) failed guoren
2018-12-31 15:32 ` [PATCH 02/14] csky: bugfix gdb coredump error guoren
2018-12-31 15:32 ` [PATCH 03/14] csky: fixup remove vdsp implement for kernel guoren
2018-12-31 15:32 ` [PATCH 04/14] csky: remove syscall_exit_work guoren
2018-12-31 15:32 ` [PATCH 05/14] csky: fixup save hi,lo,dspcr regs in switch_stack guoren
2018-12-31 15:32 ` [PATCH 07/14] csky: CPU-hotplug supported for SMP guoren
2018-12-31 15:32 ` [PATCH 08/14] csky: stacktrace supported guoren
2018-12-31 15:33 ` [PATCH 09/14] csky: optimize kernel panic print guoren
2018-12-31 15:33 ` [PATCH 10/14] csky: remove unused members in processor.h guoren
2018-12-31 15:33 ` [PATCH 11/14] csky: basic ftrace supported guoren
2018-12-31 15:33 ` [PATCH 12/14] csky: ftrace call graph supported guoren
2018-12-31 15:33 ` [PATCH 14/14] csky: Add EM_CSKY_OLD 39 guoren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).