Skip to content

Commit 0545d54

Browse files
daxtensmpe
authored andcommitted
powerpc/sparse: Add more assembler prototypes
Another set of things that are only called from assembler and so need prototypes to keep sparse happy. Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent d8bced2 commit 0545d54

File tree

9 files changed

+45
-0
lines changed

9 files changed

+45
-0
lines changed

arch/powerpc/include/asm/asm-prototypes.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <linux/threads.h>
1616
#include <linux/kprobes.h>
1717

18+
#include <uapi/asm/ucontext.h>
19+
1820
/* SMP */
1921
extern struct thread_info *current_set[NR_CPUS];
2022
extern struct thread_info *secondary_ti;
@@ -72,4 +74,39 @@ void system_reset_exception(struct pt_regs *regs);
7274
void machine_check_exception(struct pt_regs *regs);
7375
void __kprobes emulation_assist_interrupt(struct pt_regs *regs);
7476

77+
/* signals, syscalls and interrupts */
78+
#ifdef CONFIG_PPC64
79+
int sys_swapcontext(struct ucontext __user *old_ctx,
80+
struct ucontext __user *new_ctx,
81+
long ctx_size, long r6, long r7, long r8, struct pt_regs *regs);
82+
#else
83+
long sys_swapcontext(struct ucontext __user *old_ctx,
84+
struct ucontext __user *new_ctx,
85+
int ctx_size, int r6, int r7, int r8, struct pt_regs *regs);
86+
#endif
87+
long sys_switch_endian(void);
88+
notrace unsigned int __check_irq_replay(void);
89+
void notrace restore_interrupts(void);
90+
91+
/* ptrace */
92+
long do_syscall_trace_enter(struct pt_regs *regs);
93+
void do_syscall_trace_leave(struct pt_regs *regs);
94+
95+
/* process */
96+
void restore_math(struct pt_regs *regs);
97+
void restore_tm_state(struct pt_regs *regs);
98+
99+
/* prom_init (OpenFirmware) */
100+
unsigned long __init prom_init(unsigned long r3, unsigned long r4,
101+
unsigned long pp,
102+
unsigned long r6, unsigned long r7,
103+
unsigned long kbase);
104+
105+
/* setup */
106+
void __init early_setup(unsigned long dt_ptr);
107+
void early_setup_secondary(void);
108+
109+
/* time */
110+
void accumulate_stolen_time(void);
111+
75112
#endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */

arch/powerpc/kernel/irq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#include <asm/smp.h>
6868
#include <asm/debug.h>
6969
#include <asm/livepatch.h>
70+
#include <asm/asm-prototypes.h>
7071

7172
#ifdef CONFIG_PPC64
7273
#include <asm/paca.h>

arch/powerpc/kernel/process.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
#include <asm/exec.h>
6060
#include <asm/livepatch.h>
6161
#include <asm/cpu_has_feature.h>
62+
#include <asm/asm-prototypes.h>
6263

6364
#include <linux/kprobes.h>
6465
#include <linux/kdebug.h>

arch/powerpc/kernel/prom_init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include <asm/sections.h>
4343
#include <asm/machdep.h>
4444
#include <asm/opal.h>
45+
#include <asm/asm-prototypes.h>
4546

4647
#include <linux/linux_logo.h>
4748

arch/powerpc/kernel/ptrace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
#include <asm/pgtable.h>
4040
#include <asm/switch_to.h>
4141
#include <asm/tm.h>
42+
#include <asm/asm-prototypes.h>
4243

4344
#define CREATE_TRACE_POINTS
4445
#include <trace/events/syscalls.h>

arch/powerpc/kernel/signal_32.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <asm/vdso.h>
4545
#include <asm/switch_to.h>
4646
#include <asm/tm.h>
47+
#include <asm/asm-prototypes.h>
4748
#ifdef CONFIG_PPC64
4849
#include "ppc32.h"
4950
#include <asm/unistd.h>

arch/powerpc/kernel/signal_64.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <asm/vdso.h>
3636
#include <asm/switch_to.h>
3737
#include <asm/tm.h>
38+
#include <asm/asm-prototypes.h>
3839

3940
#include "signal.h"
4041

arch/powerpc/kernel/syscalls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <asm/syscalls.h>
4141
#include <asm/time.h>
4242
#include <asm/unistd.h>
43+
#include <asm/asm-prototypes.h>
4344

4445
static inline unsigned long do_mmap2(unsigned long addr, size_t len,
4546
unsigned long prot, unsigned long flags,

arch/powerpc/kernel/time.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
#include <asm/vdso_datapage.h>
7474
#include <asm/firmware.h>
7575
#include <asm/cputime.h>
76+
#include <asm/asm-prototypes.h>
7677

7778
/* powerpc clocksource/clockevent code */
7879

0 commit comments

Comments
 (0)