[linux-sh:03195] Re: [linuxsh-dev] Re: cache info
Stuart MENEFY <[email protected]> Mon, 22 Mar 2004 15:38:41 +0000
| Newsgroups | gmane.linux.ports.sh.general,gmane.linux.ports.sh.devel |
|---|---|
| Organization | STMicroelectronics (Bristol) |
| Message-ID | <20040322153841.67ac39dd@ocelot> |
On Mon, 22 Mar 2004 09:57:47 -0500 Paul Mundt <[email protected]> wrote: > > If anyone is interested I have the glibc end of this available as well. > > > I'd certainly be interested, this would definitely make testing easier. Attached. The patch is against 2.2.4 but applies to 2.3.2 as well. Stuart
glibc-2.2.4-shcacheflush.patch
(application/octet-stream, 3.2 KB)
diff -ur --new-file glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Dist glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/Dist
--- glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Dist Tue Jun 13 02:44:49 2000
+++ glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/Dist Thu Aug 8 14:07:19 2002
@@ -6,3 +6,4 @@
setfsgid.c
sys/io.h
sys/user.h
+sys/cachectl.h
diff -ur --new-file glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Makefile glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/Makefile
--- glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Makefile Thu Aug 8 16:52:34 2002
+++ glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/Makefile Wed Aug 7 13:44:31 2002
@@ -7,8 +7,8 @@
endif
ifeq ($(subdir),misc)
-sysdep_routines += setfsgid setfsuid setresgid setresuid
-sysdep_headers += sys/io.h
+sysdep_routines += setfsgid setfsuid setresgid setresuid cacheflush
+sysdep_headers += sys/io.h sys/cachectl.h
endif
ifeq ($(subdir),signal)
diff -ur --new-file glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Versions glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/Versions
--- glibc-2.2.4/sysdeps/unix/sysv/linux/sh/Versions Fri Oct 27 06:57:42 2000
+++ glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/Versions Thu Aug 8 16:15:37 2002
@@ -21,4 +21,7 @@
# v*
versionsort64;
}
+ GLIBC_2.2.5 {
+ cacheflush;
+ }
}
diff -ur --new-file glibc-2.2.4/sysdeps/unix/sysv/linux/sh/sys/cachectl.h glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/sys/cachectl.h
--- glibc-2.2.4/sysdeps/unix/sysv/linux/sh/sys/cachectl.h Thu Jan 1 01:00:00 1970
+++ glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/sys/cachectl.h Wed Aug 7 13:42:02 2002
@@ -0,0 +1,38 @@
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_CACHECTL_H
+#define _SYS_CACHECTL_H 1
+
+#include <features.h>
+
+/*
+ * Get the kernel definition for the op bits.
+ */
+#include <asm/cachectl.h>
+
+__BEGIN_DECLS
+
+#ifdef __USE_MISC
+extern int cacheflush (void *addr, __const int nbytes, __const int op) __THROW;
+#endif
+extern int _flush_cache (char *addr, __const int nbytes, __const int op) __THROW;
+
+__END_DECLS
+
+#endif /* sys/cachectl.h */
diff -ur --new-file glibc-2.2.4/sysdeps/unix/sysv/linux/sh/syscalls.list glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/syscalls.list
--- glibc-2.2.4/sysdeps/unix/sysv/linux/sh/syscalls.list Fri Oct 27 06:57:42 2000
+++ glibc-2.2.4-new/sysdeps/unix/sysv/linux/sh/syscalls.list Wed Aug 7 13:34:26 2002
@@ -1,2 +1,3 @@
# File name Caller Syscall name # args Strong name Weak names
+cacheflush - cacheflush i:piii _flush_cache cacheflush
signature.asc
(application/pgp-signature, 185 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (SunOS) iD8DBQFAXwiC61BlSKQGbXkRAnPAAKCLjgLmyF8QruHNY1WxWuQ0eLe0UwCgjeUP AkOFdKTWzQUmwZuwqE+MJXM= =ncKJ -----END PGP SIGNATURE-----