When compiling the Blackfin kernel, checksyscalls.pl will report lots of missing syscalls warnings.
This patch will add some missing syscalls which make sense on Blackfin arch.Also add ignored syscall list to kill remaining warnings.
After appling this patch, toolchain should be rebuilt. Then recompiling the kernel with the new
toolchain.Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
---
arch/blackfin/mach-common/entry.S | 18 ++++++++++--
include/asm-blackfin/unistd.h | 54 ++++++++++++++++++++++++++++++++++---
2 files changed, 65 insertions(+), 7 deletions(-)diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S
index d61bba9..ef60f2e 100644
--- a/arch/blackfin/mach-common/entry.S
+++ b/arch/blackfin/mach-common/entry.S
@@ -815,7 +815,7 @@ _extable:ALIGN
ENTRY(_sys_call_table)
- .long _sys_ni_syscall /* 0 - old "setup()" system call*/
+ .long _sys_restart_syscall /* 0 */
.long _sys_exit
.long _sys_fork
.long _sys_read
@@ -984,7 +984,7 @@ ENTRY(_sys_call_table)
.long _sys_ni_syscall /* for vm86 */
.long _sys_ni_syscall /* old "query_module" */
.long _sys_ni_syscall /* sys_poll */
- .long _sys_ni_syscall /* sys_nfsservctl */
+ .long _sys_nfsservctl
.long _sys_setresgid /* setresgid16 */ /* 170 */
.long _sys_getresgid /* getresgid16 */
.long _sys_prctl
@@ -1040,7 +1040,7 @@ ENTRY(_sys_call_table)
.long _sys_ni_syscall /* reserved for TUX */
.long _sys_ni_syscall
.long _sys_gettid
- .long _sys_ni_syscall /* 225 */ /* sys_readahead */
+ .long _sys_readahead /* 225 */
.long _sys_setxattr
.long _sys_lsetxattr
.long _sys_fsetxattr
@@ -1157,6 +1157,18 @@ ENTRY(_sys_call_table)
.long _sys_shmctl
.long _sys_shmdt /* 340 */
.long _sys_shmget
+ .long _sys_splice
+ .long _sys_sync_file_range
+ .long _sys_tee
+ .long _sys_vmsplice /* 345 */
+ .long _sys_epoll_pwait
+ .long _sys_utimensat
+ .long _sys_signalfd
+ .l...
I thought this list seemed a little long, so I investigated a couple
of them. mbind makes sense (it's only implemented for NUMA ... a NUMA
embedded platform? not the kind which runs applications that use mbind),
but mremap doesn't -- there's even an implementation in mm/nommu.c.
Could you check the rest of these over to see if they truly don't need
to be implemented for no-mmu? I think you'll want the *robust_list--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-
There are embedded platforms that are using NUMA memory policies,
including mbind() in applications for setting them. Page migration is a
little iffier, but that can be turned off. Embedded platforms with
multiple memories (and a different cost per memory) are quite common, and
they're getting large enough to offset the overhead of a pgdat + bootmem
map. We have them on nommu also, but that's not been hacked up generically yet.
-
sorry, i dont quite follow ... you're saying it does or doesnt make
sense to have NUMA syscalls on a no-mmu platform ? my [limited]
understanding of NUMA is that it, by definition, requires a MMU inlack of man pages on these made be lazy and dump em into the mmu pile
useful only with SMP so i guess we should do it
-mike
-
Yes, I do think so, both sys_mremap and sys_munmap are implemented in
No man pages for this fancy syscalls. I found some info here:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commi...also the brand new syscall fallocate should be added as Paul said:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commi...Thanks a lot
-Bryan-
There's a mremap in nommu.c, but it doesn't do a lot that is useful.
With some further mm changes in our tree, it's little more than a fancy
way of saying munmap, and uClibc does not use it, so there's no
compelling need to have it in userspace.Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
-
Make sense. So currently Blackfin uClinux use the mremap/munmap in
uClibc?Thanks
-Bryan
-
most functions like this dont have any real libc component ... uClibc
will define userspace symbols that merely make a syscall iff the __NR_
exists in the headersif we have __NR_mremap in our unistd.h, we'll automagically get the
mremap() symbol in uClibc which simply passes along the args to the
kernel
-mike
-
Yes, I know this. But currently, __NR_mremap does not exit in Blackfin
unistd.h:
/* 163 __NR_mremap */.So the implementation of this kind syscalls should be in uClibc, right?
And Bernd said that the kernel version mremap/munmap is not very useful
for Blackfin arch. I think mremap/munmap can be ignored in Blackfin.Thanks
-Bryan
-
no ... if the kernel supports it, uClibc supports ... if the kernel
doesnt support, uClibc doesnt support itadding a ghetto userspace implementation to workaround this is weak
... that'll just mean random bugs may crop up on us that dont exist
for any other architecture simply because we opted not to hook up the
common kernel versioneither we support it and have the kernel pull in the common one or we
dont support ... no middle ground here
-mike
-
Err, why did you change __NR_syscall? This is going to break the ABI for
anything using it, which is generally bad form.You also missed sys_fallocate(), another reason to be using git, rather
than some silly subversion tree ;-)
-
I can't read or think today, nevermind. The sys_fallocate() thing still
stands, though.
-
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| David Chinner | Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md. |
| Andrew Morton | -mm merge plans for 2.6.23 |
| Trent Piepho | Re: [PATCH] [POWERPC] Improve (in|out)_beXX() asm code |
git: | |
| David Miller | Re: iptables very slow after commit784544739a25c30637397ace5489eeb6e15d7d49 |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
