linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Axtens <dja@axtens.net>
To: linuxppc-dev@lists.ozlabs.org
Cc: Daniel Axtens <dja@axtens.net>
Subject: [PATCH v2 5/5] powerpc/sparse: Add more assembler prototypes
Date: Tue,  6 Sep 2016 15:32:43 +1000	[thread overview]
Message-ID: <1473139963-7496-5-git-send-email-dja@axtens.net> (raw)
In-Reply-To: <1473139963-7496-1-git-send-email-dja@axtens.net>

Another set of things that are only called from assembler and so need
prototypes to keep sparse happy.

Signed-off-by: Daniel Axtens <dja@axtens.net>

---

v2: Fix a couple of issues identified by the 0day bot:
    - different definition of sys_swapendian for 32/64
    - the previous fadump patch fixes a weird interaction with headers
      that the bot picked up.

Again, created semi-programatically and compile-tested against
top-level defconfigs.
---
 arch/powerpc/include/asm/asm-prototypes.h | 37 +++++++++++++++++++++++++++++++
 arch/powerpc/kernel/irq.c                 |  1 +
 arch/powerpc/kernel/process.c             |  1 +
 arch/powerpc/kernel/prom_init.c           |  1 +
 arch/powerpc/kernel/ptrace.c              |  1 +
 arch/powerpc/kernel/signal_32.c           |  1 +
 arch/powerpc/kernel/signal_64.c           |  1 +
 arch/powerpc/kernel/syscalls.c            |  1 +
 arch/powerpc/kernel/time.c                |  1 +
 9 files changed, 45 insertions(+)

diff --git a/arch/powerpc/include/asm/asm-prototypes.h b/arch/powerpc/include/asm/asm-prototypes.h
index ce8c1158a2c0..250c04e28670 100644
--- a/arch/powerpc/include/asm/asm-prototypes.h
+++ b/arch/powerpc/include/asm/asm-prototypes.h
@@ -18,6 +18,8 @@
 #include <linux/kvm_host.h>
 #endif
 
+#include <uapi/asm/ucontext.h>
+
 /* SMP */
 extern struct thread_info *current_set[NR_CPUS];
 extern struct thread_info *secondary_ti;
@@ -116,4 +118,39 @@ int kvmppc_rm_h_cppr(struct kvm_vcpu *vcpu, unsigned long cppr);
 int kvmppc_rm_h_eoi(struct kvm_vcpu *vcpu, unsigned long xirr);
 #endif
 
+/* signals, syscalls and interrupts */
+#ifdef CONFIG_PPC64
+int sys_swapcontext(struct ucontext __user *old_ctx,
+                    struct ucontext __user *new_ctx,
+                    long ctx_size, long r6, long r7, long r8, struct pt_regs *regs);
+#else
+long sys_swapcontext(struct ucontext __user *old_ctx,
+                    struct ucontext __user *new_ctx,
+                    int ctx_size, int r6, int r7, int r8, struct pt_regs *regs);
+#endif
+long sys_switch_endian(void);
+notrace unsigned int __check_irq_replay(void);
+void notrace restore_interrupts(void);
+
+/* ptrace */
+long do_syscall_trace_enter(struct pt_regs *regs);
+void do_syscall_trace_leave(struct pt_regs *regs);
+
+/* process */
+void restore_math(struct pt_regs *regs);
+void restore_tm_state(struct pt_regs *regs);
+
+/* prom_init (OpenFirmware) */
+unsigned long __init prom_init(unsigned long r3, unsigned long r4,
+                               unsigned long pp,
+                               unsigned long r6, unsigned long r7,
+                               unsigned long kbase);
+
+/* setup */
+void __init early_setup(unsigned long dt_ptr);
+void early_setup_secondary(void);
+
+/* time */
+void accumulate_stolen_time(void);
+
 #endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 08887cf2b20e..9594ac8e7090 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -67,6 +67,7 @@
 #include <asm/smp.h>
 #include <asm/debug.h>
 #include <asm/livepatch.h>
+#include <asm/asm-prototypes.h>
 
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 9ee2623e0f67..ce8a26a0c947 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -59,6 +59,7 @@
 #include <asm/exec.h>
 #include <asm/livepatch.h>
 #include <asm/cpu_has_feature.h>
+#include <asm/asm-prototypes.h>
 
 #include <linux/kprobes.h>
 #include <linux/kdebug.h>
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 4e74fc588a3f..84b0d677f6ce 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -42,6 +42,7 @@
 #include <asm/sections.h>
 #include <asm/machdep.h>
 #include <asm/opal.h>
+#include <asm/asm-prototypes.h>
 
 #include <linux/linux_logo.h>
 
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index bf91658a8a40..2299bf60780d 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -39,6 +39,7 @@
 #include <asm/pgtable.h>
 #include <asm/switch_to.h>
 #include <asm/tm.h>
+#include <asm/asm-prototypes.h>
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/syscalls.h>
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index b6aa378aff63..c35186b46590 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -44,6 +44,7 @@
 #include <asm/vdso.h>
 #include <asm/switch_to.h>
 #include <asm/tm.h>
+#include <asm/asm-prototypes.h>
 #ifdef CONFIG_PPC64
 #include "ppc32.h"
 #include <asm/unistd.h>
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 7e49984d4331..3e8feb1824d8 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -35,6 +35,7 @@
 #include <asm/vdso.h>
 #include <asm/switch_to.h>
 #include <asm/tm.h>
+#include <asm/asm-prototypes.h>
 
 #include "signal.h"
 
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index 5fa92706444b..644cce3d8dce 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -40,6 +40,7 @@
 #include <asm/syscalls.h>
 #include <asm/time.h>
 #include <asm/unistd.h>
+#include <asm/asm-prototypes.h>
 
 static inline unsigned long do_mmap2(unsigned long addr, size_t len,
 			unsigned long prot, unsigned long flags,
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 3efbedefba6a..67859b7d1c97 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -73,6 +73,7 @@
 #include <asm/vdso_datapage.h>
 #include <asm/firmware.h>
 #include <asm/cputime.h>
+#include <asm/asm-prototypes.h>
 
 /* powerpc clocksource/clockevent code */
 
-- 
2.7.4

  parent reply	other threads:[~2016-09-06  5:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06  5:32 [PATCH v2 1/5] powerpc/cell: drop unused iic_get_irq_host() Daniel Axtens
2016-09-06  5:32 ` [PATCH v2 2/5] powerpc/sparse: Make a bunch of things static Daniel Axtens
2016-09-13 12:16   ` [v2,2/5] " Michael Ellerman
2016-09-14  0:11   ` [PATCH v2 2/5] " Michael Ellerman
2016-09-06  5:32 ` [PATCH v2 3/5] powerpc/kvm: sparse: prototypes for functions called from assembler Daniel Axtens
2016-09-06  5:32 ` [PATCH v2 4/5] powerpc/fadump: Make ELF eflags depend on endian Daniel Axtens
2016-09-08  7:00   ` Mahesh Jagannath Salgaonkar
2016-09-08  8:21     ` Mahesh Jagannath Salgaonkar
2016-09-09 10:58       ` Michael Ellerman
2016-09-08  9:17     ` Michael Ellerman
2016-09-08  9:35     ` Michael Ellerman
2016-09-13 12:16   ` [v2,4/5] " Michael Ellerman
2016-09-06  5:32 ` Daniel Axtens [this message]
2016-09-13 12:16   ` [v2,5/5] powerpc/sparse: Add more assembler prototypes Michael Ellerman
2016-09-06  6:01 ` [PATCH v2 1/5] powerpc/cell: drop unused iic_get_irq_host() Andrew Donnellan
2016-09-08  7:44 ` Arnd Bergmann
2016-09-09  0:43   ` Daniel Axtens
2016-09-09  1:14     ` Andrew Donnellan
2016-09-09  7:42     ` Arnd Bergmann
2016-09-13 12:16 ` [v2,1/5] " Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473139963-7496-5-git-send-email-dja@axtens.net \
    --to=dja@axtens.net \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).