From 21797c599c710d3851d241c4b50690f2482bf618 Mon Sep 17 00:00:00 2001 From: Daniele Calore Date: Tue, 8 Dec 2009 13:59:47 -0500 Subject: alpha: Wire up missing/new syscalls This wire up the: fallocate, timerfd_create, timerfd_settime, timerfd_gettime, signalfd4, eventfd2, epoll_create1, dup3, pipe2, inotify_init1, preadv, pwritev and rt_tgsigqueueinfo syscalls for the alpha port. For umount2, alpha have an "old" and "new" version called: oldumount and umount; so ignore umount2. Rebased on top of 6e17e8b9fb74b9fb9f6ea331f7f4a049c5b4c4b8 by Matt Turner. Signed-off-by: Daniele Calore Cc: Richard Henderson Cc: Ivan Kokshaysky Signed-off-by: Matt Turner --- arch/alpha/include/asm/unistd.h | 16 +++++++++++++++- arch/alpha/kernel/systbls.S | 15 ++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 7f23665122d..62e823e68f6 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -247,6 +247,7 @@ #define __IGNORE_pause #define __IGNORE_time #define __IGNORE_utime +#define __IGNORE_umount2 /* * Linux-specific system calls begin at 300 @@ -434,10 +435,23 @@ #define __NR_timerfd 477 #define __NR_eventfd 478 #define __NR_recvmmsg 479 +#define __NR_fallocate 480 +#define __NR_timerfd_create 481 +#define __NR_timerfd_settime 482 +#define __NR_timerfd_gettime 483 +#define __NR_signalfd4 484 +#define __NR_eventfd2 485 +#define __NR_epoll_create1 486 +#define __NR_dup3 487 +#define __NR_pipe2 488 +#define __NR_inotify_init1 489 +#define __NR_preadv 490 +#define __NR_pwritev 491 +#define __NR_rt_tgsigqueueinfo 492 #ifdef __KERNEL__ -#define NR_SYSCALLS 480 +#define NR_SYSCALLS 493 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index cda6b8b3d57..d0bc3c8c3ed 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S @@ -495,9 +495,22 @@ sys_call_table: .quad sys_epoll_pwait .quad sys_utimensat /* 475 */ .quad sys_signalfd - .quad sys_ni_syscall + .quad sys_ni_syscall /* sys_timerfd */ .quad sys_eventfd .quad sys_recvmmsg + .quad sys_fallocate /* 480 */ + .quad sys_timerfd_create + .quad sys_timerfd_settime + .quad sys_timerfd_gettime + .quad sys_signalfd4 + .quad sys_eventfd2 /* 485 */ + .quad sys_epoll_create1 + .quad sys_dup3 + .quad sys_pipe2 + .quad sys_inotify_init1 + .quad sys_preadv /* 490 */ + .quad sys_pwritev + .quad sys_rt_tgsigqueueinfo .size sys_call_table, . - sys_call_table .type sys_call_table, @object -- cgit v1.2.3 From a582e6f01b90211933e70edcec9bc0bbb1157402 Mon Sep 17 00:00:00 2001 From: Michael Cree Date: Tue, 8 Dec 2009 14:27:01 -0500 Subject: alpha: Add minimal support for software performance events In the kernel the patch enables configuration of the perf event option, adds the perf_event_open syscall, and includes a minimal architecture specific asm/perf_event.h header file. Signed-off-by: Michael Cree Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Peter Zijlstra Cc: Paul Mackerras Cc: Ingo Molnar Signed-off-by: Matt Turner --- arch/alpha/Kconfig | 1 + arch/alpha/include/asm/perf_event.h | 9 +++++++++ arch/alpha/include/asm/unistd.h | 3 ++- arch/alpha/kernel/systbls.S | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 arch/alpha/include/asm/perf_event.h diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 443448154f3..bd7261ea8f9 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig @@ -9,6 +9,7 @@ config ALPHA select HAVE_IDE select HAVE_OPROFILE select HAVE_SYSCALL_WRAPPERS + select HAVE_PERF_EVENTS help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, diff --git a/arch/alpha/include/asm/perf_event.h b/arch/alpha/include/asm/perf_event.h new file mode 100644 index 00000000000..3bef8522017 --- /dev/null +++ b/arch/alpha/include/asm/perf_event.h @@ -0,0 +1,9 @@ +#ifndef __ASM_ALPHA_PERF_EVENT_H +#define __ASM_ALPHA_PERF_EVENT_H + +/* Alpha only supports software events through this interface. */ +static inline void set_perf_event_pending(void) { } + +#define PERF_EVENT_INDEX_OFFSET 0 + +#endif /* __ASM_ALPHA_PERF_EVENT_H */ diff --git a/arch/alpha/include/asm/unistd.h b/arch/alpha/include/asm/unistd.h index 62e823e68f6..804e5311c84 100644 --- a/arch/alpha/include/asm/unistd.h +++ b/arch/alpha/include/asm/unistd.h @@ -448,10 +448,11 @@ #define __NR_preadv 490 #define __NR_pwritev 491 #define __NR_rt_tgsigqueueinfo 492 +#define __NR_perf_event_open 493 #ifdef __KERNEL__ -#define NR_SYSCALLS 493 +#define NR_SYSCALLS 494 #define __ARCH_WANT_IPC_PARSE_VERSION #define __ARCH_WANT_OLD_READDIR diff --git a/arch/alpha/kernel/systbls.S b/arch/alpha/kernel/systbls.S index d0bc3c8c3ed..09acb786e72 100644 --- a/arch/alpha/kernel/systbls.S +++ b/arch/alpha/kernel/systbls.S @@ -511,6 +511,7 @@ sys_call_table: .quad sys_preadv /* 490 */ .quad sys_pwritev .quad sys_rt_tgsigqueueinfo + .quad sys_perf_event_open .size sys_call_table, . - sys_call_table .type sys_call_table, @object -- cgit v1.2.3 From acadbfb90a54673d6c8b05aa4e93218433890411 Mon Sep 17 00:00:00 2001 From: David Daney Date: Thu, 10 Dec 2009 18:07:24 -0500 Subject: alpha: Convert BUG() to use unreachable() Use the new unreachable() macro instead of for(;;); Signed-off-by: David Daney CC: Richard Henderson CC: Ivan Kokshaysky CC: linux-alpha@vger.kernel.org Signed-off-by: Matt Turner --- arch/alpha/include/asm/bug.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/alpha/include/asm/bug.h b/arch/alpha/include/asm/bug.h index 1720c8ad86f..f091682e3cc 100644 --- a/arch/alpha/include/asm/bug.h +++ b/arch/alpha/include/asm/bug.h @@ -13,7 +13,8 @@ "call_pal %0 # bugchk\n\t" \ ".long %1\n\t.8byte %2" \ : : "i"(PAL_bugchk), "i"(__LINE__), "i"(__FILE__)); \ - for ( ; ; ); } while (0) + unreachable(); \ + } while (0) #define HAVE_ARCH_BUG #endif -- cgit v1.2.3