sh: fixup many sparse errors.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -39,6 +39,7 @@ struct clk {
|
||||
|
||||
/* Should be defined by processor-specific code */
|
||||
void arch_init_clk_ops(struct clk_ops **, int type);
|
||||
int __init arch_clk_init(void);
|
||||
|
||||
/* arch/sh/kernel/cpu/clock.c */
|
||||
int clk_init(void);
|
||||
|
@@ -194,6 +194,8 @@ __BUILD_MEMORY_STRING(w, u16)
|
||||
|
||||
#define IO_SPACE_LIMIT 0xffffffff
|
||||
|
||||
extern unsigned long generic_io_base;
|
||||
|
||||
/*
|
||||
* This function provides a method for the generic case where a board-specific
|
||||
* ioport_map simply needs to return the port + some arbitrary port base.
|
||||
@@ -203,8 +205,6 @@ __BUILD_MEMORY_STRING(w, u16)
|
||||
*/
|
||||
static inline void __set_io_port_base(unsigned long pbase)
|
||||
{
|
||||
extern unsigned long generic_io_base;
|
||||
|
||||
generic_io_base = pbase;
|
||||
}
|
||||
|
||||
|
@@ -41,6 +41,9 @@ static inline int generic_irq_demux(int irq)
|
||||
#define irq_canonicalize(irq) (irq)
|
||||
#define irq_demux(irq) sh_mv.mv_irq_demux(irq)
|
||||
|
||||
void init_IRQ(void);
|
||||
asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs);
|
||||
|
||||
#ifdef CONFIG_IRQSTACKS
|
||||
extern void irq_ctx_init(int cpu);
|
||||
extern void irq_ctx_exit(int cpu);
|
||||
|
@@ -45,9 +45,13 @@ enum cpu_type {
|
||||
|
||||
/* Forward decl */
|
||||
struct sh_cpuinfo;
|
||||
struct seq_operations;
|
||||
|
||||
extern struct pt_regs fake_swapper_regs;
|
||||
|
||||
/* arch/sh/kernel/setup.c */
|
||||
const char *get_cpu_subtype(struct sh_cpuinfo *c);
|
||||
extern const struct seq_operations cpuinfo_op;
|
||||
|
||||
#ifdef CONFIG_VSYSCALL
|
||||
int vsyscall_init(void);
|
||||
|
@@ -10,6 +10,7 @@
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/types.h>
|
||||
#include <asm/cache.h>
|
||||
@@ -44,6 +45,8 @@ extern struct sh_cpuinfo cpu_data[];
|
||||
#define current_cpu_data cpu_data[smp_processor_id()]
|
||||
#define raw_current_cpu_data cpu_data[raw_smp_processor_id()]
|
||||
|
||||
asmlinkage void __init sh_cpu_init(void);
|
||||
|
||||
/*
|
||||
* User space process size: 2GB.
|
||||
*
|
||||
|
@@ -169,8 +169,6 @@ struct thread_struct {
|
||||
#define INIT_MMAP \
|
||||
{ &init_mm, 0, 0, NULL, PAGE_SHARED, VM_READ | VM_WRITE | VM_EXEC, 1, NULL, NULL }
|
||||
|
||||
extern struct pt_regs fake_swapper_regs;
|
||||
|
||||
#define INIT_THREAD { \
|
||||
.sp = sizeof(init_stack) + \
|
||||
(long) &init_stack, \
|
||||
|
@@ -1,6 +1,7 @@
|
||||
#ifndef _ASM_RTC_H
|
||||
#define _ASM_RTC_H
|
||||
|
||||
void time_init(void);
|
||||
extern void (*board_time_init)(void);
|
||||
extern void (*rtc_sh_get_time)(struct timespec *);
|
||||
extern int (*rtc_sh_set_time)(const time_t);
|
||||
|
@@ -1,6 +1,8 @@
|
||||
#ifndef _SH_SETUP_H
|
||||
#define _SH_SETUP_H
|
||||
|
||||
#include <asm/mmzone.h>
|
||||
|
||||
#define COMMAND_LINE_SIZE 256
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
25
arch/sh/include/asm/syscalls.h
Normal file
25
arch/sh/include/asm/syscalls.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#ifndef __ASM_SH_SYSCALLS_H
|
||||
#define __ASM_SH_SYSCALLS_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct old_utsname;
|
||||
|
||||
asmlinkage int old_mmap(unsigned long addr, unsigned long len,
|
||||
unsigned long prot, unsigned long flags,
|
||||
int fd, unsigned long off);
|
||||
asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
|
||||
unsigned long prot, unsigned long flags,
|
||||
unsigned long fd, unsigned long pgoff);
|
||||
asmlinkage int sys_ipc(uint call, int first, int second,
|
||||
int third, void __user *ptr, long fifth);
|
||||
asmlinkage int sys_uname(struct old_utsname __user *name);
|
||||
|
||||
#ifdef CONFIG_SUPERH32
|
||||
# include "syscalls_32.h"
|
||||
#else
|
||||
# include "syscalls_64.h"
|
||||
#endif
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_SH_SYSCALLS_H */
|
56
arch/sh/include/asm/syscalls_32.h
Normal file
56
arch/sh/include/asm/syscalls_32.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef __ASM_SH_SYSCALLS_32_H
|
||||
#define __ASM_SH_SYSCALLS_32_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct pt_regs;
|
||||
|
||||
asmlinkage int sys_fork(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
|
||||
unsigned long parent_tidptr,
|
||||
unsigned long child_tidptr,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_vfork(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv,
|
||||
char __user * __user *uenvp, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_sigsuspend(old_sigset_t mask, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_sigaction(int sig, const struct old_sigaction __user *act,
|
||||
struct old_sigaction __user *oact);
|
||||
asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage int sys_pipe(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf,
|
||||
size_t count, long dummy, loff_t pos);
|
||||
asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf,
|
||||
size_t count, long dummy, loff_t pos);
|
||||
asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1,
|
||||
u32 len0, u32 len1, int advice);
|
||||
|
||||
/* Misc syscall related bits */
|
||||
asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);
|
||||
asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
|
||||
asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
|
||||
unsigned long thread_info_flags);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_SH_SYSCALLS_32_H */
|
34
arch/sh/include/asm/syscalls_64.h
Normal file
34
arch/sh/include/asm/syscalls_64.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef __ASM_SH_SYSCALLS_64_H
|
||||
#define __ASM_SH_SYSCALLS_64_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct pt_regs;
|
||||
|
||||
asmlinkage int sys_fork(unsigned long r2, unsigned long r3,
|
||||
unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs *pregs);
|
||||
asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp,
|
||||
unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs *pregs);
|
||||
asmlinkage int sys_vfork(unsigned long r2, unsigned long r3,
|
||||
unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs *pregs);
|
||||
asmlinkage int sys_execve(char *ufilename, char **uargv,
|
||||
char **uenvp, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs *pregs);
|
||||
|
||||
/* Misc syscall related bits */
|
||||
asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs);
|
||||
asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __ASM_SH_SYSCALLS_64_H */
|
@@ -127,6 +127,8 @@ static inline unsigned long __cmpxchg(volatile void * ptr, unsigned long old,
|
||||
})
|
||||
|
||||
extern void die(const char *str, struct pt_regs *regs, long err) __attribute__ ((noreturn));
|
||||
void free_initmem(void);
|
||||
void free_initrd_mem(unsigned long start, unsigned long end);
|
||||
|
||||
extern void *set_exception_table_vec(unsigned int vec, void *handler);
|
||||
|
||||
@@ -179,8 +181,8 @@ BUILD_TRAP_HANDLER(fpu_state_restore);
|
||||
#define arch_align_stack(x) (x)
|
||||
|
||||
struct mem_access {
|
||||
unsigned long (*from)(void *dst, const void *src, unsigned long cnt);
|
||||
unsigned long (*to)(void *dst, const void *src, unsigned long cnt);
|
||||
unsigned long (*from)(void *dst, const void __user *src, unsigned long cnt);
|
||||
unsigned long (*to)(void __user *dst, const void *src, unsigned long cnt);
|
||||
};
|
||||
|
||||
#ifdef CONFIG_SUPERH32
|
||||
|
@@ -99,4 +99,20 @@ do { \
|
||||
int handle_unaligned_access(opcode_t instruction, struct pt_regs *regs,
|
||||
struct mem_access *ma);
|
||||
|
||||
asmlinkage void do_address_error(struct pt_regs *regs,
|
||||
unsigned long writeaccess,
|
||||
unsigned long address);
|
||||
asmlinkage void do_divide_error(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
asmlinkage void do_exception_error(unsigned long r4, unsigned long r5,
|
||||
unsigned long r6, unsigned long r7,
|
||||
struct pt_regs __regs);
|
||||
|
||||
#endif /* __ASM_SH_SYSTEM_32_H */
|
||||
|
Reference in New Issue
Block a user