mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] FRV: Wire up new syscalls
@ 2009-04-27 10:55 David Howells
  2009-04-27 10:55 ` [PATCH 2/2] FRV: Stop gcc from generating uninitialised variable warnings after BUG() David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2009-04-27 10:55 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel, dhowells

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

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 edcfaf5..96d78d5 100644
--- a/arch/frv/include/asm/unistd.h
+++ b/arch/frv/include/asm/unistd.h
@@ -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 */
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 99060ab..1da523b 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -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)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] FRV: Stop gcc from generating uninitialised variable warnings after BUG()
  2009-04-27 10:55 [PATCH 1/2] FRV: Wire up new syscalls David Howells
@ 2009-04-27 10:55 ` David Howells
  0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2009-04-27 10:55 UTC (permalink / raw)
  To: torvalds, akpm; +Cc: linux-kernel, dhowells

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.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 arch/frv/include/asm/bug.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/arch/frv/include/asm/bug.h b/arch/frv/include/asm/bug.h
index 6b1b44d..2e05450 100644
--- a/arch/frv/include/asm/bug.h
+++ b/arch/frv/include/asm/bug.h
@@ -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>
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-27 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-27 10:55 [PATCH 1/2] FRV: Wire up new syscalls David Howells
2009-04-27 10:55 ` [PATCH 2/2] FRV: Stop gcc from generating uninitialised variable warnings after BUG() 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®