linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/vdso: Remove sys_ni_syscall and sys_call_table prototypes
@ 2015-12-03 11:31 Anton Blanchard
  2015-12-17  4:08 ` Michael Ellerman
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2015-12-03 11:31 UTC (permalink / raw)
  To: Michael Ellerman, benh, paulus; +Cc: linuxppc-dev

Prototypes for sys_ni_syscall and sys_call_table are available
in header files, so remove the prototypes in c code.

This was noticed when building with -flto, because the prototype for
sys_ni_syscall doesn't match the function and we get a compiler error.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
index ab9f3f0..d65f0cc 100644
--- a/arch/powerpc/include/asm/syscall.h
+++ b/arch/powerpc/include/asm/syscall.h
@@ -17,10 +17,7 @@
 #include <linux/sched.h>
 #include <linux/thread_info.h>
 
-/* ftrace syscalls requires exporting the sys_call_table */
-#ifdef CONFIG_FTRACE_SYSCALLS
 extern const unsigned long sys_call_table[];
-#endif /* CONFIG_FTRACE_SYSCALLS */
 
 static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs)
 {
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index b457bfa..16d2d52 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -21,6 +21,7 @@
 #include <linux/elf.h>
 #include <linux/security.h>
 #include <linux/memblock.h>
+#include <linux/syscalls.h>
 
 #include <asm/pgtable.h>
 #include <asm/processor.h>
@@ -34,6 +35,7 @@
 #include <asm/vdso.h>
 #include <asm/vdso_datapage.h>
 #include <asm/setup.h>
+#include <asm/syscall.h>
 
 #undef DEBUG
 
@@ -667,9 +669,6 @@ static __init int vdso_setup(void)
 static void __init vdso_setup_syscall_map(void)
 {
 	unsigned int i;
-	extern unsigned long *sys_call_table;
-	extern unsigned long sys_ni_syscall;
-
 
 	for (i = 0; i < __NR_syscalls; i++) {
 #ifdef CONFIG_PPC64

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

* Re: powerpc/vdso: Remove sys_ni_syscall and sys_call_table prototypes
  2015-12-03 11:31 [PATCH] powerpc/vdso: Remove sys_ni_syscall and sys_call_table prototypes Anton Blanchard
@ 2015-12-17  4:08 ` Michael Ellerman
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2015-12-17  4:08 UTC (permalink / raw)
  To: Anton Blanchard, benh, paulus; +Cc: linuxppc-dev

On Thu, 2015-03-12 at 11:31:06 UTC, Anton Blanchard wrote:
> Prototypes for sys_ni_syscall and sys_call_table are available
> in header files, so remove the prototypes in c code.
> 
> This was noticed when building with -flto, because the prototype for
> sys_ni_syscall doesn't match the function and we get a compiler error.

Doesn't build for me:

arch/powerpc/kernel/vdso.c:675:27: error: comparison between pointer and integer [-Werror]
   if (sys_call_table[i*2] != sys_ni_syscall)
                           ^

etc.

cheers

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

end of thread, other threads:[~2015-12-17  4:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-03 11:31 [PATCH] powerpc/vdso: Remove sys_ni_syscall and sys_call_table prototypes Anton Blanchard
2015-12-17  4:08 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).