[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patches] [PATCH] Fix mmap2 syscall for ColdFire
- To: "Joseph S. Myers" <joseph@xxxxxxxxxxxxxxxx>
- Subject: [patches] [PATCH] Fix mmap2 syscall for ColdFire
- From: Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
- Date: Thu, 22 Jul 2010 21:18:04 +0400
This patch fixes mmap2 syscall on ColdFire systems.
M68K linux port expects the argument of mmap2 syscall to be counted in
the memory pages. ColdFire has a non-standard page size of 8K, which
libc is not yet aware of. The patch defines the MMAP2_PAGE_SHIFT macro
to fix that.
This patch was rejected from GLIBC Ports in
http://sourceware.org/ml/libc-ports/2009-10/msg00005.html .
OK to check in?
Thank you,
--
Maxim Kuvyrkov
CodeSourcery
maxim@xxxxxxxxxxxxxxxx
(650) 331-3385 x724
From 5efd401d137cc14f4cd99f2f0669d60aa1c267a5 Mon Sep 17 00:00:00 2001
From: Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
Date: Fri, 2 Oct 2009 14:22:47 +0400
Subject: [PATCH] Fix ColdFire's mmap2.
* sysdeps/unix/sysv/linux/m68k/kernel-features.h (MMAP2_PAGE_SHIFT):
Define to 13.
Signed-off-by: Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
---
sysdeps/unix/sysv/linux/m68k/kernel-features.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 2920943..fcff833 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -39,3 +39,9 @@
/* These syscalls are not implemented yet for m68k. */
#undef __ASSUME_PSELECT
#undef __ASSUME_PPOLL
+
+#ifdef __mcoldfire__
+/* ColdFire kernels have PAGE_SHIFT set to 13 and expect
+ mmap2 offset to be provided in 8K pages. */
+# define MMAP2_PAGE_SHIFT 13
+#endif
--
1.6.4