Skip to contentSkip to conversation

FRV: Wire up new syscalls

PATCH New David Howells 1 participant 2 messages Apr 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 FRV: Wire up new syscalls

Wire up new system calls for the FRV arch (preadv and pwritev).

---

 arch/frv/include/asm/unistd.h |    4 +++-
 arch/frv/kernel/entry.S       |    2 ++
 2 files changed, 5 insertions(+), 1 deletions(-)
arch/frv/include/asm/unistd.h +3 -1
index edcfaf5..96d78d5 100644
@@ -339,10 +339,12 @@
 #define __NR_dup3		330
 #define __NR_pipe2		331
 #define __NR_inotify_init1	332
+#define __NR_preadv		333
+#define __NR_pwritev		334
 
 #ifdef __KERNEL__
 
-#define NR_syscalls 333
+#define NR_syscalls 335
 
 #define __ARCH_WANT_IPC_PARSE_VERSION
 /* #define __ARCH_WANT_OLD_READDIR */
arch/frv/kernel/entry.S +2 -0
index 99060ab..1da523b 100644
@@ -1525,5 +1525,7 @@ sys_call_table:
 	.long sys_dup3			/* 330 */
 	.long sys_pipe2
 	.long sys_inotify_init1
+	.long sys_preadv
+	.long sys_pwritev
 
 syscall_table_size = (. - sys_call_table)
#1 lore raw

PATCH 2/2 FRV: Stop gcc from generating uninitialised variable warnings after BUG()

Stop gcc from generating uninitialised variable warnings after BUG(). The problem is that FRV's call into its gdbstub appears to return (if the function is marked noreturn, then the compiler is under no obligation to pass it a return address, and so GDB won't know where the bug happened).

To get around this, we make the do...while wrapper in _debug_bug_trap() an endless loop from which there's no escape.

---

 arch/frv/include/asm/bug.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
arch/frv/include/asm/bug.h +3 -2
index 6b1b44d..2e05450 100644
@@ -30,7 +30,7 @@ extern void __debug_bug_printk(const char *file, unsigned line);
 do {						\
 	__debug_bug_trap(signr);		\
 	asm volatile("nop");			\
-} while(0)
+} while(1)
 
 #define HAVE_ARCH_BUG
 #define BUG()					\
@@ -46,7 +46,8 @@ do {						\
 #define HAVE_ARCH_KGDB_BAD_PAGE
 #define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
 #endif
-#endif
+
+#endif /* CONFIG_BUG */
 
 #include <asm-generic/bug.h>