diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-09-04 05:53:58 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-09-07 21:35:04 -0400 |
commit | fa43972fab24a3c050e880a7831f9378c6cebc0b (patch) | |
tree | 35d51e6a0ac6556f82d843506e8317854dc3192c /arch/sh/include | |
parent | 7d96169cb769f459dd6730b06fa3a88cb0c9297d (diff) |
sh: fixup many sparse errors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r-- | arch/sh/include/asm/clock.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/io.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/irq.h | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/processor.h | 4 | ||||
-rw-r--r-- | arch/sh/include/asm/processor_32.h | 3 | ||||
-rw-r--r-- | arch/sh/include/asm/processor_64.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/rtc.h | 1 | ||||
-rw-r--r-- | arch/sh/include/asm/setup.h | 2 | ||||
-rw-r--r-- | arch/sh/include/asm/syscalls.h | 25 | ||||
-rw-r--r-- | arch/sh/include/asm/syscalls_32.h | 56 | ||||
-rw-r--r-- | arch/sh/include/asm/syscalls_64.h | 34 | ||||
-rw-r--r-- | arch/sh/include/asm/system.h | 6 | ||||
-rw-r--r-- | arch/sh/include/asm/system_32.h | 16 |
13 files changed, 151 insertions, 6 deletions
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h index 720dfab7b15e..f9c88583d90a 100644 --- a/arch/sh/include/asm/clock.h +++ b/arch/sh/include/asm/clock.h | |||
@@ -39,6 +39,7 @@ struct clk { | |||
39 | 39 | ||
40 | /* Should be defined by processor-specific code */ | 40 | /* Should be defined by processor-specific code */ |
41 | void arch_init_clk_ops(struct clk_ops **, int type); | 41 | void arch_init_clk_ops(struct clk_ops **, int type); |
42 | int __init arch_clk_init(void); | ||
42 | 43 | ||
43 | /* arch/sh/kernel/cpu/clock.c */ | 44 | /* arch/sh/kernel/cpu/clock.c */ |
44 | int clk_init(void); | 45 | int clk_init(void); |
diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index a4fbf0c84fb1..e49cfee95fb2 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h | |||
@@ -194,6 +194,8 @@ __BUILD_MEMORY_STRING(w, u16) | |||
194 | 194 | ||
195 | #define IO_SPACE_LIMIT 0xffffffff | 195 | #define IO_SPACE_LIMIT 0xffffffff |
196 | 196 | ||
197 | extern unsigned long generic_io_base; | ||
198 | |||
197 | /* | 199 | /* |
198 | * This function provides a method for the generic case where a board-specific | 200 | * This function provides a method for the generic case where a board-specific |
199 | * ioport_map simply needs to return the port + some arbitrary port base. | 201 | * ioport_map simply needs to return the port + some arbitrary port base. |
@@ -203,8 +205,6 @@ __BUILD_MEMORY_STRING(w, u16) | |||
203 | */ | 205 | */ |
204 | static inline void __set_io_port_base(unsigned long pbase) | 206 | static inline void __set_io_port_base(unsigned long pbase) |
205 | { | 207 | { |
206 | extern unsigned long generic_io_base; | ||
207 | |||
208 | generic_io_base = pbase; | 208 | generic_io_base = pbase; |
209 | } | 209 | } |
210 | 210 | ||
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h index 6195a531c1b0..d319baaf4fbd 100644 --- a/arch/sh/include/asm/irq.h +++ b/arch/sh/include/asm/irq.h | |||
@@ -41,6 +41,9 @@ static inline int generic_irq_demux(int irq) | |||
41 | #define irq_canonicalize(irq) (irq) | 41 | #define irq_canonicalize(irq) (irq) |
42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) | 42 | #define irq_demux(irq) sh_mv.mv_irq_demux(irq) |
43 | 43 | ||
44 | void init_IRQ(void); | ||
45 | asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs); | ||
46 | |||
44 | #ifdef CONFIG_IRQSTACKS | 47 | #ifdef CONFIG_IRQSTACKS |
45 | extern void irq_ctx_init(int cpu); | 48 | extern void irq_ctx_init(int cpu); |
46 | extern void irq_ctx_exit(int cpu); | 49 | extern void irq_ctx_exit(int cpu); |
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h index 15d9f92ca383..58e2be55ab93 100644 --- a/arch/sh/include/asm/processor.h +++ b/arch/sh/include/asm/processor.h | |||
@@ -45,9 +45,13 @@ enum cpu_type { | |||
45 | 45 | ||
46 | /* Forward decl */ | 46 | /* Forward decl */ |
47 | struct sh_cpuinfo; | 47 | struct sh_cpuinfo; |
48 | struct seq_operations; | ||
49 | |||
50 | extern struct pt_regs fake_swapper_regs; | ||
48 | 51 | ||
49 | /* arch/sh/kernel/setup.c */ | 52 | /* arch/sh/kernel/setup.c */ |
50 | const char *get_cpu_subtype(struct sh_cpuinfo *c); | 53 | const char *get_cpu_subtype(struct sh_cpuinfo *c); |
54 | extern const struct seq_operations cpuinfo_op; | ||
51 | 55 | ||
52 | #ifdef CONFIG_VSYSCALL | 56 | #ifdef CONFIG_VSYSCALL |
53 | int vsyscall_init(void); | 57 | int vsyscall_init(void); |
diff --git a/arch/sh/include/asm/processor_32.h b/arch/sh/include/asm/processor_32.h index 0dadd75bd93c..41d23210583c 100644 --- a/arch/sh/include/asm/processor_32.h +++ b/arch/sh/include/asm/processor_32.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | #include <linux/linkage.h> | ||
13 | #include <asm/page.h> | 14 | #include <asm/page.h> |
14 | #include <asm/types.h> | 15 | #include <asm/types.h> |
15 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
@@ -44,6 +45,8 @@ extern struct sh_cpuinfo cpu_data[]; | |||
44 | #define current_cpu_data cpu_data[smp_processor_id()] | 45 | #define current_cpu_data cpu_data[smp_processor_id()] |
45 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] | 46 | #define raw_current_cpu_data cpu_data[raw_smp_processor_id()] |
46 | 47 | ||
48 | asmlinkage void __init sh_cpu_init(void); | ||
49 | |||
47 | /* | 50 | /* |
48 | * User space process size: 2GB. | 51 | * User space process size: 2GB. |
49 | * | 52 | * |
diff --git a/arch/sh/include/asm/processor_64.h b/arch/sh/include/asm/processor_64.h index 770d5169983b..16609bc11627 100644 --- a/arch/sh/include/asm/processor_64.h +++ b/arch/sh/include/asm/processor_64.h | |||
@@ -169,8 +169,6 @@ struct thread_struct { | |||
169 | #define INIT_MMAP \ | 169 | #define INIT_MMAP \ |
170 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } | 170 | { &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL } |
171 | 171 | ||
172 | extern struct pt_regs fake_swapper_regs; | ||
173 | |||
174 | #define INIT_THREAD { \ | 172 | #define INIT_THREAD { \ |
175 | .sp = sizeof(init_stack) + \ | 173 | .sp = sizeof(init_stack) + \ |
176 | (long) &init_stack, \ | 174 | (long) &init_stack, \ |
diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h index 1813f4202a24..f7b010d48af7 100644 --- a/arch/sh/include/asm/rtc.h +++ b/arch/sh/include/asm/rtc.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_RTC_H | 1 | #ifndef _ASM_RTC_H |
2 | #define _ASM_RTC_H | 2 | #define _ASM_RTC_H |
3 | 3 | ||
4 | void time_init(void); | ||
4 | extern void (*board_time_init)(void); | 5 | extern void (*board_time_init)(void); |
5 | extern void (*rtc_sh_get_time)(struct timespec *); | 6 | extern void (*rtc_sh_get_time)(struct timespec *); |
6 | extern int (*rtc_sh_set_time)(const time_t); | 7 | extern int (*rtc_sh_set_time)(const time_t); |
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h index 55a2bd328d99..554f865075ca 100644 --- a/arch/sh/include/asm/setup.h +++ b/arch/sh/include/asm/setup.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _SH_SETUP_H | 1 | #ifndef _SH_SETUP_H |
2 | #define _SH_SETUP_H | 2 | #define _SH_SETUP_H |
3 | 3 | ||
4 | #include <asm/mmzone.h> | ||
5 | |||
4 | #define COMMAND_LINE_SIZE 256 | 6 | #define COMMAND_LINE_SIZE 256 |
5 | 7 | ||
6 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
diff --git a/arch/sh/include/asm/syscalls.h b/arch/sh/include/asm/syscalls.h new file mode 100644 index 000000000000..c1e2b8deb837 --- /dev/null +++ b/arch/sh/include/asm/syscalls.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef __ASM_SH_SYSCALLS_H | ||
2 | #define __ASM_SH_SYSCALLS_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | struct old_utsname; | ||
7 | |||
8 | asmlinkage int old_mmap(unsigned long addr, unsigned long len, | ||
9 | unsigned long prot, unsigned long flags, | ||
10 | int fd, unsigned long off); | ||
11 | asmlinkage long sys_mmap2(unsigned long addr, unsigned long len, | ||
12 | unsigned long prot, unsigned long flags, | ||
13 | unsigned long fd, unsigned long pgoff); | ||
14 | asmlinkage int sys_ipc(uint call, int first, int second, | ||
15 | int third, void __user *ptr, long fifth); | ||
16 | asmlinkage int sys_uname(struct old_utsname __user *name); | ||
17 | |||
18 | #ifdef CONFIG_SUPERH32 | ||
19 | # include "syscalls_32.h" | ||
20 | #else | ||
21 | # include "syscalls_64.h" | ||
22 | #endif | ||
23 | |||
24 | #endif /* __KERNEL__ */ | ||
25 | #endif /* __ASM_SH_SYSCALLS_H */ | ||
diff --git a/arch/sh/include/asm/syscalls_32.h b/arch/sh/include/asm/syscalls_32.h new file mode 100644 index 000000000000..104c5e686106 --- /dev/null +++ b/arch/sh/include/asm/syscalls_32.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #ifndef __ASM_SH_SYSCALLS_32_H | ||
2 | #define __ASM_SH_SYSCALLS_32_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/compiler.h> | ||
7 | #include <linux/linkage.h> | ||
8 | #include <linux/types.h> | ||
9 | |||
10 | struct pt_regs; | ||
11 | |||
12 | asmlinkage int sys_fork(unsigned long r4, unsigned long r5, | ||
13 | unsigned long r6, unsigned long r7, | ||
14 | struct pt_regs __regs); | ||
15 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
16 | unsigned long parent_tidptr, | ||
17 | unsigned long child_tidptr, | ||
18 | struct pt_regs __regs); | ||
19 | asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | ||
20 | unsigned long r6, unsigned long r7, | ||
21 | struct pt_regs __regs); | ||
22 | asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, | ||
23 | char __user * __user *uenvp, unsigned long r7, | ||
24 | struct pt_regs __regs); | ||
25 | asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5, | ||
26 | unsigned long r6, unsigned long r7, | ||
27 | struct pt_regs __regs); | ||
28 | asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act, | ||
29 | struct old_sigaction __user *oact); | ||
30 | asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | ||
31 | unsigned long r6, unsigned long r7, | ||
32 | struct pt_regs __regs); | ||
33 | asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5, | ||
34 | unsigned long r6, unsigned long r7, | ||
35 | struct pt_regs __regs); | ||
36 | asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, | ||
37 | unsigned long r6, unsigned long r7, | ||
38 | struct pt_regs __regs); | ||
39 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | ||
40 | unsigned long r6, unsigned long r7, | ||
41 | struct pt_regs __regs); | ||
42 | asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf, | ||
43 | size_t count, long dummy, loff_t pos); | ||
44 | asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf, | ||
45 | size_t count, long dummy, loff_t pos); | ||
46 | asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, | ||
47 | u32 len0, u32 len1, int advice); | ||
48 | |||
49 | /* Misc syscall related bits */ | ||
50 | asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); | ||
51 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); | ||
52 | asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0, | ||
53 | unsigned long thread_info_flags); | ||
54 | |||
55 | #endif /* __KERNEL__ */ | ||
56 | #endif /* __ASM_SH_SYSCALLS_32_H */ | ||
diff --git a/arch/sh/include/asm/syscalls_64.h b/arch/sh/include/asm/syscalls_64.h new file mode 100644 index 000000000000..751fd8811364 --- /dev/null +++ b/arch/sh/include/asm/syscalls_64.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef __ASM_SH_SYSCALLS_64_H | ||
2 | #define __ASM_SH_SYSCALLS_64_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/compiler.h> | ||
7 | #include <linux/linkage.h> | ||
8 | #include <linux/types.h> | ||
9 | |||
10 | struct pt_regs; | ||
11 | |||
12 | asmlinkage int sys_fork(unsigned long r2, unsigned long r3, | ||
13 | unsigned long r4, unsigned long r5, | ||
14 | unsigned long r6, unsigned long r7, | ||
15 | struct pt_regs *pregs); | ||
16 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | ||
17 | unsigned long r4, unsigned long r5, | ||
18 | unsigned long r6, unsigned long r7, | ||
19 | struct pt_regs *pregs); | ||
20 | asmlinkage int sys_vfork(unsigned long r2, unsigned long r3, | ||
21 | unsigned long r4, unsigned long r5, | ||
22 | unsigned long r6, unsigned long r7, | ||
23 | struct pt_regs *pregs); | ||
24 | asmlinkage int sys_execve(char *ufilename, char **uargv, | ||
25 | char **uenvp, unsigned long r5, | ||
26 | unsigned long r6, unsigned long r7, | ||
27 | struct pt_regs *pregs); | ||
28 | |||
29 | /* Misc syscall related bits */ | ||
30 | asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs); | ||
31 | asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); | ||
32 | |||
33 | #endif /* __KERNEL__ */ | ||
34 | #endif /* __ASM_SH_SYSCALLS_64_H */ | ||
diff --git a/arch/sh/include/asm/system.h b/arch/sh/include/asm/system.h index fbac113bbfbf..6160fe445161 100644 --- a/arch/sh/include/asm/system.h +++ b/arch/sh/include/asm/system.h | |||
@@ -127,6 +127,8 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old, | |||
127 | }) | 127 | }) |
128 | 128 | ||
129 | extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn)); | 129 | extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn)); |
130 | void free_initmem(void); | ||
131 | void free_initrd_mem(unsigned long start, unsigned long end); | ||
130 | 132 | ||
131 | extern void *set_exception_table_vec(unsigned int vec, void *handler); | 133 | extern void *set_exception_table_vec(unsigned int vec, void *handler); |
132 | 134 | ||
@@ -179,8 +181,8 @@ BUILD_TRAP_HANDLER(fpu_state_restore); | |||
179 | #define arch_align_stack(x) (x) | 181 | #define arch_align_stack(x) (x) |
180 | 182 | ||
181 | struct mem_access { | 183 | struct mem_access { |
182 | unsigned long (*from)(void *dst, const void *src, unsigned long cnt); | 184 | unsigned long (*from)(void *dst, const void __user *src, unsigned long cnt); |
183 | unsigned long (*to)(void *dst, const void *src, unsigned long cnt); | 185 | unsigned long (*to)(void __user *dst, const void *src, unsigned long cnt); |
184 | }; | 186 | }; |
185 | 187 | ||
186 | #ifdef CONFIG_SUPERH32 | 188 | #ifdef CONFIG_SUPERH32 |
diff --git a/arch/sh/include/asm/system_32.h b/arch/sh/include/asm/system_32.h index f11bcf0855ed..16509ed2bb60 100644 --- a/arch/sh/include/asm/system_32.h +++ b/arch/sh/include/asm/system_32.h | |||
@@ -99,4 +99,20 @@ do { \ | |||
99 | int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, | 99 | int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs, |
100 | struct mem_access *ma); | 100 | struct mem_access *ma); |
101 | 101 | ||
102 | asmlinkage void do_address_error(struct pt_regs *regs, | ||
103 | unsigned long writeaccess, | ||
104 | unsigned long address); | ||
105 | asmlinkage void do_divide_error(unsigned long r4, unsigned long r5, | ||
106 | unsigned long r6, unsigned long r7, | ||
107 | struct pt_regs __regs); | ||
108 | asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5, | ||
109 | unsigned long r6, unsigned long r7, | ||
110 | struct pt_regs __regs); | ||
111 | asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5, | ||
112 | unsigned long r6, unsigned long r7, | ||
113 | struct pt_regs __regs); | ||
114 | asmlinkage void do_exception_error(unsigned long r4, unsigned long r5, | ||
115 | unsigned long r6, unsigned long r7, | ||
116 | struct pt_regs __regs); | ||
117 | |||
102 | #endif /* __ASM_SH_SYSTEM_32_H */ | 118 | #endif /* __ASM_SH_SYSTEM_32_H */ |