* [PATCH] Have MIPS64/n64 imply wordsize-64
@ 2012-04-14 1:21 Andrew Pinski
2012-04-14 2:11 ` Andrew Pinski
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Pinski @ 2012-04-14 1:21 UTC (permalink / raw)
To: libc-ports
[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]
Currently MIPS64/n64 does not implies wordsize-64 which means we have
to copy and paste some code from wordsize-64.
This patch changes MIPS64/n64 to imply wordsize-64 so we can remove
the duplicated code from the mips port.
OK? Note I don't have write access yet.
Thanks,
Andrew Pinski
2012-04-13 Andrew Pinski <apinski@cavium.com>
* sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/Implies: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Add a kludge just
like x86_64 and alpha targets to have __NR_pread and
__NR_pwrite defined.
* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Remove all
syscalls except for statfs.
[-- Attachment #2: implyfixupstream.diff.txt --]
[-- Type: text/plain, Size: 9649 bytes --]
From 88ab2fff2a398818944e1643434187c3a2a659f8 Mon Sep 17 00:00:00 2001
From: Andrew Pinski <apinski@cavium.com>
Date: Fri, 13 Apr 2012 18:14:39 -0700
Subject: [PATCH] 2012-04-13 Andrew Pinski <apinski@cavium.com>
* sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: Delete.
* sysdeps/unix/sysv/linux/mips/mips64/n64/Implies: New file.
* sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Add a kludge just
like x86_64 and alpha targets to have __NR_pread and __NR_pwrite defined.
* sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Remove all
syscalls except for statfs.
---
ChangeLog.mips | 19 +++++++++++++++++++
sysdeps/unix/sysv/linux/mips/mips64/n64/Implies | 1 +
.../unix/sysv/linux/mips/mips64/n64/fallocate.c | 1 -
.../unix/sysv/linux/mips/mips64/n64/fallocate64.c | 1 -
.../unix/sysv/linux/mips/mips64/n64/fstatfs64.c | 1 -
sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c | 1 -
.../sysv/linux/mips/mips64/n64/posix_fadvise.c | 1 -
.../sysv/linux/mips/mips64/n64/posix_fadvise64.c | 1 -
.../sysv/linux/mips/mips64/n64/posix_fallocate.c | 1 -
.../sysv/linux/mips/mips64/n64/posix_fallocate64.c | 1 -
sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c | 1 -
.../unix/sysv/linux/mips/mips64/n64/pwritev64.c | 1 -
sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c | 1 -
.../unix/sysv/linux/mips/mips64/n64/syscalls.list | 8 --------
sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 11 +++++++++++
15 files changed, 31 insertions(+), 19 deletions(-)
create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/Implies
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c
delete mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 01f51c0..c6cecf6 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,22 @@
+2012-04-13 Andrew Pinski <apinski@cavium.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: Delete.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/Implies: New file.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Add a kludge just
+ like x86_64 and alpha targets to have __NR_pread and __NR_pwrite defined.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Remove all
+ syscalls except for statfs.
+
2012-03-28 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/bits/mman.h (MAP_STACK): Define.
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/Implies b/sysdeps/unix/sysv/linux/mips/mips64/n64/Implies
new file mode 100644
index 0000000..8d91c80
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/Implies
@@ -0,0 +1 @@
+unix/sysv/linux/wordsize-64
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
deleted file mode 100644
index d3b7218..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/wordsize-64/fallocate.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
deleted file mode 100644
index fb2b681..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* fallocate64 is in fallocate.c */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
deleted file mode 100644
index 6e25b02..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
deleted file mode 100644
index 33918ea..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* glob64 is in glob.c */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
deleted file mode 100644
index 0287b83..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fadvise.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
deleted file mode 100644
index c9f72c4..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* posix_fadvise64 is in posix_fadvise.c */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c
deleted file mode 100644
index b3fe81b..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c
deleted file mode 100644
index f466f13..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* posix_fallocate64 is in posix_fallocate.c */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c
deleted file mode 100644
index fd9320c..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty since the preadv syscall is equivalent. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c
deleted file mode 100644
index 8b72a29..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty since the pwritev syscall is equivalent. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c b/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
deleted file mode 100644
index 6e25b02..0000000
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
+++ /dev/null
@@ -1 +0,0 @@
-/* Empty. */
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
index c94fe75..a15daae 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
@@ -1,10 +1,2 @@
# File name Caller Syscall name # args Strong name Weak names
-
-sync_file_range - sync_file_range Ci:iiii sync_file_range
-
-prlimit EXTRA prlimit64 i:iipp prlimit prlimit64
-
-fanotify_mark EXTRA fanotify_mark i:iiiis fanotify_mark
-
-fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
statfs - statfs i:sp __statfs statfs statfs64 __statfs64
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index 0baa94f..708dcf2 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
@@ -36,6 +36,17 @@
#undef SYS_ify
#define SYS_ify(syscall_name) __NR_##syscall_name
+/* This is a kludge to make syscalls.list find these under the names
+ pread and pwrite, since some kernel headers define those names
+ and some define the *64 names for the same system calls. */
+#if !defined __NR_pread && defined __NR_pread64
+# define __NR_pread __NR_pread64
+#endif
+#if !defined __NR_pwrite && defined __NR_pwrite64
+# define __NR_pwrite __NR_pwrite64
+#endif
+
+
#ifdef __ASSEMBLER__
/* We don't want the label for the error handler to be visible in the symbol
--
1.7.2.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Have MIPS64/n64 imply wordsize-64
2012-04-14 1:21 [PATCH] Have MIPS64/n64 imply wordsize-64 Andrew Pinski
@ 2012-04-14 2:11 ` Andrew Pinski
2012-04-14 3:00 ` Andrew Pinski
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Pinski @ 2012-04-14 2:11 UTC (permalink / raw)
To: libc-ports
On Fri, Apr 13, 2012 at 6:21 PM, Andrew Pinski
<andrew.pinski@caviumnetworks.com> wrote:
> Currently MIPS64/n64 does not implies wordsize-64 which means we have
> to copy and paste some code from wordsize-64.
> This patch changes MIPS64/n64 to imply wordsize-64 so we can remove
> the duplicated code from the mips port.
>
> OK? Note I don't have write access yet.
Ignore this patch, it does not work. For some reason I thought I
tested it but I must have messed up.
Thanks,
Andrew
>
> Thanks,
> Andrew Pinski
>
> 2012-04-13 Andrew Pinski <apinski@cavium.com>
>
> * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: Delete.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/Implies: New file.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Add a kludge just
> like x86_64 and alpha targets to have __NR_pread and
> __NR_pwrite defined.
> * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Remove all
> syscalls except for statfs.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Have MIPS64/n64 imply wordsize-64
2012-04-14 2:11 ` Andrew Pinski
@ 2012-04-14 3:00 ` Andrew Pinski
2012-04-14 21:35 ` Carlos O'Donell
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Pinski @ 2012-04-14 3:00 UTC (permalink / raw)
To: libc-ports
On Fri, Apr 13, 2012 at 7:11 PM, Andrew Pinski
<andrew.pinski@caviumnetworks.com> wrote:
> On Fri, Apr 13, 2012 at 6:21 PM, Andrew Pinski
> <andrew.pinski@caviumnetworks.com> wrote:
>> Currently MIPS64/n64 does not implies wordsize-64 which means we have
>> to copy and paste some code from wordsize-64.
>> This patch changes MIPS64/n64 to imply wordsize-64 so we can remove
>> the duplicated code from the mips port.
>>
>> OK? Note I don't have write access yet.
>
> Ignore this patch, it does not work. For some reason I thought I
> tested it but I must have messed up.
It turns out this was already discussed before
http://sourceware.org/ml/libc-ports/2008-12/msg00007.html .
>
> Thanks,
> Andrew
>
>
>>
>> Thanks,
>> Andrew Pinski
>>
>> 2012-04-13 Andrew Pinski <apinski@cavium.com>
>>
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/fallocate64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/glob64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fadvise64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/posix_fallocate64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/preadv64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/pwritev64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: Delete.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/Implies: New file.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Add a kludge just
>> like x86_64 and alpha targets to have __NR_pread and
>> __NR_pwrite defined.
>> * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list: Remove all
>> syscalls except for statfs.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Have MIPS64/n64 imply wordsize-64
2012-04-14 3:00 ` Andrew Pinski
@ 2012-04-14 21:35 ` Carlos O'Donell
0 siblings, 0 replies; 4+ messages in thread
From: Carlos O'Donell @ 2012-04-14 21:35 UTC (permalink / raw)
To: Andrew Pinski; +Cc: libc-ports
On Fri, Apr 13, 2012 at 11:00 PM, Andrew Pinski
<andrew.pinski@caviumnetworks.com> wrote:
>>> OK? Note I don't have write access yet.
>>
>> Ignore this patch, it does not work. For some reason I thought I
>> tested it but I must have messed up.
>
> It turns out this was already discussed before
> http://sourceware.org/ml/libc-ports/2008-12/msg00007.html .
It might be interesting to see how the generic code can be adjusted to
try support MIPS, and thus reduce the duplication. I don't know how
hard or worthwhile that might be.
Cheers,
Carlos.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-14 21:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-14 1:21 [PATCH] Have MIPS64/n64 imply wordsize-64 Andrew Pinski
2012-04-14 2:11 ` Andrew Pinski
2012-04-14 3:00 ` Andrew Pinski
2012-04-14 21:35 ` Carlos O'Donell
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 read-only IMAP folder(s) and NNTP newsgroup(s).