* [PATCH] FRV: Wire up new syscalls
@ 2014-11-09 16:26 Faisal Abbas
2014-11-10 23:21 ` Andrew Morton
0 siblings, 1 reply; 15+ messages in thread
From: Faisal Abbas @ 2014-11-09 16:26 UTC (permalink / raw)
To: dhowells, fabf; +Cc: akpm, linux-kernel
Compiling source tree for FRV generates following warnings so wire these syscalls up.
<stdin>:1187:2: warning: #warning syscall recvmmsg not implemented [-Wcpp]
<stdin>:1190:2: warning: #warning syscall fanotify_init not implemented [-Wcpp]
<stdin>:1193:2: warning: #warning syscall fanotify_mark not implemented [-Wcpp]
<stdin>:1196:2: warning: #warning syscall prlimit64 not implemented [-Wcpp]
<stdin>:1199:2: warning: #warning syscall name_to_handle_at not implemented [-Wcpp]
<stdin>:1202:2: warning: #warning syscall open_by_handle_at not implemented [-Wcpp]
<stdin>:1205:2: warning: #warning syscall clock_adjtime not implemented [-Wcpp]
<stdin>:1208:2: warning: #warning syscall syncfs not implemented [-Wcpp]
<stdin>:1211:2: warning: #warning syscall sendmmsg not implemented [-Wcpp]
<stdin>:1217:2: warning: #warning syscall process_vm_readv not implemented [-Wcpp]
<stdin>:1220:2: warning: #warning syscall process_vm_writev not implemented [-Wcpp]
<stdin>:1223:2: warning: #warning syscall kcmp not implemented [-Wcpp]
<stdin>:1226:2: warning: #warning syscall finit_module not implemented [-Wcpp]
<stdin>:1229:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
<stdin>:1232:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
<stdin>:1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp]
<stdin>:1238:2: warning: #warning syscall seccomp not implemented [-Wcpp]
<stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
<stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
<stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
Signed-off-by: Faisal Abbas <90.abbasfaisal@gmail.com>
---
arch/frv/include/asm/unistd.h | 2 +-
arch/frv/include/uapi/asm/unistd.h | 20 ++++++++++++++++++++
arch/frv/kernel/entry.S | 22 +++++++++++++++++++++-
3 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h
index 17b5df8..a7f3488 100644
--- a/arch/frv/include/asm/unistd.h
+++ b/arch/frv/include/asm/unistd.h
@@ -4,7 +4,7 @@
#include <uapi/asm/unistd.h>
-#define NR_syscalls 338
+#define NR_syscalls 358
/* #define __ARCH_WANT_OLD_READDIR */
#define __ARCH_WANT_OLD_STAT
diff --git a/arch/frv/include/uapi/asm/unistd.h b/arch/frv/include/uapi/asm/unistd.h
index 9e2612f..0549798 100644
--- a/arch/frv/include/uapi/asm/unistd.h
+++ b/arch/frv/include/uapi/asm/unistd.h
@@ -344,5 +344,25 @@
#define __NR_rt_tgsigqueueinfo 335
#define __NR_perf_event_open 336
#define __NR_setns 337
+#define __NR_recvmmsg 338
+#define __NR_fanotify_init 339
+#define __NR_fanotify_mark 340
+#define __NR_prlimit64 341
+#define __NR_name_to_handle_at 342
+#define __NR_open_by_handle_at 343
+#define __NR_clock_adjtime 344
+#define __NR_syncfs 345
+#define __NR_sendmmsg 346
+#define __NR_process_vm_readv 347
+#define __NR_process_vm_writev 348
+#define __NR_kcmp 349
+#define __NR_finit_module 350
+#define __NR_sched_setattr 351
+#define __NR_sched_getattr 352
+#define __NR_renameat2 353
+#define __NR_seccomp 354
+#define __NR_getrandom 355
+#define __NR_memfd_create 356
+#define __NR_bpf 357
#endif /* _UAPI_ASM_UNISTD_H_ */
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index dfcd263..66debb5 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -1515,5 +1515,25 @@ sys_call_table:
.long sys_rt_tgsigqueueinfo /* 335 */
.long sys_perf_event_open
.long sys_setns
-
+ .long sys_recvmmsg
+ .long sys_fanotify_init
+ .long sys_fanotify_mark
+ .long sys_prlimit64
+ .long sys_name_to_handle_at
+ .long sys_open_by_handle_at
+ .long sys_clock_adjtime
+ .long sys_syncfs
+ .long sys_sendmmsg
+ .long sys_process_vm_readv
+ .long sys_process_vm_writev
+ .long sys_kcmp
+ .long sys_finit_module
+ .long sys_sched_setattr
+ .long sys_sched_getattr
+ .long sys_renameat2
+ .long sys_seccomp
+ .long sys_getrandom
+ .long sys_memfd_create
+ .long sys_bpf
+
syscall_table_size = (. - sys_call_table)
--
1.7.9.5
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2014-11-09 16:26 [PATCH] FRV: Wire up new syscalls Faisal Abbas
@ 2014-11-10 23:21 ` Andrew Morton
0 siblings, 0 replies; 15+ messages in thread
From: Andrew Morton @ 2014-11-10 23:21 UTC (permalink / raw)
To: Faisal Abbas; +Cc: dhowells, fabf, linux-kernel
On Sun, 9 Nov 2014 21:26:03 +0500 Faisal Abbas <90.abbasfaisal@gmail.com> wrote:
> Compiling source tree for FRV generates following warnings so wire these syscalls up.
>
> <stdin>:1187:2: warning: #warning syscall recvmmsg not implemented [-Wcpp]
> <stdin>:1190:2: warning: #warning syscall fanotify_init not implemented [-Wcpp]
It's David's call, but I'd be reluctant to make changes like this
unless it's shown that each of these syscalls actually works correctly
on FRV.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 14:10 ` David Howells
2009-07-01 14:49 ` Ingo Molnar
@ 2009-07-01 15:19 ` David Howells
1 sibling, 0 replies; 15+ messages in thread
From: David Howells @ 2009-07-01 15:19 UTC (permalink / raw)
To: Ingo Molnar
Cc: dhowells, Paul Mackerras, Arnd Bergmann, torvalds, akpm, linux-kernel
Ingo Molnar <mingo@elte.hu> wrote:
> Ok, indeed - you can define it to 0 for now - FRV wont set hw counters so it
> doesnt matter.
Okay. FRV does have some h/w perf counters for measuring various things about
userspace and kernel execution. I'll have to look at how to use them with
this.
David
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 14:10 ` David Howells
@ 2009-07-01 14:49 ` Ingo Molnar
2009-07-01 15:19 ` David Howells
1 sibling, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2009-07-01 14:49 UTC (permalink / raw)
To: David Howells; +Cc: Paul Mackerras, Arnd Bergmann, torvalds, akpm, linux-kernel
* David Howells <dhowells@redhat.com> wrote:
> Ingo Molnar <mingo@elte.hu> wrote:
>
> > Yeah - still i'd suggest to just go with the generic code initially,
>
> Nah, that's no fun! Besides, the code is very similar to the 32-bit code, and
> I'm fairly certain it'll work. I can also check it very easily by dumping
> some temp test code in setup.c.
>
> Anyway, I see the following errors:
>
> kernel/perf_counter.c: In function 'perf_counter_index':
> kernel/perf_counter.c:1889: error: 'PERF_COUNTER_INDEX_OFFSET' undeclared (first use in this function)
> kernel/perf_counter.c:1889: error: (Each undeclared identifier is reported only once
> kernel/perf_counter.c:1889: error: for each function it appears in.)
> CC block/as-iosched.o
> kernel/perf_counter.c:1890: warning: control reaches end of non-void function
Ok, indeed - you can define it to 0 for now - FRV wont set hw
counters so it doesnt matter. It is used for the hw index in the
mmap head for 'direct' access to the PMU, using special instructions
like RDPMC (on x86). Probably not relevant to FRV.
> But this symbol appears to be undocumented:
>
> warthog>grep -r PERF_COUNTER_INDEX_OFFSET Documentation/
> warthog1>grep -r INDEX_OFFSET Documentation/
> warthog1>
You can use the power of the Git space:
git log -SPERF_COUNTER_INDEX_OFFSET
:-)
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 12:41 ` David Howells
2009-07-01 13:13 ` Ingo Molnar
@ 2009-07-01 14:10 ` David Howells
2009-07-01 14:49 ` Ingo Molnar
2009-07-01 15:19 ` David Howells
1 sibling, 2 replies; 15+ messages in thread
From: David Howells @ 2009-07-01 14:10 UTC (permalink / raw)
To: Ingo Molnar
Cc: dhowells, Paul Mackerras, Arnd Bergmann, torvalds, akpm, linux-kernel
Ingo Molnar <mingo@elte.hu> wrote:
> Yeah - still i'd suggest to just go with the generic code initially,
Nah, that's no fun! Besides, the code is very similar to the 32-bit code, and
I'm fairly certain it'll work. I can also check it very easily by dumping
some temp test code in setup.c.
Anyway, I see the following errors:
kernel/perf_counter.c: In function 'perf_counter_index':
kernel/perf_counter.c:1889: error: 'PERF_COUNTER_INDEX_OFFSET' undeclared (first use in this function)
kernel/perf_counter.c:1889: error: (Each undeclared identifier is reported only once
kernel/perf_counter.c:1889: error: for each function it appears in.)
CC block/as-iosched.o
kernel/perf_counter.c:1890: warning: control reaches end of non-void function
But this symbol appears to be undocumented:
warthog>grep -r PERF_COUNTER_INDEX_OFFSET Documentation/
warthog1>grep -r INDEX_OFFSET Documentation/
warthog1>
David
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 12:41 ` David Howells
@ 2009-07-01 13:13 ` Ingo Molnar
2009-07-01 14:10 ` David Howells
1 sibling, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2009-07-01 13:13 UTC (permalink / raw)
To: David Howells; +Cc: Paul Mackerras, Arnd Bergmann, torvalds, akpm, linux-kernel
* David Howells <dhowells@redhat.com> wrote:
> Paul Mackerras <paulus@samba.org> wrote:
>
> > I did a generic implementation using irq disable on UP and
> > hashed spin-locks on SMP. See 09d4e0ed for the implementation
>
> I can do better than that on FRV. FRV has load/store-double
> instructions that I can use to atomically load/store 64-bit memory
> locations by using paired registers for the data.
Yeah - still i'd suggest to just go with the generic code initially,
as then 'perf' output itself can be used to verify whether the FRV
atomic64_t implementation is correct.
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 12:19 ` David Howells
2009-07-01 12:36 ` Paul Mackerras
@ 2009-07-01 12:41 ` David Howells
2009-07-01 13:13 ` Ingo Molnar
2009-07-01 14:10 ` David Howells
1 sibling, 2 replies; 15+ messages in thread
From: David Howells @ 2009-07-01 12:41 UTC (permalink / raw)
To: Paul Mackerras
Cc: dhowells, Ingo Molnar, Arnd Bergmann, torvalds, akpm, linux-kernel
Paul Mackerras <paulus@samba.org> wrote:
> I did a generic implementation using irq disable on UP and hashed
> spin-locks on SMP. See 09d4e0ed for the implementation
I can do better than that on FRV. FRV has load/store-double instructions that
I can use to atomically load/store 64-bit memory locations by using paired
registers for the data.
David
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 12:19 ` David Howells
@ 2009-07-01 12:36 ` Paul Mackerras
2009-07-01 12:41 ` David Howells
1 sibling, 0 replies; 15+ messages in thread
From: Paul Mackerras @ 2009-07-01 12:36 UTC (permalink / raw)
To: David Howells; +Cc: Ingo Molnar, Arnd Bergmann, torvalds, akpm, linux-kernel
David Howells writes:
> It requires atomic64_t. Is that mandatory on all arches now?
I did a generic implementation using irq disable on UP and hashed
spin-locks on SMP. See 09d4e0ed for the implementation and c2e95c6d
for an example of how to wire it up.
Paul.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 11:28 ` David Howells
2009-07-01 11:54 ` Ingo Molnar
@ 2009-07-01 12:19 ` David Howells
2009-07-01 12:36 ` Paul Mackerras
2009-07-01 12:41 ` David Howells
1 sibling, 2 replies; 15+ messages in thread
From: David Howells @ 2009-07-01 12:19 UTC (permalink / raw)
To: Ingo Molnar; +Cc: dhowells, Arnd Bergmann, torvalds, akpm, linux-kernel
Ingo Molnar <mingo@elte.hu> wrote:
> [ There might be unanticipated problems of course - please report to
> us any problems (tools/perf/ does not build cleanly, features dont
> work as expected, etc.). ]
It requires atomic64_t. Is that mandatory on all arches now?
David
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-07-01 11:28 ` David Howells
@ 2009-07-01 11:54 ` Ingo Molnar
2009-07-01 12:19 ` David Howells
1 sibling, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2009-07-01 11:54 UTC (permalink / raw)
To: David Howells; +Cc: Arnd Bergmann, torvalds, akpm, linux-kernel
* David Howells <dhowells@redhat.com> wrote:
> Ingo Molnar <mingo@elte.hu> wrote:
>
> > It would make sense to wire it up for real as it's really easy:
> > just set HAVE_PERF_COUNTERS in arch/frv/Kconfig, add an empty
> > arch/frv/include/asm/perf_counter.h file. (Optional: double
> > check that tools/perf/ builds and works fine on FRV ;-)
>
> Are these for hardware performance counters?
No. PMU support is not necessary in the first step, you'll still get
plenty of features from enabling perfcounters on FRV:
- hrtimer driven recording/profiling
- various software counters
- working perf top / perf stat / perf record / perf report
The tools will all work out of box and there's a transparent
fall-back path in the tools if the hardware counters are not
available.
It's much easier to add than basic Oprofile support, and you'll get
a lot more features in exchange as well ;)
[ There might be unanticipated problems of course - please report to
us any problems (tools/perf/ does not build cleanly, features dont
work as expected, etc.). ]
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-06-30 21:41 ` Arnd Bergmann
2009-06-30 21:54 ` Ingo Molnar
@ 2009-07-01 11:28 ` David Howells
2009-07-01 11:54 ` Ingo Molnar
2009-07-01 12:19 ` David Howells
1 sibling, 2 replies; 15+ messages in thread
From: David Howells @ 2009-07-01 11:28 UTC (permalink / raw)
To: Ingo Molnar; +Cc: dhowells, Arnd Bergmann, torvalds, akpm, linux-kernel
Ingo Molnar <mingo@elte.hu> wrote:
> It would make sense to wire it up for real as it's really easy: just
> set HAVE_PERF_COUNTERS in arch/frv/Kconfig, add an empty
> arch/frv/include/asm/perf_counter.h file. (Optional: double check
> that tools/perf/ builds and works fine on FRV ;-)
Are these for hardware performance counters?
David
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-06-30 21:41 ` Arnd Bergmann
@ 2009-06-30 21:54 ` Ingo Molnar
2009-07-01 11:28 ` David Howells
1 sibling, 0 replies; 15+ messages in thread
From: Ingo Molnar @ 2009-06-30 21:54 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: David Howells, torvalds, akpm, linux-kernel
* Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday 30 June 2009, Ingo Molnar wrote:
> > * David Howells <dhowells@redhat.com> wrote:
> >
> > > Wire up new syscalls rt_tgsigqueueinfo and perf_counter_open.
> >
> > > + .long sys_perf_counter_open
> >
> > Hm, i suspect this should be sys_ni because FRV does not set
> > HAVE_PERF_COUNTERS so perfcounters cannot be enabled. (Or do you
> > have patches in the pipeline that enable perfcounters for FRV?)
>
> It doesn't matter because of the cond_syscall() in
> kernel/sys_ni.c. Right now, scripts/checksyscalls.sh causes a
> warning on each architecture that does not assign a system call
> number for sys_perf_counter_open, so they might as well make it
> point to sys_ni though cond_syscall().
It would make sense to wire it up for real as it's really easy: just
set HAVE_PERF_COUNTERS in arch/frv/Kconfig, add an empty
arch/frv/include/asm/perf_counter.h file. (Optional: double check
that tools/perf/ builds and works fine on FRV ;-)
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-06-30 21:34 ` Ingo Molnar
@ 2009-06-30 21:41 ` Arnd Bergmann
2009-06-30 21:54 ` Ingo Molnar
2009-07-01 11:28 ` David Howells
0 siblings, 2 replies; 15+ messages in thread
From: Arnd Bergmann @ 2009-06-30 21:41 UTC (permalink / raw)
To: Ingo Molnar; +Cc: David Howells, torvalds, akpm, linux-kernel
On Tuesday 30 June 2009, Ingo Molnar wrote:
> * David Howells <dhowells@redhat.com> wrote:
>
> > Wire up new syscalls rt_tgsigqueueinfo and perf_counter_open.
>
> > + .long sys_perf_counter_open
>
> Hm, i suspect this should be sys_ni because FRV does not set
> HAVE_PERF_COUNTERS so perfcounters cannot be enabled. (Or do you
> have patches in the pipeline that enable perfcounters for FRV?)
It doesn't matter because of the cond_syscall() in kernel/sys_ni.c.
Right now, scripts/checksyscalls.sh causes a warning on each architecture
that does not assign a system call number for sys_perf_counter_open,
so they might as well make it point to sys_ni though cond_syscall().
Arnd <><
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] FRV: Wire up new syscalls
2009-06-30 21:24 David Howells
@ 2009-06-30 21:34 ` Ingo Molnar
2009-06-30 21:41 ` Arnd Bergmann
0 siblings, 1 reply; 15+ messages in thread
From: Ingo Molnar @ 2009-06-30 21:34 UTC (permalink / raw)
To: David Howells; +Cc: torvalds, akpm, linux-kernel
* David Howells <dhowells@redhat.com> wrote:
> Wire up new syscalls rt_tgsigqueueinfo and perf_counter_open.
> + .long sys_perf_counter_open
Hm, i suspect this should be sys_ni because FRV does not set
HAVE_PERF_COUNTERS so perfcounters cannot be enabled. (Or do you
have patches in the pipeline that enable perfcounters for FRV?)
Ingo
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] FRV: Wire up new syscalls
@ 2009-06-30 21:24 David Howells
2009-06-30 21:34 ` Ingo Molnar
0 siblings, 1 reply; 15+ messages in thread
From: David Howells @ 2009-06-30 21:24 UTC (permalink / raw)
To: torvalds, akpm; +Cc: linux-kernel, David Howells
Wire up new syscalls rt_tgsigqueueinfo and perf_counter_open.
Signed-off-by: David Howells <dhowells@redhat.com>
---
arch/frv/include/asm/unistd.h | 4 +++-
arch/frv/kernel/entry.S | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/frv/include/asm/unistd.h b/arch/frv/include/asm/unistd.h
index 96d78d5..4a8fb42 100644
--- a/arch/frv/include/asm/unistd.h
+++ b/arch/frv/include/asm/unistd.h
@@ -341,10 +341,12 @@
#define __NR_inotify_init1 332
#define __NR_preadv 333
#define __NR_pwritev 334
+#define __NR_rt_tgsigqueueinfo 335
+#define __NR_perf_counter_open 336
#ifdef __KERNEL__
-#define NR_syscalls 335
+#define NR_syscalls 337
#define __ARCH_WANT_IPC_PARSE_VERSION
/* #define __ARCH_WANT_OLD_READDIR */
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 356e0e3..fde1e44 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -1524,5 +1524,7 @@ sys_call_table:
.long sys_inotify_init1
.long sys_preadv
.long sys_pwritev
+ .long sys_rt_tgsigqueueinfo /* 335 */
+ .long sys_perf_counter_open
syscall_table_size = (. - sys_call_table)
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2014-11-10 23:21 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-09 16:26 [PATCH] FRV: Wire up new syscalls Faisal Abbas
2014-11-10 23:21 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2009-06-30 21:24 David Howells
2009-06-30 21:34 ` Ingo Molnar
2009-06-30 21:41 ` Arnd Bergmann
2009-06-30 21:54 ` Ingo Molnar
2009-07-01 11:28 ` David Howells
2009-07-01 11:54 ` Ingo Molnar
2009-07-01 12:19 ` David Howells
2009-07-01 12:36 ` Paul Mackerras
2009-07-01 12:41 ` David Howells
2009-07-01 13:13 ` Ingo Molnar
2009-07-01 14:10 ` David Howells
2009-07-01 14:49 ` Ingo Molnar
2009-07-01 15:19 ` David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®